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!

2
  • try this webmasterbulletin.net/2010/08/… May 10, 2012 at 23:13
  • @OğuzÇelikdemir thanks for the attempt but that thread refers the images changing based on selecting an associated product option. In my case the images for all the products will always be the same as the main configurable product. All i would like is when i create associated products i want it to pull the images from the main configurable product without having to manually adding them myself. Thanks May 10, 2012 at 23:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.