Magnolia 6.1 reached end of life on March 31, 2021. This branch is no longer supported, see End-of-life policy.
The Commerce Connector Pack provides out-of-the-box connectors to the commercetools and Magento. If you use another third-party e-commerce solution, you can configure your own connector.
We assume you are familiar with Magnolia, Maven and Java.
Before configuring the connector, make sure you have:
Complete the steps below to configure your connector.
You Maven module must depend on:
<dependency> <groupId>info.magnolia.ecommerce</groupId> <artifactId>magnolia-ecommerce</artifactId> <version>1.0</version> </dependency>
ModuleLifecycle
and close all client providers upon stopping the module. For reference see info.magnolia.ecommerce.magento.EcommerceMagentoModule
DataSuppliers
for products and categories:info.magnolia.ecommerce.common.Products
– check for the required list of suppliers for products.info.magnolia.ecommerce.common.Categories
– check for the required list of suppliers for categories. info.magnolia.ecommerce.magento.common.MagentoCategory
for an example of how to map the JSON received.info.magnolia.ecommerce.cart.CartProvider
info.magnolia.ecommerce.checkout.CheckoutProvider
@Multibinding
and added to the module descriptor as components for injection. For an example, see ecommerce-magento-connector.xml
Implement the EcommerceClientProvider
according to the connection type you want to use to connect to your external e-commerce solution:
RestClientProvider
– REST-based client provider. For an example, see info.magnolia.ecommerce.magento.MagentoRestClientProvider
and the info.magnolia.ecommerce.magento.client.MagentoHttpClient
client implementation based on the org.apache.http
package.3rdPartyClientProvider
– External e-commerce SDK-based client provider. This provider differs for each external e-commerce solution. For an example, see info.magnolia.ecommerce.commercetools.SphereClientProvider
.Using info.magnolia.ecommerce.common.DefaultEcommerceDefinition
, create your connector definition configuration file under: <your-module-name>/ecommerces/<definition-name>.yaml
.
For an example, see ecommerce-magento-connector/ecommerces/magento.yaml
.
To finish:
ecommerce
, ecommerce-templating
and ecommerce-ui
modules.You can then use the default E-commerce app, ecomfn templating functions and REST endpoints.