Skip to content

quote

Auto Added by WPeMatico

Magento 2: Quote is null in collect() totals function immediately after a successful order has been placed?

So I am overriding collect() using etc/sales.xml <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Sales:etc/sales.xsd”> <section name=”quote”> <group name=”totals”> <item name=”somediscount” instance=”VendorModuleModelTotalQuoteTotalsWithBonusProducts” sort_order=”480″/> </group> </section> </config> Having placed an order, from the success page, I immediately go to a category page and add… Read More »Magento 2: Quote is null in collect() totals function immediately after a successful order has been placed?

Magento 2 : How to overwrite MagentoQuoteModelShippingMethodManagement

I want to make changes in function estimateByAddressId() which is public method. I tried following : app/etc/di.xml also tried in app/etc/frontend/di.xml <preference for=”MagentoQuoteModelShippingMethodManagement” type=”VendorCustomModuleModelShippingMethodManagement” /> But not succeed. Can anyone please help.

How to get current Cart_id/quote_id in plugin file Magento 2?

namespace AsmSetselleridPlugin; use MagentoQuoteModelCartTotalsItemConverter; use MagentoQuoteApiDataTotalsItemExtensionFactory; class Item { /** * @var TotalsItemExtensionFactory */ protected $totalsItemExtensionFactory; /** * ItemConverterPlugin constructor. * * @param TotalsItemExtensionFactory $totalsItemExtensionFactory */ public function __construct( MagentoCheckoutModelCart $cart, TotalsItemExtensionFactory $totalsItemExtensionFactory ) { $this->totalsItemExtensionFactory = $totalsItemExtensionFactory; $this->cart =… Read More »How to get current Cart_id/quote_id in plugin file Magento 2?