Questions tagged [quote]

Denotes questions related to the quote on Magento (creation, management, modification, relations)

199 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
14
votes
2answers
740 views

How to update Shipping rates using Ajax when cart item is deleted on Checkout-Cart page?

My Shipping rates are calculated based on item present in cart and now on deletion of item on Checkout/Cart page, I need to update the Shipping rates. As of now, Remove Item on Checkout/Cart page ...
8
votes
0answers
312 views

Magento 2: Observer add product to cart?

I've read some other post about adding products to cart, but nothing seems to fit. I've an observer for checkout_cart_update_items_before that adds another product in same qty if specific product is ...
6
votes
1answer
477 views

Magento 2 : How to Get Shipping Quote (Shipping Calculator) on Product Page

I want to display the Estimate Shipping and Tax section on the product page in Magento 2. Any guide how can I achieve this? I don't need the code but If you can provide any guidelines that will be ...
5
votes
1answer
1k views

Adding products to cart programmatically with custom price in controller: Magento 2

I am having a module that is creating quotes using the Magento quote module. It is using the \Magento\Quote\Model\QuoteFactory for creating the quotes. Now I have added a button "Proceed to ...
5
votes
0answers
703 views

Override tax rate on programmatically created order

I'm building an extension which imports orders created on a third-party system into Magento. The third-party system should be the single source of truth for the order's prices, tax rate, tax paid, etc....
4
votes
0answers
35 views

Unable to add multiple Products to cart in magento2

I have used below code in my controller. use Magento\Framework\Controller\ResultFactory; use Magento\Framework\App\Action\Action; use Magento\Framework\App\Action\Context; class Addtocart extends \...
4
votes
1answer
298 views

Update quote item price without using custom price

We are developing a custom module which applies custom tier prices by product category. Our solution works on frontend checkout so far and consists of observing the sales_quote_item_set_product event ...
4
votes
1answer
176 views

Prevent custom weight from being overwritten

In my Magento 2 extension I do calculate the product weight when the user adds an item to the cart. My problem is that the weight I set gets overwritten at the checkout. Cause is the setProduct() ...
4
votes
0answers
572 views

Magento-2 : How to update cart total on check-box checked/unchecked

I have one check-box just before the payment method on the checkout payment step. I need to update cart total on check-box check/unchecked. Currently system is working like once I clicked on check-...
4
votes
1answer
2k views

Magento 2 Restore Quote/Cart after order is cancelled/Failed

I am Trying to Restore Quote/Cart after order is cancelled/Failed in custom payment gateway (CCAvenue) but the problem it the quantity of item restored is doubled. protected function _cancelPayment($...
4
votes
1answer
975 views

Magento2 SOAP API for multi-store

Background: I am planning to use Magento2 web-service using SOAP. This will be for Mobile App where customer are allowed to add to cart then checkout. The store will be a multi-store website where ...
4
votes
1answer
3k views

How to get quote and update total through AJAX Magento 1.9

In cart page when postal code is entered and pressed get quote button then it submits one form and shows the rate of that postal code after that update button appears and clicking on that updates the ...
3
votes
1answer
76 views

Change quote currency before place order

I want to change my quote currency code to EUR when an order is placed in any other currency. I tried writing event and observer of event sales_order_place_before. In my observer I have this code ...
3
votes
0answers
512 views

Fetching simple product data from a quote item, based on a configurable product

In my module I want to do some things if a product in the cart has a custom attribute 'servicepack'. So by using the /etc/catalog_attributes.xml I exposed the property <?xml version="1.0"?> &...
3
votes
1answer
292 views

The right way to set/get items to/from quote

There are 3 places to store items data in the quote: \Magento\Quote\Model\Quote::$_items \Magento\Quote\Model\Quote::$_data['items'] \Magento\Quote\Model\Quote::$_data['items_collection'] \Magento\...
3
votes
1answer
1k views

How to reload the quote or cart in Magento 2

I am working on ajax cart. When i update the cart qty, I am trying to reload the quote but its not loading properly $this->cart->getQuote()->getShippingAddress()->collectShippingRates()-&...
2
votes
0answers
11 views

Why cart ID is null even though i can see the id from \Magento\Checkout\Helper\Cart

I am trying to get the cart value, i can get the quote id when i do x-debug. if i try to get the id i get NULL Anyone know why i get this
2
votes
0answers
31 views

Magento 2.3 Convert Quote from store to another store

I need to convert a quote from one store in GBP to another website store in EUR dynamically on the fly, but i can save the item with the new store_Id and the quote with the correct store_id but ...
2
votes
0answers
78 views

Get quote discount total for each applied discount/promo

I want to display each promo name and total applied for current quote in checkout/cart , right now i'm able to display the name of each promo like this: $quote = Mage::getSingleton('checkout/session'...
2
votes
1answer
298 views

How to create duplicate new quote from old order quote Magento 1.7?

I want to create a new order programmatically by copying an existing order's quote. Here is what I have tried: <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); ...
2
votes
0answers
62 views

Magento 2: How to get discount price for each cart rule in quote

I need to get all discounted price from each cart rule which is applied on current quote. I am getting applied rule ids from $quote->getAppliedRuleIds() and I am getting total discounted amount but ...
2
votes
0answers
49 views

Multiple currency not working with custom price quote - Magento 2

I created quote with custom price from Magento admin, it works fine but it does not work multiple currency. e.g) I created quote to customer with custom price $10 (USD currency), when customer checks ...
2
votes
0answers
157 views

magento 2 create virtual quote

Can we create virtual quote and copy all current quote data into it ? I wanna create a copy of quote data and remove or edit current quote data . What is best solution for this
2
votes
2answers
479 views

What is the purpose of using quote_id_mask Table?

What is the purpose of using quote_id_mask Table ?
2
votes
0answers
559 views

Magento-2 : How to set product custom price after add to cart

I have used checkout_cart_product_add_after event, for change product price. Used observer code like below $item->setCustomPrice($price); $item->setOriginalCustomPrice($price); $item->...
2
votes
1answer
396 views

Programmatically update and persist bundle option quantity

I want to programmatically update the quantity of a bundle option of a item in the users cart. Currently in the cart, a bundle with the option "12 x DIN A4 page". This is what I have done so far ...
2
votes
0answers
122 views

In Magento2 what is the place to override the quote?

In Magento2, I want to modify the Quote. I want to add some custom attributes to the items and change the order of the items. At what level should it be done, Model, Controller, Block? Please, ...
2
votes
0answers
300 views

REST API endpoint v1/carts/{cartId}/items always returns error message

Background: I'm doing all the following with an admin token, and I'm not dealing with guest carts. There are quote_item records associated with the quote in question. I've tried this with several ...
2
votes
0answers
399 views

Add product to quote when not in stock

I am trying to create a quote programmaticaly via $quote = $this->_quoteFactory->create(); $quote->addProduct($item); But it does not allow me to add a product that is not in stock: ...
2
votes
1answer
644 views

Magento 2: After login how to get current quote id?

Magento 2: After Customer Login Get Cart Information? On observer I got 2 active quote id's. I can get by latest from quote table. Is there any way to get current quote id?
2
votes
1answer
1k views

How to change Tax percentage during checkout

We would like to change the Tax percentage on my current order during checkout. Current setup: Magento 2.1.4 Magestore OneStepCheckout Current challenge: We currently ask our customers some ...
2
votes
3answers
4k views

How to get quote Id using sales_quote_collect_totals_after events

I have create a programmatically order. But when submit order sales_quote_collect_totals_after events fire before save collect totals. Here is my code : $storeId = Mage::app()->getStore()->...
2
votes
0answers
748 views

Load customer Quote Error in magento 2.1 EE

Once the customer is logged in or creating account, Load Customer Quote Error is getting. Can you please help me solve this ? Thank you
2
votes
0answers
822 views

Magento 2.x - Adding product to quote, but quote is not stored in properly

[edit: one problem solved, one remaining (details at the end of this post)] I am trying to add products programmatically to the shopping cart but have problems with storing the cart. I am using the ...
2
votes
0answers
615 views

Magento 2: DHL API Hong Kong Address Issue Due to Quote Session

When we put Hong Kong Address as shipping. Hong Kong address is saved properly. For some time we face this issue, that it's not displaying Shipping Fee. City as as Hong Kong. It's already in the ...
2
votes
0answers
398 views

Exposing custom column value in api calls

I am building a module that needs to display a second custom price value at all times. I have solved most of what this entails but got stuck with the quite item. So far i added a column in the quote ...
2
votes
0answers
171 views

Replacing current quote with a stored Quote

Background: There is a store with two sites and shopping cart has to be shared among the two. To facilitate this, I set a field in session and store the quote-id in it. When we switch store, the ...
2
votes
1answer
3k views

Can't Access Quote from checkout session after returning from payment Gateway

I am building payment gateway extension and i am facing small issue to get the quote object after control return from payment Gateway. Let me explain you in detail. I am using below funtion to ...
2
votes
0answers
651 views

How to apply custom shipping rate dynamically(on cart and checkout)?

I need to apply free shipping rate to a quote on the fly, once some condition is met. This condition can change when subtotal changes or user logs in/out. Once applied I'd like it to persist from cart ...
2
votes
0answers
394 views

Separate Checkout Flow in Magento bypassing Cart/Quote

I have been researching this for a while, did not find anything related to this anywhere. Situation: Our client sells Groceries on his Magento store. We have implemented Store Credit feature ...
2
votes
0answers
198 views

How to change product price in multishipping quote?

I am working in one module where I need to set my custom price replacing product price in multishipping quote. Price changed successfully on cart page and onepage checkout, but in multhishipping it ...
2
votes
1answer
2k views

Quote with no items - add to cart error

I'm facing this strange issue on add to cart action: sometime after I checkout (with a registered customer) correctly my order, if I try to purchase another item I got the following error: Call to a ...
2
votes
0answers
260 views

Delete all orders and quotes of customers that do not exist anymore

On our testing environment we are constantly creating new customers and also (mass) removing them again, currently only having 12 customers. Now after a while our sales_flat_order (5038 rows) and ...
1
vote
0answers
26 views

Updated address not reflecting at Checkout in Magento 2

I have customized the Checkout, Where I split the checkout into 3 steps. Cart section. Shipping Payment. In the Shipping section, I am showing the customer address details with an edit button to ...
1
vote
0answers
16 views

Selected payment method in quote not get changed to default when reload the onepagecheckout in magento 2

I am having two payment methods Online payment and COD in Magento 2. But the default one is an online payment. When I reload the page, the online payment option gets selected by default(even if I ...
1
vote
0answers
26 views

How to display data from 2 tables that already have data on Magento 2.3

How to display data from two tables quote_item and sales_order_item from the database to .phtml file. Can anyone help me step by step, I am new to Magento, if someone can help me, it's very useful ...
1
vote
0answers
18 views

How to transform a quote into an order from CALLBACK HOOKS, MAGENTO 2.3

I'm trying to integrate a payment gateway. And they provide a callback hooks i've set for them to return me the CartID (Quote's entity_id). But from here on, it feels like it isnt right for me to ...
1
vote
1answer
36 views

Efficient method to load/get and assign multiple custom options/attributes from quote item?

Is there a more efficient way to load and assign quote item custom options/attributes? This is code in my Observer: public function MyFunction(Varien_Event_Observer $observer) { $QuoteObject = Mage::...
1
vote
0answers
54 views

Magento 2 Remove cart content when user log-out | Empty cart when logged back in

Correct me if I'm wrong, but completely removing the cart content on customer log-out is not native to Magento 2 is it? I read about the "Persistent cart" but it seems to work only for removing the ...
1
vote
1answer
25 views

how can we access customer session in checkout

I have one special field called some_id in customer data and I want to save the some_id and quote_id in database. I am using sales_quote_save_afterevent to save both ids. But my customer session is ...