Reputation: 1458
I would like to issue to a SQL query to retrieve the active categories from my magento store. I am currently issuing the following query, but its returning the non active categories as well:-
SELECT entity_id, name, url_path FROM catalog_category_flat_store_1 WHERE level >=3 ORDER BY catalog_category_flat_store_1.parent_id ASC, catalog_category_flat_store_1.position ASC
Upvotes: 0
Views: 5064
Reputation: 27119
I may be missing something here, but have you tried limiting by is_active
in your query?
select entity_id, name, url_path
from catalog_category_flat_store_1
where level >= 3 and
is_active = 1
order by parent_id asc, position asc;
Upvotes: 1