2

Inchoo のこのコードのように:http://inchoo.net/ecommerce/magento/magento-get-bundled-items-by-bundle-product/

$bundled_product = new Mage_Catalog_Model_Product();
$bundled_product->load(YOUR_BUNDLED_PRODUCT_ID);

$selectionCollection = $bundled_product->getTypeInstance(true)->getSelectionsCollection(
    $bundled_product->getTypeInstance(true)->getOptionsIds($bundled_product), $bundled_product
);

$bundled_items = array();
foreach($selectionCollection as $option)
{
    $bundled_items[] = $option->product_id;
}

特定の属性または属性セットで特定のオプションのみを取得する方法

4

0 に答える 0