-
Notifications
You must be signed in to change notification settings - Fork 108
Product Import does not clean Accessory and Attribute tables, if requested to clean Product data. #60
Comments
Hi @k0lv, I did not manage to reproduce the issue with PS1.7.6.2 & pscleaner v2.0.0. |
Hello, @khouloudbelguith. I think, that the main difference for yours and mine scenario is, that you are using Product ID, instead of Reference#. The trick is that ps_accessory table is working with ID's. So, if after cleaning, ps_attribute table has data for the old Product ID's (relationships), all the data will be corrupted, because in my case new portion of import will generate new ID's for the products (second import file, in my case had different sequence of the products, and as a results different ID's generated). You can easily have an evidence if you will check ps_accessory, ps_attribute and ps_tag_count tables in phpMyAdmin, after PS Cleaner, or Clean Product Import (with deletion) activity. Thank you for the fast response and Happy New Year! 🎄 1) Importing first portion to the fully clean DB: Issue: Old relationships applied to new product list. P.S. I have found, that ps_attribute and ps_tag_count tables also retain historical data. Yet I do not know if that fact can cause any data integrity issues in the future. |
@k0lv, could you please provide me the two Thanks! |
Products_1.xlsx
Update: |
@k0lv, thanks for these clarifications.
I’ll add this to the debug roadmap so that it’s fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request! |
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:
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.
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 => okGo 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 => NOKTo Reproduce
Steps to reproduce the behavior:
Additional information
PrestaShop version: 1.7.6.2
PHP version: 7.0.33
The text was updated successfully, but these errors were encountered: