Hello everybody,
I have a simple task to perform, but I need to automate it because of the huge quantity of products (2000+).
Basically I am writing a PHP script, that analyzes the database and in case of specific conditions needs to delete specific product attributes. From the script I can get to the "id_product_attribute" number that I need to delete.
At that point I could start going trough all the tables in Prestashop database and delete the records associated with this ID, but I think it wouldn't be so clean, and there would be a risk or residual records that can cause problems.
I know that importing in my PHP file some Prestashop classes it would be possible to call the very same Prestashop functions that do this job when I click the "Remove" button in the back office. The question is: do someone of you know how can I do it?
I would need to use a function like deleteAttribute(id_product_attribute) every time I need to delete one from the database.
Thank you in advance developers!! Ah almost forgetting, I am on 1.6.0.6