1

I would like to list all attributes options that our products don't use. I prefer to use SQL to do that to learn how to work with it.

Right now I use this query to get the ID of my attributes

select * from eav_attribute where attribute_code = 'color_shoes';

After I list all the attributes options with this query.

select * 
from eav_attribute_option eao
join eav_attribute_option_value eaov on eao.option_id = eaov.option_id
where attribute_id = 2294
and eaov.store_id = 1;

It's here where I don't know to fetch all products based on the current list of attributes options.

What is the relation between EAV tables and Catalog products? right now in the 'catalog_product_entity' table, I have an ATTRIBUTE_ID column but there's no product with attribute_id = 2294.

Someone have hint where i need to look for?

Andhi Irawan
9821 gold badge14 silver badges28 bronze badges
asked Sep 25, 2019 at 15:53

1 Answer 1

1

I think you should review the EAV structure tutorials.

https://inchoo.net/magento/magentos-database-layout-and-its-eav-structure/

https://devdocs.magento.com/guides/m1x/magefordev/mage-for-dev-7.html

https://belvg.com/blog/eav-in-magento-2.html

Still, you required any help, let me know.

Hope this will help you.

answered Sep 25, 2019 at 18:02
4
  • thanks, i will check your link, i hope this will help. Commented Sep 25, 2019 at 20:30
  • @StéphaneBaribeau Please accept this as an answer, so it will help to someone else. Commented Sep 26, 2019 at 10:38
  • no problem, i will contact you after my test to see if everything is ok! thanks Commented Sep 26, 2019 at 14:03
  • Welcome @StéphaneBaribeau Commented Sep 26, 2019 at 16:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.