pscleaner icon indicating copy to clipboard operation
pscleaner copied to clipboard

Product Import does not clean Accessory and Attribute tables, if requested to clean Product data.

Open k0lv opened this issue 4 years ago • 6 comments

Describe the bug I was importing Products with Accessories, and in the results, have seen, that Products are linked incorrectly(not 100% as I defined). Some part were as I described in my .xlsx, but there were also some random relations. I thought, that the error is is import functionality, or in the source data, but finally found out two reasons:

  1. I was importing data to PS several times, and every time used PrestaShop Cleaner v2.0.0 to clean the Product DB. I have found out, that 3 tables, are not cleaned by the Module: a) ps_accessory b) ps_attribute c) ps_tag_count // (I was not able to find out how to register issue for the module, sorry.) 2) Before importing, I was also setting parameter "Delete all products before import" to YES, but this also does not cleaned data.

Results (Issue): As a result I receive new data-base of products, but with partially old Accessories. Here is my issue.

Additional observations: As for ps_attribute and ps_tag_count, I do not know, if old data, that remains in tables can cause the issues for the future clean imports. I think it was worth to mention here. Maybe you can comment on that. Thank you.

Edit by Khouloud: steps to reproduce the issue

  1. install PS1.7.6.2

  2. Go to the Import page => import products Products_1.xlsx 2.1 Delete all products before import 2.2 Use product reference as a key

  3. check the ps_accessory table => ok image

  4. Go to the Import page => import products Products_2.xlsx 4.1 Delete all products before import 4.2 Use product reference as a key

  5. check the ps_accessory table => NOK image

To Reproduce Steps to reproduce the behavior:

  1. Import 1st portion of Products with Accessories.
  2. Use PS Cleaner to delete all Product Catalog.
  3. Import 2nd portion of Products with Accessories with "Delete all products before import" set to YES. As a result you will get mixture of New and Old product relationships.

Additional information PrestaShop version: 1.7.6.2 PHP version: 7.0.33

image

k0lv avatar Jan 01 '20 22:01 k0lv