0

I need to set all categories Use Parent Category Settings to "Yes" from mysql

I have done this sql query:

SELECT * FROM eav_attribute where attribute_code = 'custom_use_parent_settings';

wich give me attribute_id = 68

if i do

UPDATE catalog_category_entity_int set value = 1 where attribute_id = 68; 

only 103 rows are affected but i have 3000 categories

I am missing someting ? only level 1 categories are affected by the query

0

I tested your queries and works for me. I can think only at this scenario. If value is already set to 1 that row is not modified. Run this query first:

SELECT COUNT(*) FROM catalog_category_entity_int WHERE attribute_id = 68 AND value = 0;

And see how many categories don't use parent category settings and you can run this to see how many already used parent category settings:

SELECT COUNT(*) FROM catalog_category_entity_int WHERE attribute_id = 68 AND value = 1;
  • if i run SELECT COUNT(*) FROM catalog_category_entity_int WHERE attribute_id = 68 AND value = 0; i have 0 results – GSM Boutique Mar 21 '18 at 8:48
  • That means all the categories are set to get parent category settings. So everything is what you want. Right? – Ciprian Mar 21 '18 at 9:02
  • no is not if i run SELECT COUNT(*) FROM catalog_category_entity_int WHERE attribute_id = 68 AND value = 1; i get 109 rows. – GSM Boutique Mar 21 '18 at 9:11
  • And what you get if you run: SELECT * FROM catalog_category_entity_int WHERE attribute_id = 68; ? Or SELECT COUNT(*) FROM catalog_category_entity_int WHERE attribute_id = 68; – Ciprian Mar 21 '18 at 9:25
  • I get count 109 – GSM Boutique Mar 21 '18 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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