<?php foreach ($collection as $_product){ ?>
$bundleIds = Mage::getResourceSingleton('bundle/selection')->getParentIdsByChild($productId);
/*************************Bundled product id*******************************/
$parentid=$bundleIds[0];
$_newProduct = Mage::getModel('catalog/product')->load($parentid);
} ?>
$bundleIds = Mage::getResourceSingleton('bundle/selection')->getParentIdsByChild($productId);
/*************************Bundled product id*******************************/
$parentid=$bundleIds[0];
$_newProduct = Mage::getModel('catalog/product')->load($parentid);
} ?>
No comments:
Post a Comment