1

i would like for the created associated simple product to show the same “base” image as the configurable product it belongs to.

I have a magento store that sells shirts and each shirt has 3-5 associated products, i dont want upload the same image for all simple products after it’s been created, It’s very time consuming.

I searched for similar issues and found a thread that suggested to add the following code in /app/design/frontend/base/default/template/catalog/product/view/media.phtml

$_parentIdArray = Mage::getModel(’catalog/product_type_configurable’)->getParentIdsByChild($_product->getId()); if(sizeof($_parentIdArray)==1 && Mage::getModel(’catalog/product’)->load($_parentIdArray[0])->getTypeId() == ‘configurable’){ $_product = Mage::getModel(’catalog/product’)->load($_parentIdArray[0]); }

after: $_product = $this->getProduct();

However the simple products are still now showing the configurable products images.

Thanks in advance!

4

0 に答える 0