0

I noticed some former developer added custom design to all products. So now there are 1 000+ products and it is impossible to manually edit all of them and change the custom theme value to null so that all products will use the default theme.

How can I do this via Phpmyadim or any easy way like module override?

1 Answer 1

1

First backup your database in case I'm wrong. Then....

Identify the attribute id.

SELECT 
    attribute_id, attribute_code
FROM 
    eav_attribute
WHERE
    attribute_code = 'custom_design' AND
    entity_type_id  = (SELECT 
                           entity_type_id
                       FROM
                           eav_entity_type
                       WHERE
                           entity_type_code = 'catalog_product'
                       )

Then delete all the records from the table catalog_product_entity_varchar with the attribute_id the one you get from the query above.

DELETE FROM `catalog_product_entity_varchar` where `attribute_id` = 'attribute id from previous query';

Clear the cache and reindex.

2
  • i used your 1st query it did not give any result
    – mcoder
    Commented Aug 6, 2015 at 2:40
  • I had a mistake in the query. Sorry. You can try again
    – Marius
    Commented Aug 6, 2015 at 4:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.