As you know, Magento supports multi-stores. I'm working with an extension that need to link a store with a specific warehouse.

For example, a store which sales furniture will be linked with a warehouse for furniture, a clothes store will be linked with a warehouse for clothes.

So I have a question, where Magento check to show products for each store? I need to rewrite this function.

Thank you.


When I read about "explanation of Magento's Store / Store View / Website layers", I saw that "Products and Categories are managed on the store level".

So where exactly the code that "manage" products and categories?

  • Magento is a module based system so the module controlling catalog/products is the Catalog module, you can find everything you want to know/read about magento catalog implementation you can find it in /app/code/mage/catalog – Haris Sep 21 '15 at 5:45

I believe you can get product collection per store by using the following command:

$productCollection = Mage::getModel('catalog/product')
  • Thank you. Do you know where exactly in Mage Core this code is used. I want to read their implementation. – Hoang Trinh Sep 21 '15 at 2:02
  • Class: Mage_Adminhtml_Block_Catalog_Category_Tree Method: getCategoryCollection() – pzirkind Sep 21 '15 at 14:48
  • Thanks. Is this the same file that will return different product collection when I choose different store view? – Hoang Trinh Sep 22 '15 at 4:41

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.