Skip to content

quote

Auto Added by WPeMatico

Magento 2 How to update quote totals information from admin

Magento 2.4.5-p1 version using. We want to give custom discount via our custom module Using this code – <?php namespace NamespceModulenameControllerAdminhtmlQuote; use MagentoBackendAppActionContext; use MagentoFrameworkControllerResultFactory; use MagentoQuoteApiDataShippingAssignmentInterface; use MagentoQuoteApiDataTotalItemInterface; use MagentoSalesRuleModelRuleFactory; use MagentoSalesRuleApiRuleRepositoryInterface; use MagentoQuoteModelQuoteAddressTotal; use MagentoFrameworkAppResourceConnection; use MagentoFrameworkDBTransactionFactory; class… Read More »Magento 2 How to update quote totals information from admin

Magento 2 : Save quote

What is the Difference between $this->quoteRepository->save($quote); & $quote->save(); In below code public function aroundApply_shipping( StripeIntegrationPaymentsApiService $subject, callable $proceed, $address, $shipping_id = null ) { if (empty($this->checkoutSession) || empty($this->checkoutSession->getQuote()) || empty($this->checkoutSession->getQuote()->getId())) { $writer = new ZendLogWriterStream(BP . ‘/var/log/methodcallcheck.log’); $logger = new… Read More »Magento 2 : Save quote

Magento 2 : Graphql setShippingAddressesOnCart default query duplicates the addresses in quote_address table

I’m using Magento version 2.4.5-p1 And I’m trying to setShippingAddressesOnCart using graphql for logged-in customers. This is the default Magento query I’m using but it’s duplicating the data for the shipping address in quote_address, For Example, If I setShippingAddressesOnCart query… Read More »Magento 2 : Graphql setShippingAddressesOnCart default query duplicates the addresses in quote_address table

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.