People who code: we want your input. Take the Survey

New answers tagged

0

1.Try to use the around save method in the plugin file. public function aroundSave( CartItemRepositoryInterface $subject, \Closure $proceed, CartItemInterface $entity ): mixed { } 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 Magento\Quote\Model\...


0

Please take a look on the github issue reported for 2.3.x: https://github.com/magento/magento2/issues/14086 And they are supposed to fix the issue on the PR below: https://github.com/magento/magento2/pull/27172 Please let me know if it helps you.


0

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 ...


0

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\...


0

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:...


Top 50 recent answers are included