$categories = Mage::getModel('catalog/category')
->getCollection()
->setOrder('entity_id', 'DESC')
->setStoreId($storeId)
->addAttributeToSelect('name');
// For each category do
foreach ($categories as $_category) {
// Get products collection and add attributes to select
$products = $_category->getProductCollection();
// For each product do
foreach ($products as $_product) {
$storeId = 14;
$product = Mage::getModel('catalog/product');
$product->setStore($storeId);
$product->load($_product->getId());
if (is_object($product)) {
$imageObj = Mage::helper('catalog/image')->init($_product, 'image');
$urlIm = $imageObj->__toString();
$imageUrl[] = $urlIm;
var_dump($imageUrl);
exit;
}
}
}
I tried to get url's of cached product full images for store 14, but always receiving url's for store 0.
Best Answer
You can also use
Mage_Core_Model_App_Emulation
class:Note: if you use flat tables, you'll only get image path of enabled products.
Source: http://inchoo.net/magento/emulate-store-in-magento/