定制 spydemon/m2-catalog_product_import_media_reset 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

spydemon/m2-catalog_product_import_media_reset

Composer 安装命令:

composer require spydemon/m2-catalog_product_import_media_reset

包简介

Add a new column in product import files that allows you to reset media content on imported products.

README 文档

README

Aim of the module

Surprisingly, it seems that Magento 2 product import system doesn't handle media deletion. Indeed, if you import several times the same product with new images to assign on it, Magento will add the new ones to existing ones endlessly. All of them will show up on the front end, and your filesystem will be flooded by a lot of duplicate pictures.

This module adds a reset_images column in the CSV file to import that will erase all previous media assigned on the product if its value is 1.

What you still have to do

Nothing. You just have to install the module and to put the new reset_images in your CSV file that contains products to import.

Warnings

  • This module has a huge negative impact on performance. On a test I did, the imported time increased by 33 between ones that resets images and ones that don't… This slowness happens because I use the save method on each imported product for handling the deletion. Issue #1 tracks the problem.

  • The purpose of this module is more to help developers to save time instead of providing ready to use tools.

Compatibility

This module was tested on the Magento versions that follows.

Version State
2.3.5-p1 Works

How to install it

Using Composer for installing this module is the best way:

composer require spydemon/m2-catalog_product_import_reset_media

Help appreciated

If you like this module and find a bug or an enhancement, don't hesitate to fill an issue, or even better: a pull request. 😀

统计信息

  • 总下载量: 257
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固