Hi,
I'm currently working on a website where we want to insert orders into magento.
Simple products are no problem to insert, only the bundle products are casting problems.
With the follow code i'm trying to add the product
PHP Code:
//$products[$i]['pakket']->entity_id = id of bundle product
$product = Mage::getModel('catalog/product')->load((int)$products[$i]['pakket']->entity_id);
$params = array(
'bundle_option' => array(),
'bundle_option_qty' => array(),
'qty' => 1
);
//get options / bundle item products
$selectionCollection = $product->getTypeInstance(true)->getSelectionsCollection(
$product->getTypeInstance(true)->getOptionsIds($product), $product
);
foreach($selectionCollection as $option)
{
$params['bundle_option'][(int)$option->option_id][] = (int)$option->selection_id;
$params['bundle_option_qty'][(int)$option->option_id][(int)$option->selection_id] = 1;
}
$result = $quote->addProduct($product, new Varien_Object($params));
Can someone help me out.
With best regards,
René
View more threads in the same category:
- Transforming Karachi's Skylines with Fiber Shades
- Unveiling the Power of E911 Solutions Enhancing Caller Identification
- List of Top 10 Interior Designers in Pakistan
- buy registered drivers license online(legitcleandocs.com)passport,IELTS certific
- Malaysia Visit Visa from Dubai
- Buy Passport,Driver License,Age & ID Card,(Whatsapp:.......: +1 (551) 239-2904) Visas
- 슬롯사이트 추천 - 인터넷슬롯링크 2024 best 온라인슬롯
- Buy Passport,Driver License,Age & ID Card,(Whatsapp:.......: +1 (551) 239-2904) Visas
- Buy Passport,Driver License,Age & ID Card,Visas and Undetected Counterfeit Money. Ema
- Buy Passport,Driver License,Age & ID Card,(Whatsapp:.......: +1 (551) 239-2904) Visas
Bookmarks