pscleaner
pscleaner copied to clipboard
Product Import does not clean Accessory and Attribute tables, if requested to clean Product data.
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:
- 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
-
install PS1.7.6.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
-
check the
ps_accessory
table => ok -
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
-
check the
ps_accessory
table => NOK
To Reproduce Steps to reproduce the behavior:
- Import 1st portion of Products with Accessories.
- Use PS Cleaner to delete all Product Catalog.
- 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