Connector for Magento configuration properties
Implementing the Tridion Connector for Magento requires a JSON configuration file, which defines your specific integration of Tridion with Magento Commerce.
This topic describes the configuration properties that are needed specifically for the Connector for Magento. For full details on the standard Connector configuration format, refer to the related topics.
- pageSize
- Default page size when doing search and list operations.
- accessToken
- Access token to be used to authenticate over OAuth.
- hostUrl
- URL to the REST API endpoint.
- catalogs
-
An array that defines one or more Magento Commerce product catalogs to be exposed. Each catalog is associated with a locale and optional a set of publication IDs, which the Connector uses to map Connector for Magento locales with Tridion Blueprint publications. For each catalog, set the following properties (as they are expressed in Magento Commerce):
- name — The name of the catalog in Magento Commerce, such as
"apparel-uk" - publicationIds — A list of one or more publication identifiers that are associated with the catalog, such as
["26", "27"] - default — A Boolean value (true/false) that indicates whether the catalog is the default one, which is used as fallback when no matching publication ID is found
- name — The name of the catalog in Magento Commerce, such as
The following sample code illustrates the configuration file of a Connector for Magento:
{
"configuration": {
"MagentoConnector": {
"configuration": {
"PageSize": 100,
"AccessToken": "nmtn3g17t4u5w6ckd8b9yn8bj8yn2l4c",
"HostUrl": "http://magento2.company.com",
"catalogs": [
{
"name": "default",
"default": true
},
{
"name": "fr",
"publicationIds": [ "6" ],
"default": false
}
]
}
}
},
"sitesCm": {
"isEnabled": true,
"MagentoConnector": {
"namespaces": {
"magento": {
"displayName": "Magento",
"stubFolders": ["tcm:2-71-2"]
}
}
}
},
"staging": {
"isEnabled": true,
"MagentoConnector": {
"namespaces": {
"magento": {
}
}
}
}
}