techdivision / import-product-magic360
Pacemaker library providing basic import functionality for the Magic ToolBox Magic 360 image gallery view
Installs: 7 338
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 12
Forks: 2
Open Issues: 0
Requires
- php: >=7.1.0
- techdivision/import-product: ^25.1.1
Requires (Dev)
- consolidation/robo: ~1.0
- doctrine/dbal: 2.5.*
- mikey179/vfsstream: ~1.0
- pdepend/pdepend: 2.5.2
- phpmd/phpmd: @stable
- phpunit/phpunit: ~6.5.0
- sebastian/phpcpd: ~3.0.0
- squizlabs/php_codesniffer: ~3.4.0
- symfony/http-kernel: ~3.4
- 16.0.0
- 15.x-dev
- 15.0.0
- 14.x-dev
- 14.0.3
- 14.0.2
- 14.0.1
- 14.0.0
- 13.x-dev
- 13.0.0
- 12.x-dev
- 12.0.0
- 11.x-dev
- 11.0.0
- 10.x-dev
- 10.0.0
- 9.x-dev
- 9.0.2
- 9.0.1
- 9.0.0
- 8.x-dev
- 8.0.3
- 8.0.2
- 8.0.1
- 8.0.0
- 7.x-dev
- 7.0.0
- 6.x-dev
- 6.0.0
- 5.x-dev
- 5.0.0
- 4.x-dev
- 4.0.0
- 3.x-dev
- 3.0.0
- 2.x-dev
- 2.0.0
- 1.0.0
- 1.0.0-beta12
- 1.0.0-beta11
- 1.0.0-beta10
- 1.0.0-beta9
- 1.0.0-beta8
- 1.0.0-beta7
- 1.0.0-beta6
- 1.0.0-beta5
- 1.0.0-beta4
- 1.0.0-beta3
- 1.0.0-beta2
- 1.0.0-beta1
- 0.4.1
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
- dev-pac-major
- dev-master
- dev-di
- dev-improvement/di
This package is auto-updated.
Last update: 2024-11-19 11:41:01 UTC
README
Please visit the Pacemaker website or our documentation for additional information
Introduction
This module provides the functionality to import the images for the almost famous Product Magic360 Magento 2 extension.
Configuration
In case that the Pacemaker - Simple Console Tool >= 3.8
is used, the functionality for the add-update and replace operations can be enabled add the following
snippets to your <magento-install-dir>/app/etc/configuration
directory.
The first snippet is <magento-install-dir>/app/etc/configuration/shortcuts.json
, which overrides the default
shortcuts and finally adds the general/catalog_product/replace.magic360
operation to the replace
and
add-update
operations
{ "shortcuts": { "ce": { "catalog_product": { "replace": [ "general/general/global-data", "general/general/move-files", "general/catalog_product/collect-data", "general/eav_attribute/convert", "general/eav_attribute/add-update.options", "general/eav_attribute/add-update.option-values", "general/eav_attribute/add-update.swatch-values", "general/catalog_category/convert", "ce/catalog_category/sort", "ce/catalog_category/add-update", "ce/catalog_category/add-update.path", "ce/catalog_category/add-update.url-rewrite", "general/catalog_category/children-count", "general/catalog_product/validate", "ce/catalog_product/replace", "ce/catalog_product/replace.variants", "ce/catalog_product/replace.bundles", "ce/catalog_product/replace.links", "ce/catalog_product/replace.grouped", "ce/catalog_product/replace.media", "general/catalog_product/replace.msi", "general/catalog_product/replace.url-rewrites", "general/catalog_product/replace.magic360" ], "add-update": [ "general/general/global-data", "general/general/move-files", "general/catalog_product/collect-data", "general/eav_attribute/convert", "general/eav_attribute/add-update.options", "general/eav_attribute/add-update.option-values", "general/eav_attribute/add-update.swatch-values", "general/catalog_category/convert", "ce/catalog_category/sort", "ce/catalog_category/add-update", "ce/catalog_category/add-update.path", "ce/catalog_category/add-update.url-rewrite", "general/catalog_category/children-count", "general/catalog_product/validate", "ce/catalog_product/add-update", "ce/catalog_product/add-update.variants", "ce/catalog_product/add-update.bundles", "ce/catalog_product/add-update.links", "ce/catalog_product/add-update.grouped", "ce/catalog_product/add-update.media", "general/catalog_product/add-update.msi", "general/catalog_product/add-update.url-rewrites", "general/catalog_product/add-update.magic360" ] } } } }
The second and the third snippets makes the techdivision/import-product-magic360
extension classes available for
the importer. So add the snippet <magento-install-dir>/app/etc/configuration/extension-libraries.json
with the
content
{ "extension-libraries": [ "techdivision/import-product-magic360" ] }
and the snippet <magento-install-dir>/app/etc/configuration/additional-vendor-dirs.json
containing the following
content
{ "additional-vendor-dirs": [ { "vendor-dir": "app/code", "libraries": [ "MyProject/Import" ] } ] }
assumung that your <magento-install-dir>/app/code
contains the Magento extension MyProject/Import
.
Finally, it is necessary to override the Symfony DI configuration for the apropriate composite observers. For example
if you're using Magento CE, add a <magento-install-dir>/app/codeMyProject/import/symfony/Resources/config/services.xml
with
the following content, to override the default composite observer
<?xml version="1.0" encoding="UTF-8" ?> <container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> <services> <!-- | The DI configuration for the composite observers of the delete operation. |--> <service id="import_product.observer.composite.base.delete" class="TechDivision\Import\Observers\GenericCompositeObserver"> <call method="addObserver"> <argument id="import_product_magic360.observer.sku.entity.id.mapping" type="service"/> </call> <call method="addObserver"> <argument id="import_product_msi.observer.product.source.item.default" type="service"/> </call> <call method="addObserver"> <argument id="import_product_url_rewrite.observer.clear.url.rewrite" type="service"/> </call> <call method="addObserver"> <argument id="import_product_magic360.observer.clear.magic360" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.clear.product" type="service"/> </call> </service> <!-- | The DI configuration for the composite observers of the replace operation. |--> <service id="import_product.observer.composite.base.replace" class="TechDivision\Import\Observers\GenericCompositeObserver"> <call method="addObserver"> <argument id="import_product_url_rewrite.observer.clear.url.rewrite" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.clear.product" type="service"/> </call> <call method="addObserver"> <argument id="import.observer.attribute.set" type="service"/> </call> <call method="addObserver"> <argument id="import.observer.additional.attribute" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.url.key" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.file.upload" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.quality.and.stock.status" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.product" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.product.website" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.category.product" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.product.inventory" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.product.attribute" type="service"/> </call> <call method="addObserver"> <argument id="import_product_url_rewrite.observer.product.url.rewrite" type="service"/> </call> <call method="addObserver"> <argument id="import_product_variant.observer.product.variant" type="service"/> </call> <call method="addObserver"> <argument id="import_product_bundle.observer.product.bundle" type="service"/> </call> <call method="addObserver"> <argument id="import_product_media.observer.product.media" type="service"/> </call> <call method="addObserver"> <argument id="import_product_link.observer.product.link" type="service"/> </call> <call method="addObserver"> <argument id="import_product_grouped.observer.product.grouped" type="service"/> </call> <call method="addObserver"> <argument id="import_product_msi.observer.product.source.item.default" type="service"/> </call> <call method="addObserver"> <argument id="import_product_magic360.observer.product.magic360" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.clean.up" type="service"/> </call> </service> <!-- | The DI configuration for the composite observers of the add-update operation. |--> <service id="import_product.observer.composite.base.add_update" class="TechDivision\Import\Observers\GenericCompositeObserver"> <call method="addObserver"> <argument id="import.observer.attribute.set" type="service"/> </call> <call method="addObserver"> <argument id="import.observer.additional.attribute" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.url.key" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.file.upload" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.quality.and.stock.status" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.product" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.product.website.update" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.category.product.update" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.product.inventory.update" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.product.attribute.update" type="service"/> </call> <call method="addObserver"> <argument id="import_product_url_rewrite.observer.product.url.rewrite" type="service"/> </call> <call method="addObserver"> <argument id="import_product_variant.observer.product.variant" type="service"/> </call> <call method="addObserver"> <argument id="import_product_bundle.observer.product.bundle" type="service"/> </call> <call method="addObserver"> <argument id="import_product_media.observer.product.media" type="service"/> </call> <call method="addObserver"> <argument id="import_product_media.observer.clear.media.gallery" type="service"/> </call> <call method="addObserver"> <argument id="import_product_link.observer.product.link" type="service"/> </call> <call method="addObserver"> <argument id="import_product_grouped.observer.product.grouped" type="service"/> </call> <call method="addObserver"> <argument id="import_product_msi.observer.product.source.item.default" type="service"/> </call> <call method="addObserver"> <argument id="import_product_magic360.observer.product.magic360" type="service"/> </call> <call method="addObserver"> <argument id="import_product.observer.clean.up" type="service"/> </call> </service> </services> </container>
Missing Index
For a massive improvement of the import performance, two indices have to be added.
To do that, open a MySQL command line and enter the following SQL statements.
ALTER TABLE `magic360_gallery` ADD INDEX `MAGIC360_GALLERY_PRODUCT_ID` (`product_id`); ALTER TABLE `magic360_gallery` ADD INDEX `MAGIC360_GALLERY_POSITION` (`position`);