Hot answers tagged

2

This is a work around use Plugin instead of Observer. Vendor/Module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Sales\Api\OrderRepositoryInterface"> <plugin name="...


1

You need to do code like this one. $qty = 1; $quote = $this->quoteFactory->create()->load($quote->getId()); $product = $this->productRepository->getById($product->getId()); $magentooptions = array(5=>"1",23=>"2",32=>"3"); $par = array('product' => $product->getId(), 'bundle_options' => array(1 => $...


1

There are two options to get is_active quote. 1) Load checkout session and get active quote id and base on that id you can load quote. protected $_checkoutSession; public function __construct ( \Magento\Checkout\Model\Session $_checkoutSession ) { $this->_checkoutSession = $_checkoutSession; } public function execute(\Magento\Framework\...


Only top voted, non community-wiki answers of a minimum length are eligible