Magento: Load store specific product
Different stores can be set in Magento. A product can be made visible in selected stores.
/**
* get store id
*/
$storeId = Mage::app()->getStore()->getId();
/**
* call the Magento catalog/product model
* set the current store ID
* load the product
*/
$product = Mage::getModel('catalog/product')
->setStoreId($storeId)
->load($key);
Related posts:
- Magento: Get store information
- Magento: Get parent id of simple product associated to configurable product
- Magento: Show/Hide Demo Store Notice
- Magento: Product Edit Warning: Invalid argument supplied for foreach()
- Magento: Product is still visible in catalog and search even after changing visibility to nowhere
- Magento: How to get all associated children product of a configurable product?
- Magento: How to get product stock quantity & other stock information?
- Magento: Get category name and url from product
- Magento: Get manufacturer name and id from product
- Magento: Showing Store Selector / Switcher in header and footer
