1.Try to use the around save method in the plugin file.
public function aroundSave(
CartItemRepositoryInterface $subject, \Closure $proceed, CartItemInterface $entity
2.After setting the custom attribute and trying to use the resource model file for saving the attribute.
3.Class Resource File for Quote Item
Please take a look on the github issue reported for 2.3.x:
And they are supposed to fix the issue on the PR below:
Please let me know if it helps you.
You don't need to use a factory for the class \Magento\Checkout\Model\Session because factories are used when we want to get a completely new object without any data inside it and then fill it with data based on something (usually an ID).
In this case, each customer will have at most one active quote stored in the session and you are retrieving this active ...
Below is the solution for Magento 2.3.5
Please override Failure.php and change public function as below,
public function execute()
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$_checkoutSession = $objectManager->create('\Magento\Checkout\Model\Session');
$_quoteFactory = $objectManager->create('\Magento\Quote\...
You can use observer sales_order_place_before so that you can add the product before saving the order. checkout_submit_before should also work, but I am not sure why it is not working for your.
in etc/events.xml add this code:
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...