- Copy the contents of this module to
app/code/Greenrivers/PimcoreIntegration
- Run
php bin/magento module:enable Greenrivers_PimcoreIntegration
- Run
php bin/magento setup:upgrade
&php bin/magento setup:di:compile
Stores->Configuration->Greenrivers->PimcoreIntegration
General Settings
Enable Integration - enable/disable integration
Pimcore Url - Pimcore base url (ending with slash)
Pimcore Api Key - Pimcore api key from GraphQL DataHub
Magento
Override Product - override product in Magento
Override Category - override category in Magento
php bin/magento greenrivers:pimcore:sync --products --categories
- Get products & categories from Pimcore.
- Push into message queues.
- Run message queues to save products & categories in Magento.
https://app.magento.test/graphql
Authorization: Bearer Token (integration token)
Create product
mutation {
createProduct(
input: {
status: 1
attribute_set_id: 4
name: "Product test"
sku: "test"
price: 23.99
}
) {
product {
status
attribute_set_id
name
sku
price
}
}
}
Create category
mutation {
createCategory(
input: {
is_active: 1
include_in_menu: 1
name: "Category test"
parent_id: 2
}
) {
category {
is_active
include_in_menu
name
parent_id
}
}
}
Errors are logged into var/log/greenrivers/pimcore_integration.log folder.
Run unit tests from root project directory:
./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist app/code/Greenrivers/PimcoreIntegration
Run integration tests from root project directory:
vendor/bin/phpunit -c $(pwd)/dev/tests/integration/phpunit.xml app/code/Greenrivers/PimcoreIntegration/Test/Integration
Run API functional tests from root project directory:
(due to: magento/magento2#36291 & magento/magento2#33696 update database config to tested db in app/etc/env.php)
vendor/bin/phpunit -c $(pwd)/dev/tests/api-functional/phpunit_graphql.xml app/code/Greenrivers/PimcoreIntegration/Test/Api
https://pimcore.com/docs/platform/Datahub/GraphQL/#external-access