2

I followed https://steemit.com/magento/@meetanshi/how-to-set-anchor-to-yes-in-all-categories-in-magento-2

It work, but i have more store view. In my catalog_category_entity_int table there is no attribute = 43 for store_id = 2 or 3. How to set is anchor to yes for all category in all store. Please help me

UPDATE

I can't find category id = 316 in catalog_category_entity? Where is i can find it?

10
  • what you get when you runt the querie meetanshi.d.pr/M0VLGT Commented Sep 10, 2019 at 4:24
  • attribute_id = 43.
    – Brian N
    Commented Sep 10, 2019 at 4:25
  • SELECT * FROM catalog_category_entity_int WHERE attribute_id=43 please run this queries you get the record or not? Commented Sep 10, 2019 at 4:27
  • yes, it's ok. 283 row updated. but it not work in all category for all store.
    – Brian N
    Commented Sep 10, 2019 at 4:28
  • Please clear the cache and check , because if row effacted than it definatli work Commented Sep 10, 2019 at 4:29

1 Answer 1

9

You can achieve this by running the below queries in your database.

First, identify the attribute id of the is_anchor attribute with below query:

SELECT * FROM eav_attribute where attribute_code = 'is_anchor';

From this, you've got the attribute id. After this, you need to run the below query to update all category to Anchor YES.

UPDATE catalog_category_entity_int set value = 1 where attribute_id = 54;

Where 54 is the attribute id for is_anchor.

Hope it helps!!!

15
  • This is the same as what I did, but it doesn't work properly for all categories
    – Brian N
    Commented Sep 10, 2019 at 4:23
  • I've checked this on my store and it will changed the values for all store views. Please run the re-index process and flush the caches on your website.
    – Sumit
    Commented Sep 10, 2019 at 4:31
  • What changed is from store id = 0, I have 7 store id. For example, if a store has 283 categories, it must change 1981 rows
    – Brian N
    Commented Sep 10, 2019 at 4:32
  • How many entries do you've in catalog_category_entity_int WHERE attribute_id=43?
    – Sumit
    Commented Sep 10, 2019 at 4:33
  • 1
    LOL, I did it on the database test. Thank you for the answer, have a nice day Sumit
    – Brian N
    Commented Sep 10, 2019 at 5:11

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.