Currently am using magento 2.2.5,

while adding the product to the cart the custom options values are stored in the quote_item_option table correctly.

while updating the custom options programmatically it has not changed in the quote_item_option table and doesn't throw any exception.

Please guide me with the proper solutions.


Without understanding what exactly you want to achieve with your change of option value: If you just want to modify the value of an already set option, I guess you can simplify your code in _saveCartItemEngravingOptionValue.

Remove the line $cartItem->setOptions($options)->save(); (the option is already in the cart item) and just call save on the specific option object:


That should save the changes if you get into that part of the code (I would suggest to add some logging to your code, to see if that is the case).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.