I want to change each and every selected bundle items price on addtocart
How can I do this.
At present I am doing like below :
$item = $observer->getQuoteItem();
if ($item->getParentItem()) {$item = $item->getParentItem();}
$item->setCustomPrice(10);
$item->setOriginalCustomPrice(10);
$item->getProduct()->setIsSuperMode(true);
By doing above, it only change Parent Bundle product Price.
Please check screenshot :
So is there any posibility to change price of bundle items with custom price which will display properly even after order place in order view page. I have go through the code and find that "Bundle Items's" price are saved in infobuyrequest.
$sel_bundle_options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
$sel_bundle_options['bundle_options'];
So is it possible to change price directly into that ? But after placing an order if we check on order view pages,it will display.