guys !
How can i list all categories with related products in them (i need the SKUs). Where is the relation table for catalog_category_entity(or varchar) and catalog_product_entity(or varchar). ?
I can use only SQL.. because i don't know php. Thx !
Best Answer
The category product relation table is
catalog_category_product
. It contains the category id and the product id its related to. Also there is the position columnposition
which determines the order in which the products are fetched.So to get the product SKU you need do a join with the
catalog_product_entity
which has the SKU's for the products.So something like
should help you get the SKU's against the product ids. And of course you can replace the
SELECT *
with only the fields you like to have.Hope this helps !!