techdivision/import-product-magic360
Composer 安装命令:
composer require techdivision/import-product-magic360
包简介
Pacemaker library providing basic import functionality for the Magic ToolBox Magic 360 image gallery view
README 文档
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`);
techdivision/import-product-magic360 适用场景与选型建议
techdivision/import-product-magic360 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8.13k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2017 年 03 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 techdivision/import-product-magic360 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 techdivision/import-product-magic360 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 8.13k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 32
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: OSL-3.0
- 更新时间: 2017-03-08