magento add product in multishipping quote

546 views Asked by At

In multishipping, I have to allow giftwrapping, when user selects any wrap for any quote of multishipping, I have to add a wrapper product for that particular quote. I have used checkout_controller_multishipping_shipping_post event and got the quote.

Now when I use $quote->addproduct($wrapperProductObject) it does add this product in db table but doesn't show on order(s) review page until I go to cart page and come again.

Is there is way to add a product in quote after mentioned event and it shows on order review page.

1

There are 1 answers

0
murtza gondal On

I don't know why magento has another table for address items instead of having a field in quote_items table. Anyway the answer of my question is we need to update quote_address_item table as well.

Below code works fine for my problem.

$item = $quote->addProduct($wrapperProductObj, $qty); $quote->save(); //need to add item in quote_address_items table. $address->addItem($item);