-
Notifications
You must be signed in to change notification settings - Fork 2
Magento
The Imixs-Magento-Adapter is a connector module providing a set of classes to connect to the Ecommerce Softwareplattform Magento. Magento provides two different WebService Interfaces. The Magento Rest API for a simple Rest Service based on a the OAuth 1.0.a protocol and the Magento SOAP API for a SOAP interface.
See details about the two client implmentations here:
- [Rest Client](Magento Rest Client)
- [Soap Client](Magento Soap Client)
The Imixs-Magento-Adapter can use both client types. Which type is used can be configured by the imixs.property file or the imixs PropertyService .
##############################
# Magento REST Service Configuration
##############################
# magento host
......
# optional
magento.debug=true
If a workitem is based on the import of a magento order the order id is stored in the property 'txtName' in the following format:
magento:order:ID
All properties of the magento order are stored in properties with the prafix 'm_'.
The class org.imixs.workflow.magento.MagentoPlugin synchronizes the Order Data of a worktiem and creates the following workitem attributes:
-
txtMagentoCustomer=combined magento customer name (First- and Lastname)
-
txtMagentoCustomerEmail = E-Mail address of customer
-
txtMagentoOrderID = Order id of magento order
-
txtMagentoBillingFirstname = Firstname of Billing address
-
txtMagentoBillingLastname = Lastname of Billing address
-
txtMagentoBillingTelephone = telephone of Billing address
-
txtMagentoBillingCompany = company of Billing address
-
txtMagentoBillingstreet = String of Billing address
-
txtMagentoBillingPostcode = Postcode of Billing address
-
txtMagentoBillingCity = City of Billing address
-
txtMagentoShippingFirstname = Firstname of Shipping address
-
txtMagentoShippingLastname = Lastname of Shipping address
-
txtMagentoShippingTelephone = telephone of Shipping address
-
txtMagentoShippingCompany = company of Shipping address
-
txtMagentoShippingstreet = String of Shipping address
-
txtMagentoShippingPostcode = Postcode of Shipping address
-
txtMagentoShippingCity = City of Shipping address
The MagentoSchedulerService implements a Timer EJB to import order items from Magento. The EJB can be configured through the config entity 'Type=ConfigMagento'. The JSF page /pages/admin/magento.xthml and the MagentoController provides a way to easy configure the timer in the web frontend of Imixs-Office-Workflow.
When a new order is imported or updated the scheduler calls the activityID 800. This activity should be definend in every status the order should be updated.
The EJB MagentoCache provides a caching mechanism to cache products and customer entities. This EJB is used by the MagentoService. The config property 'magento.cache.refresh' defines the maximal time in seconds a magento object is cached. If an object is older then the refresh time the object will be refetched by the MagentoService.
magento.cache.refresh=600
The method flush() provides a way to force the flush of older items. This method is called automatically by the MagentoScheduelerService. To clear the cache the method clear() can be called.