The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [quote]

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

Filter by
Sorted by
Tagged with
47
votes
7answers
17k 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 ...
44
votes
5answers
112k 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.
23
votes
3answers
15k 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('...
16
votes
4answers
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 ...
16
votes
5answers
9k 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(...
15
votes
3answers
9k 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:...
15
votes
2answers
814 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 ...
11
votes
4answers
23k 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 ...
10
votes
2answers
4k 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('...
10
votes
1answer
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'...
10
votes
1answer
964 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 ...
9
votes
2answers
17k views

Magento 2 : How to load quote by quote id

How can I load quote in magento 2 by quote id ?
9
votes
2answers
10k 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 ...
9
votes
2answers
1k 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 ...
9
votes
0answers
365 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 ...
8
votes
1answer
3k 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 ...
8
votes
1answer
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/...
7
votes
2answers
4k 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->...
7
votes
2answers
380 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 ...
7
votes
0answers
13k 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 ...
6
votes
4answers
23k 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 ...
6
votes
2answers
4k 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 ...
6
votes
1answer
514 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 ...
6
votes
0answers
713 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....
5
votes
4answers
2k 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....
5
votes
2answers
4k 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 ...
5
votes
1answer
2k 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 ...
5
votes
1answer
366 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 ...
5
votes
1answer
3k 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?
5
votes
1answer
1k 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 ...
5
votes
2answers
95 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 ...
5
votes
1answer
712 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 ...
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
1answer
3k 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
2answers
10k views

Get all abandoned carts in Magento

How could I get all the abandoned carts with customer's email (programatically)? What does Magento consider as being abandoned? Not updated in the last day?
4
votes
1answer
5k views

Add a column to quote item table

I want to add a column to the sales_flat_quote_item (and ..._order_item) table through an install script, but when I go to the table sales_flat_quote_item (or ..._order_item) in my database - the ...
4
votes
2answers
4k views

How to run a query to deactivate quotes as Magento code?

I need a Magento code query to set all quotes to Not active. How do I write this query as a Magento code? UPDATE `sales_flat_quote` SET `is_active`=0 WHERE `customer_email`='user@gmail.com'
4
votes
1answer
434 views

Quote: getOrigOrderId vs. getReservedOrderId

Considering the class Magento\Quote\Model\Quote: What is the difference between the following two methods: getOrigOrderId getReservedOrderId Thanks .......................................................
4
votes
3answers
9k views

Getting an item from quote object

I have extended Mage_Checkout_Model_Type_Onepage class via my custom module and overriding saveOrder() method. All this code is written inside saveOrder() method. I am trying to get every item from ...
4
votes
1answer
3k 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 ...
4
votes
2answers
796 views

Magento 2 : specific product remove from quote

I set product's expire time in my custom module. When, product is expire at that time that specific product should be remove from quote. I used event layout_load_before for that. Because, this code ...
4
votes
3answers
7k views

Retrieve Quote Item ID after added to the cart

I am running an observer on Magento 1.9 on the following event: sales_quote_merge_after This event occurs when a guest customer with items in their cart logs into their account. When doing this the ...
4
votes
4answers
5k 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 ...
4
votes
1answer
1k views

Why error message added via the `$quote->addErrorInfo()` don't show up in the shopping cart?

Why error message added via $quote->addErrorInfo($type, $origin, $code, $message) don't show up in the shopping cart even though it adds the message to Mage::getSingleton('core/message')->...
4
votes
1answer
4k views

Remove taxes from quote item programatically

For an US webshop, I need to remove taxes from a quote item for some customers. I can't use groups because there are in use for a loyalty program. I have added a customer attribute names "...
4
votes
1answer
2k 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 ...
4
votes
2answers
5k views

How to create quote and order programmatically in Magento2

I try to create an order programmatically in magento2 using this code snippet found on webkul.com this is the order that i want to create: $tempOrder=[      'currency_id'=> 'USD',      'email'=&...
4
votes
2answers
4k views

When Quote id generated in magento?

When Quote id generated in magento? Is it generated: when customer got registered or when customer adds product to cart. I have gone through many article but there is no clearance on it.
4
votes
1answer
540 views

Adding products to cart programmatically, sets item's price to zero. First time Only

Certain products I have in my store have an attribute called setup_fee_sku. If the product has this attribute I grab the value (which is a sku) load it, and add it to the cart programatically. But ...
4
votes
1answer
211 views

How to get “address_id” from quote?

I'm trying to get address_id of sales_flat_quote_address table as mentioned in attached image from quote during multi-shipping checkout process but no luck. I want to use that address_id in following ...