Skip to main content

Questions tagged [quote]

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

Filter by
Sorted by
Tagged with
47 votes
7 answers
19k views

Price re-index causes DB deadlocks during checkout

I'm experiencing an issue where I believe the Product Price re-indexing process is causing a deadlock exception in the checkout process. I caught this exception in the checkout process: Order ...
Roscius's user avatar
  • 1,019
45 votes
5 answers
121k views

How to get all items in cart currently?

I want to get a collection of all the items in cart currently. How can I do this ? Any suggestions will be appreciated.
Sukeshini's user avatar
  • 9,955
24 votes
3 answers
17k views

Unable to load quote object

Does the sales/quote object work differently than other objects when loading? See the following.. Works: $quote = Mage::getModel('sales/quote')->getCollection() ->addFieldToFilter('...
laketuna's user avatar
  • 6,850
16 votes
4 answers
2k views

EE 1.14.2 / CE 1.9.2: Quote items not merged correctly on login (duplicate products in cart)

I found a weird bug in Magento EE 1.14.2 (also affects CE 1.9.2) with the cart. Steps to reproduce: Log in as customer A Add product X to the cart Switch to a different browser Add product X to the ...
Fabian Schmengler's user avatar
16 votes
5 answers
12k views

How to check if billing and shipping address are equal?

I'm trying to check if billing and shipping address are equal when creating invoice PDFs. What I've tried so far was: $order = $invoice->getOrder(); if( $order->getBillingAddress()->getData(...
oschloebe's user avatar
  • 926
15 votes
3 answers
45k views

Magento 2 : How to load quote by quote id

How can I load quote in magento 2 by quote id ?
Krupali's user avatar
  • 1,140
15 votes
3 answers
13k views

Copy custom data from quote to order and order item once order is placed in magento2

I am building a custom module in magento 2 that have a custom discount. I am trying to copy the discount from quote, quote item to order and order item. In magento 1, I declare in config.xml like this:...
FireKirin's user avatar
  • 151
15 votes
2 answers
2k 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 ...
Rizwan Dhuka's user avatar
13 votes
1 answer
3k views

Multiple Cart or Split Quote in Magento2

I want to show two cart for normal products and vendor products. I don't think it possible to create multiple cart either by splitting quote or creating multiple quote. Because Magento 2 separate ...
Krishnan Daiva's user avatar
11 votes
4 answers
24k views

Watching Add to Cart Event - quote item id is empty

I am trying to catch the event that fires once an item is added to the cart. I'm currently watching the following event: checkout_cart_product_add_after According to magento source this event is ...
Nuno Furtado's user avatar
11 votes
1 answer
3k 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 ...
sv3n's user avatar
  • 11.7k
10 votes
2 answers
25k views

Magento 2 : Updating quote item

I am trying to update quote item in magento2. But every time i am saving the item its creating a new item with the same quote id rather than updating it. Here is my code public function ...
Kingshuk Deb's user avatar
  • 1,214
10 votes
2 answers
5k views

Convert Order to Quote and Load to Current Cart

I can successfully convert convert an order into quote but I still couldn't load it into current cart. I tried several methods but to no avail. Here's the simplest one: $_quote = Mage::getModel('...
user1240207's user avatar
  • 1,339
10 votes
2 answers
8k views

How to get the Quote Id from Masked Quote Id (QuoteIdMask) in magento 2

I need to do something after applying the coupon code in the checkout page, So I have created the ajax call in the response of set-coupon-code.js in Sales Rule module. But I got the Masked quote Id ...
Jaisa's user avatar
  • 2,626
10 votes
1 answer
7k views

Custom Convert Quote to Order - "Cannot retrieve payment method instance"

I have seen on occasion the case where an order is placed, an authorization is made for payment on the customer card, the customer receives an order confirmation email - but no order exists in Magento'...
philwinkle's user avatar
  • 35.8k
9 votes
3 answers
2k views

Disable cart sharing between different Stores of website in Magento 2?

My website is with Three different Stores and I'd like to disable the cart sharing feature between stores. So when I switch from one store to the other store, the product in my cart shouldn't be valid ...
Rakesh Jesadiya's user avatar
9 votes
2 answers
5k views

merge guest quote with customer quote(if custommer log in) magento 2 rest api

if 2 items in cart if customer login both item should need to add cart , Both quote (before login & after login) merge and create final quote which contain all item of customer quote Refference ...
Nagendra Kodi's user avatar
9 votes
3 answers
2k 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 ...
Max's user avatar
  • 323
8 votes
1 answer
4k views

What does $quote->getIsSuperMode() mean in magento?

I see a function isSuperMode() which is called on quote and quote item objects. Can anyone tell me what isSuperMode() means in that case? I found the code in: checkQuoteItemQty function at class ...
Amit Bera's user avatar
  • 77.6k
8 votes
1 answer
6k views

Difference Between Sales Quote and Sales Quote Address

I am looking which collect_totals observer I can use. There are two observers, sales_quote_collect_totals_before and sales_quote_address_collect_totals_before. They can be found in /app/code/core/...
user1240207's user avatar
  • 1,339
8 votes
1 answer
1k 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....
Angus Fretwell's user avatar
7 votes
2 answers
10k views

Update custom column data in quote table Magento 2

I inserted a custom column in quote table like this: if (version_compare($context->getVersion(), '1.0.1', '<')) { $setup->getConnection()->addColumn( $setup->...
Hunter's user avatar
  • 1,484
7 votes
3 answers
1k views

Magento 2: quote data is not working with cache enable

I tried the below code but when the cache is disabled. it works, but when I enable cache it does not work. Overview of retrieving the data of shopping cart items, subtotal, grand total, billing & ...
Kushal Dani's user avatar
  • 2,114
7 votes
0 answers
15k views

Get shipping address in onepage checkout session [closed]

The goal is to get the shipping address (in fact only the country) currently selected by the customer in the onepage checkout process. I'm aware that quote-related data can be accessed by using ...
mkerstner's user avatar
  • 536
6 votes
4 answers
32k views

How can I get a quote id after an order is made?

Okay the question is how to get a quote id after an order is made.. and I know what people are going to say - why? Well I have some custom details being inserted into a custom table at checkout (via ...
jesus g_force Harris's user avatar
6 votes
3 answers
9k views

Magento 2 | Get number of items in cart

I am trying to get items quantity from the cart. I tried using this but it responded with unexpected results: <?php $helper = $this->helper('\Magento\Checkout\Helper\Cart'); echo $helper->...
Greg's user avatar
  • 2,729
6 votes
2 answers
5k views

Same customer places duplicate order

I've observed a strange behavior whereby a customer managed to place three orders in quick succession which had the same order numbers. Each order was based on the same quote_id which in turn ...
Moose's user avatar
  • 7,495
6 votes
2 answers
10k views

How to add custom option in quote or order item

We are trying to add custom option or custom value in quote item so that we can also get it in order item. We are able to add custom value in quote using following code but it is get returning value ...
M2 Doctor's user avatar
  • 161
6 votes
1 answer
3k views

Tier price when adding product to basket - where is it calculated?

When adding a product to the basket, where exactly is the price that appears in the quote for each item calculated? (base, special, tier...) My issue is this: I have a simple product with a tier ...
ZeD's user avatar
  • 111
6 votes
1 answer
2k views

Customer stuck in an endless loop

Problem: Some Customer (< 0.5%) got stuck in an endless loop if they visit our Shop (v1.9.2.4) or add a Product to cart. If the Customer delete the Cookies, everything works fine. Because I can't ...
Pawel's user avatar
  • 1,096
6 votes
1 answer
3k views

Why are quotes not converted to is_active=0 after checkout? M1/M2

When looking at sales_flat_quote (M1) or quote (M2) table, there are many quotes stuck at is_active=1. Even though there is a sale in sales_flat_order / sales_order. This does not seem to have a ...
willem wigman's user avatar
6 votes
1 answer
639 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 ...
Bilal Usean's user avatar
6 votes
1 answer
733 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 ...
Sunny Rahevar's user avatar
6 votes
1 answer
2k 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 ...
manini's user avatar
  • 359
5 votes
5 answers
27k views

Get quote item collection by using quote item id in Magento 2

I get the quote_item_id like this: $orderItems = $order->getAllItems(); foreach($orderItems as $orderItem){ $qouteItemId = $orderItem->getQuoteItemId(); } I need to load quote item ...
Tiny Dancer's user avatar
5 votes
3 answers
6k views

How to check if cart is empty in observer Magento 2

i created an observer before add to cart like this: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
Hunter's user avatar
  • 1,484
5 votes
1 answer
3k views

What does "setIsSuperMode" do on Quote Object in Magento 2?

I am creating a Quote programmatically, I have found a field IsSuperMode on Quote object. What effect does it have on the Quote ? Class: /Magento/Backend/Model/Session/Quote.php https://github.com/...
Milind Singh's user avatar
  • 1,594
5 votes
3 answers
3k views

How to properly get current quote in Carrier Collect Rates function?

I'm using Magento 2.4.1 and I want to retrieve the current quote in collectRates function in my Carrier model, but sometimes it will prompt an infinite loop error like this: this is how i retrieve ...
blue's user avatar
  • 128
5 votes
4 answers
3k views

Issue with quote (wrong items_count): not possible to delete products

For some of the products I got the following error while trying to delete them using the backend: SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in '([DB].q....
Fra's user avatar
  • 6,985
5 votes
1 answer
2k views

Will quote be removed after order created?

Currently when I look in database, the quote of order still exist after order successfully created. Will the order quote be removed later under some conditions? What happens to order if associated ...
Hieu Duong's user avatar
5 votes
1 answer
5k views

Magento: Quote vs Cart

I want to add dynamically new products in the cart during the checkout process, but I've no clear the differences between the Quote and the Cart. In my catalog pages I'm adding contents directly to ...
nano's user avatar
  • 317
5 votes
2 answers
5k views

Convert quote to order generating empty order

I'm changing the Magento to not save automatically orders as pending at checkout. I want to save only orders that were paid, and if it fails back to the cart with an error message in the payment. I ...
Eduardo's user avatar
  • 895
5 votes
2 answers
7k views

How to Delete Quote item Based on the condition in magento 2

I have requirement like below. I need to read all quote items and their sku, against the custom table, If value matched, need to delete that quote item and update qty 1 for remaining items but this ...
Manjunath's user avatar
  • 177
5 votes
1 answer
6k views

Get all item in cart using quote id Magento 2

Is there a way to load all items in cart, only using quote entity_id from quote table in magento 2 database?
simple guy's user avatar
  • 2,484
5 votes
2 answers
5k views

Magento 2 - How to programmatically add a product to cart multiple times but with different options?

How to add multiple items (same product ID) with different options to cart ? Following code is working for one product or different products. But, with two items of same product ID, with different ...
DependencyHell's user avatar
5 votes
1 answer
590 views

Do I really need the sales_flat_quote_shipping_rate table?

We have a very simple logic for shipping methods and prices depending on the shipping country and the subtotal. We don't depend on any external API requests for the calculation. Do we really need to ...
Flyingmana's user avatar
  • 6,137
5 votes
1 answer
9k views

Getting No such entity with cartId = {quoteId} on Guest Checkout issue

I saw several posts about this issue, with getting the following error message: No such entity with cartId = {quoteId} but none of them worked for me :( Or I didn't find exactly what is the cause of ...
Attila Naghi's user avatar
  • 4,023
5 votes
1 answer
2k 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"?> &...
nbjohan's user avatar
  • 521
5 votes
2 answers
5k 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($...
Arun Karnawat's user avatar
5 votes
1 answer
910 views

Is there any known way to create a cart item that doesn't exist as a product?

I'm going to be receiving product data from multiple 3rd-party sources in a common format. Generally, I've seen this issue handled by either creating a product for each incoming item in the user's ...
Sam's user avatar
  • 321

1
2 3 4 5
13