Questions tagged [quote]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Add product point to quote, order and invoice magento 2

I have a voucher point custom attribute for each of my product. I need to keep track of this point across each quote_item, sales_order_item and sales_invoice_item (Meaning i need a voucher_pts ...
1
vote
0answers
21 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 ...
2
votes
1answer
620 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?
5
votes
2answers
63 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 ...
0
votes
1answer
663 views

Bundle product in quote

Would be someone please be so kind and explained me structure of bundle products? I need to retrieve products in quote no matter if they belong to bundle or not, but if I get bundle product's item, ...
0
votes
0answers
14 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
1answer
23 views

How to get product price from \Magento\Quote\Model\Cart\Totals\Item $item

I need to get the product price from \Magento\Quote\Model\Cart\Totals\Item $item. I tried this but it doesn't work /** @var \Magento\Quote\Model\Cart\Totals\Item $item */ $item->getProduct()-&...
0
votes
0answers
12 views

Set discount amount for each quote item during place order in Magento 2

I have a requirement like below. Create order progrmmatically. Order is getting created successfully I used below code. //$orderData = $this->getOrderDetails($customerServiceProductDetails); // ...
0
votes
1answer
32 views

set discount amount while creating order progrmmatically in magento2

I am creating order pro-grammatically. I have referred below code https://www.rakeshjesadiya.com/how-to-create-order-programmatically-in-magento-2/ My requirement is to set discount amount for each ...
2
votes
2answers
2k views

Magento2: Programatically update cart via event

After controller_action_predispatch_checkout_cart_index event dispatcher i am trying to update quote in cart page.All working fine except price.The price is not getting updated quote and quoteitem ...
0
votes
0answers
20 views

magento 2 remove shipping amount from cart total

I want to remove shipping amount from cart page because we do not provide estimate shipping amount calculation block. Also, when customer add product to cart then its display grand total without ...
1
vote
0answers
15 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
1answer
22 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/...
2
votes
0answers
8 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
0
votes
2answers
52 views

Fatal error: Uncaught Error: Call to a member function getQuote() on null

I'm trying to get store information from Shopping cart page To do so I have created a module Following is my block file <? namespace Magento\History\Block; class ViewQuote extends \...
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 ...
0
votes
1answer
729 views

'Exception' with message 'Quote totals must be collected before this operation.'

I have create a programmatically order and set programmatically discount amount but i have getting error when submit order. Here is exception message : DEBUG (7): ====ex==exception 'Exception' with ...
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 ...
0
votes
2answers
715 views

Get cart contents from my custom module

In my magento, I have added a product to cart - so I see the following on the checkout page: I have a custom module with a TestController with a IndexAction where I want to retrieve the current ...
0
votes
2answers
852 views

Problem with quotation marks on PHP export

I could use your help once again... I'm currently building a php export to hand our products off to a comparison website. One of their requirements is that every string is wrapped in double quotes. I'...
0
votes
1answer
39 views

Magento2 : Which Magento Event for Update cart quantity only?

I have work on the task in which I need to handle quote item, here I have use two event checkout_cart_add_product_complete checkout_cart_update_item_complete here it work fine, But when I ...
1
vote
0answers
17 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 ...
9
votes
1answer
984 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 ...
4
votes
0answers
32 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 \...
2
votes
0answers
29 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 ...
0
votes
1answer
7 views

SetBillingAdress not working (prog) on quote

I'm creating orders programmaticaly but my billings address are not updating. I can set the shipping address that I want (another from the connected user) but the billing is still the one from the ...
0
votes
0answers
14 views

Why is guest customer billing information NULL - Magento 2 checkout and quote?

I'm trying to get guest customer billing information during the checkout session as I need to save it to the quote before redirecting to placeOrder but the billing information is always null. How do ...
0
votes
1answer
742 views

Admin order update price programmatically in quote loop

I have a bit of custom pricing that needs to be carried out for each product in an order which alters the end price of the item. I am using an observer with the sales_quote_item_qty_set_after event ...
0
votes
2answers
766 views

How to get information about product in cart

I want to get information about product in cart such as customer_firstname, customer_email. I use this code: $carts = Mage::getModel('checkout/cart')->getQuote(); foreach( $carts->...
0
votes
1answer
40 views

Unique constraint violation found when creating order programmatically

I've been trying to create an order programatically in Magento 2.3 and the order is created but my code dies and I get the error : "Unique constraint violation found". What do I need to add or change?...
0
votes
1answer
17 views

Update all quote items with qty 1 in magento2

I am trying to update all the quote item qty as soon as we navigated to the cart page. by using below code. $quote = $this->checkoutSession->getQuote(); $quoteItems = $quote->...
0
votes
2answers
39 views

How to adding Custom Attributes to Magento 2 Quotes and Orders

I have followed this: https://www.siphor.com/adding-custom-attributes-to-magento-2-quotes-and-orders/ It works well when creating custom attributes and adding data quote but after checkout, quote ...
0
votes
2answers
44 views

Magento 2 add to cart programmatically not working

Here am have a custom api at that API call am trying to add a product to cart but am not getting it. namespace Vendor\Cart\Model; use Magento\Framework\Data\Form\FormKey; use Vendor\Cart\Api\...
2
votes
1answer
191 views

Set old quote Magento 2 cart

I'm trying to load/set/restore an old quote from a customer when they log in, but the thing is not that simple, because it turns out that I'm using Cminds Multi User Account Extension, and the project ...
0
votes
1answer
26 views

Quote Item level manual Discount - Magento 2

I need to give Quote Item level manual Discount for selected cart items. After giving discount Cart Item row total will change. As can't modify the product price so custom price solution is also not ...
2
votes
1answer
24 views

Magento 2 - Share customers but not cart between multiple websites or stores

We have a Magento 2.2.8 multi-store setup with 3 websites. One has 2 stores which allows us to share customers between them. However I don't want to share carts between the stores (different ...
0
votes
0answers
24 views

Override PlaceOrder and change Grand Total

I am modifying the placeOrder function of the QuoteManagement class, based on some information I found through searches, I was able to change the method so that an order is generated for each seller, ...
3
votes
1answer
35 views

How to rewrite QuoteManagement in magento 2

I'm trying to extend the class "QuoteManagement", but when I try to make the payment, an error is returned. My code: di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/...
0
votes
1answer
1k views

Magento 2 : How Can I Update Quote Total

I am creating functionality for additional donation. I am trying to add donation amount in quote total but it will not reflect. This my code portion of that part : <?php namespace ...
0
votes
2answers
104 views

How to add quote to customer in magento2

I want to set custom pricing for magento2 product through API . I googled for the same and tried to implement the solutions one by one. But no solution is worked out. $cartId = $this->...
1
vote
1answer
19 views

Custom product option not added in quote (prog)

Hi I'm creating a quote manualy. This quote contains a virtual product (so related to a configurable product). My quote is submitted, but the options from the parent product is not added to the ...
0
votes
1answer
15 views

How to get quote details in helper

I want to see if there is anything exists in the cart if I am in a phtml page I have tried to use session and cart but I am getting null When I tried to use session I wasn’t sure how to get the ...
0
votes
1answer
10 views

How can I get all data from cart

Is it possible to get check if cart has any product been added in. I want to check if a product been added to the cart in a phtml page. If the user click the page I want to show how many product they ...
2
votes
1answer
54 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 ...
1
vote
1answer
59 views

Checkout Cart page shows 503 error

I am using Magento 2 website. I got the error like following when redirecting to checkout/cart page. Once deleted all the products in cart and tried to add all the products again and its seems to be ...
0
votes
1answer
35 views

Add options to quote programmaticaly

I'm creating quote and order programmaticaly. I can't figure out why options product are not added to my order / quote. See : $superAttr = $item["super_attribute"]; if(!empty($superAttr)){ $...
1
vote
1answer
32 views

How to delete cart Item by SKU or productId in magento 2

I have retrieving all cart items and deleting the quote item by match with the product Sku, Here is my code. protected $checkoutSession; protected $_itemModel; protected $cart; public function ...
0
votes
1answer
1k views

Extract total tax amount from Quote when using TaxJar

I have run into an issue with a Magento 1.9 instance that uses TaxJar. I am trying to extract the total tax on the Quote. With a standard Magento 1.9 instance, I can get the total tax as follows $tax ...
1
vote
1answer
1k views

How to save order comment programmatically in magento2?

1)I'm creating custom order comment text box in sales->order->create new order . 2) Created order_comment column in sales_ order grid/quote. 3) I need to save order comment text box value into db....
0
votes
0answers
8 views

Add option on product quote

How do I add option to product quote ? $quote=$this->quote->create(); //Create object of quote $quote->setStore($store); //set store for which you create quote $customer= $this->...