Questions tagged [quote]

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

225 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
1answer
603 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 ...
7
votes
0answers
738 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....
6
votes
1answer
582 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
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 ...
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
1answer
219 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 ...
4
votes
1answer
723 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
233 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
692 views

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

Magento2 - in checkout page, 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 ...
4
votes
0answers
591 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"?> &...
4
votes
1answer
1k 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
0answers
54 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 ...
3
votes
0answers
110 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 ...
3
votes
1answer
354 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
2k 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()-&...
3
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
96 views

Add product with customized option in the cart through API

I'm having a problem adding a product with custom options in the Magento cart 2.3.1. After defining a custom option as multiple selection, I tried to add the product to the cart with the following ...
2
votes
0answers
26 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
191 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
643 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
186 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
256 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
0answers
600 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
0answers
906 views

How to Refresh/reload Magento 2 Quote Object in checkout session/page

TLDR How can we reset or refresh or reload the quote session/cache key with the shipping address collection that belongs to it in Magento 2 checkout page. Lengthy/Confusing Explanation We are ...
2
votes
0answers
303 views

Magento 2 add customer address attribute to REST APIs response?

I have created customer address attribute "city_id" with setup script. I am able to save the value. but want to display the city_id field to the below apis json response. how we can we add city_id in ...
2
votes
1answer
458 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
155 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
357 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
1answer
33 views

Is Quote Necessary when creating order Programatically

I have integrated a third party API in which I have to create order to maintain sync from both the stores. My question is do I have to create quote first and then order? Is it necessary to create ...
2
votes
0answers
506 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
1k 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
2k 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
1answer
1k 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
1k 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
701 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
414 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
188 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
0answers
697 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
511 views

Original Price is not sets in programmatically order

I try to place order programmatically but i have many problems during add items but now i have only one problem. $produt is my product , $qoute is my qoute. $item = $quote->addProduct($product, ...
2
votes
0answers
401 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
215 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
269 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
39 views

Set quote.shippingAddress() , after adding new billing address in checkout form magento 2

Need to Set quote.shippingAddress() , after adding new billing address in checkout form magento 2 in js file. Actually quote.shippingAddress() gets null after adding new billing address. That's why i ...
1
vote
1answer
52 views

Magento 2 How to get quote in collect rates custom shipping

I need to get a current quote from my custom shipping model: public function collectRates(RateRequest $request){ $quote = $this->getQuote(); // how???? } how can I achieve this in checkout ...
1
vote
1answer
17 views

Empty the Cart items but keep the quote and quote items

I have added a button on cart page. Clicking on the button the cart items should get deleted but the quote should not be erased.
1
vote
0answers
18 views

quoteCartRepositoryV1 serach by nested field

I would apply searchCriteria to /V1/carts/search in order to get all carts which contain specific sku. I've performed this query https://shop.dicanio.it/rest/all/V1/carts/search?[filterGroups][0][...
1
vote
1answer
11 views

Add some information in additional_options of quote_item_option table while adding item to quote while creating order from backend

I want to add some information in additional_options of quote_item_option table while adding item to quote while creating order from backend. For this purpose I need an event that called after adding ...

1
2 3 4 5