cancel
Showing results for 
Search instead for 
Did you mean: 

Additional options are getting removed from the quote item

Additional options are getting removed from the quote item

We have developed a custom module to add the additional options to the cart item using the observer events "checkout_cart_product_add_after" and "sales_model_service_quote_submit_before". It seems everything is working fine.

But, when we apply coupon code or enable gift options from the back-end or perform any default magento action l(like delete item, update item, etc) then new quote item id is being generated and old one has been removed. New one is being displayed without additional options we have added earlier.

This issue has been resolved in Magento 2.2 but can someone help us for version 2.1.*.

  1. Magento 2.1.7, PHP 7.0, Mysql 5.6

Preconditions

  1. Install Magento 2.1.9
  2. Create a product (simple/configurable)
  3. Add the product into the cart with some specific additional options. We have followed the steps from this https://webkul.com/blog/additional-options-cart-item-magento2/

Steps to Reproduce

  1. Apply coupon code from the cart page or enable gift options from global configuration on product level.
  2. Added additional options will be removed.

Expected result

  1. Data shouldn't be changed from the quote and added additional options should always be there.

Actual result

  1. https://drive.google.com/file/d/1Ds-JxlWostO9bU9PmLo6dKxvYUxvFR_Y/view
  2. https://drive.google.com/file/d/1px-YUpFrJtXpPcvjWPt8V5F06LDimoH6/view

Hopefully, you will get idea about the issue by above explanation. However, please let us know if you have any confusion.

Thank you in advance. Looking forward to hearing from you soon.

1 REPLY 1

Re: Additional options are getting removed from the quote item

This is also happening on version 2.3.3. When a quote item gets duplicated for what ever reason the any custom_fees or custom prices are not being pulled through to the new quote