0

We are bulding a new M2 Shop and I need to get all Attributes from our M1.4.1.1 using SQL. The Attribute Options are no problem.

So far I found this code which works great but it only has a few values.

select * from eav_attribute where entity_type_id IN (select entity_type_id from eav_entity_type where entity_type_code = 'catalog_product')

It seams that the "Shop Options" (maybe wrong translation) are missing like (Use in Quick search, Use in Advanced Search, Comparable in Shop, use in Filternav, Use for promo...) M2 has simular options which are called "Storefront Properties".

1

The missing options that you are missing are stored in catalog_eav_attribute. So if you join your existing query based on attribute_id, it will return everything that you might be looking for. Also, the attribute_code that is returned from your subquery is 4, so I replaced that section to make the query easier to understand & more efficient.

select *
from eav_attribute ea
join catalog_eav_attribute cea
on ea.attribute_id = cea.attribute_id
where ea.entity_type_id = 4;

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.