Questions tagged [quote]

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

Filter by
Sorted by
Tagged with
-1
votes
0answers
25 views

Item not deleting from quote in Magento2

I have used observer to delete the quote item. Used this event controller_action_predispatch_checkout_index_index This is the code of my etc/events.xml. <event name="...
0
votes
0answers
16 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 ...
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
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 ...
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 ...
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 \...
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
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 ...
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
30 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 ...
5
votes
2answers
68 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
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
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\...
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
36 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/...
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
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 ...
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 ...
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 ...
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
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->...
0
votes
0answers
12 views

Edit quote qty but price incorrect for mutiple products

I would like to update quote from a order. When I update qty of a item from quotes it make correct subtotal and tax. However, when I update great than 2 items then subtotal and tax get last data ...
3
votes
3answers
140 views

Magento 2 - Cart empty after successful payment

I have a custom payment method, after successful payment; payment page return to a controller where it updates order status and truncate current cart items like this: $this->quote->load($orders-...
0
votes
0answers
70 views

How to merge guest cart into customer cart manually using REST API

I need to create a REST API which merges guest cart into customer cart. The body of this API request is, Body { "customer_id": "15", "guest_cart_id":"4563535gggy9mcw857yn9cwu578o3u" } The ...
1
vote
1answer
35 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
37 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
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 ...
1
vote
1answer
24 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 ...
2
votes
0answers
37 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'...
4
votes
1answer
252 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 ...
0
votes
1answer
32 views

magetno 2 convert quote to order

Magento 2 I have quote data but order not created transaction completed all done but order not created.So I am trying to create order by using quote data. Can we convert quote data to order by ...
0
votes
1answer
41 views

How to get the custom attribute of products from the cart?

There is an attribute in the product AllowSameDayDelivery how can I get it out of the product? I got the products ids from the cart, But how do I get the attribute now? <?php namespace Ronis\...
1
vote
2answers
121 views

How to update record using multiple conditions in CollectionFactory magento 2

I am trying to update the record but it creates a new record. Collection factory <?php namespace Webkul\Mpquotesystem\Block; use Webkul\Mpquotesystem\Model\ResourceModel\Quoteconversation; ...
0
votes
0answers
100 views

Magento 2.3: get cart items inside the cron file

I want to get current quote data for cronjob in cron/run.php But my code it's not working. Magento2 version is CE 2.2.6. Here is my code <?php namespace ABC\Abandon\Cron; use \Psr\Log\...
0
votes
1answer
34 views

How to stop merging of non-loged-in cart items when customer logs-in?

I do not want to merge cart items if the user has items in cart and logs into the site. Let's go through the scenario: User logs in and adds one item to cart and logs out from a site. Now as a ...
0
votes
0answers
38 views

Magento 2.2.6- After Migration all default Payment Methods are not working fine

After migration from Magento 1 to 2 default Payment Methods Paypal, Braintree and Authorize.net are not working. They are displayed in the checkout but when we place order through those methods ...