Magento 1.8Magento - 链接可配置的产品图像,以简单的产品图像
我有一个可配置的产品与几个简单的产品。这些简单的产品需要与可配置产品具有相同的产品图像。由于我不想上传到每个简单的产品,有没有办法将可配置产品的产品图像链接到简单产品?
原因是因为我有一个ajax产品添加了弹出窗口,它有一个缩略图,它从简单的产品中拉出图像,同样也在购物车页面中。
我都试过后$_product = $this->getProduct();
$_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]); }
将在app\design\frontend\<pachage>\<theme>\template\catalog\product\view\media.phtml after $_product = $this->getProduct();
下面的代码,但它不工作。有人有这个想法吗?