Questions tagged [quote]

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

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

Magento 2: Is it no longer possible to load Quotes by ID?

In the past, to load a quote by id, i used to use the factory: protected $quoteFactory; public function __construct( ... \Magento\Quote\Model\QuoteFactory $quoteFactory, .... ) { .......
0
votes
1answer
24 views

Magento2 adding bundle product to existing quote not working

I want to add bundle product with its required options in existing quote in admin,i have added following code to add products to existing quote, its working fine for simple product but bundle products ...
0
votes
1answer
20 views

Create order from quote with existing payment method, but do not place payment?

I am working on a webhook endpoint that will take quotes and turn them into finished orders. As part of this, I want to set the quotes payment method to a custom existing payment method, but I do not ...
0
votes
0answers
38 views

Magento 2 : How to retrieve 'custom quote params' from quote object after order placed

I want to retrieve custom params saved in the table: "quote_item_option" I have built an observer to capture the purchase event and also to retrieve the quote object i.e public function execute(\...
0
votes
1answer
19 views

How to get is_active column value from quote table ? Magento2

I want to get the value of the is_active column through the method $this-> getQuoteCollection ($customerId) -> getLastItem (), I used getColumnValues('is_active'), but it doesn't return the last ...
0
votes
2answers
34 views

Magento 2: Create order from quote without quote submit

I want to create order from quote programmatically without submit quote. Because if customer redirect to failure page then we have one button like Make payment which redirect to customer on checkout ...
0
votes
0answers
14 views

How can i set new attribute from quote item

I added a new column into sales_order_item i created programaticly order create and i would like to use this column in the order as attribute. This code add items to quote. Quote use sales_order_item ...
0
votes
0answers
13 views

API returns quote totals data for a specified cart not properly working

I'm using rest API of Magento ver 2.2.8 to develop a mobile app base on Reactjs. Steps to reproduce Place order via API (carts/mine/payment-information) Create a new quote (carts/mine) Add product ...
0
votes
1answer
51 views

Restore quote in magento2

I have canceled the current order like use Magento\Sales\Model\OrderFactory; $order = $this->orderFactory->create()->loadByIncrementId($order->getIncrementId()); $order->cancel()->...
0
votes
1answer
16 views

Magento 1.9.X: How to assign data to quote?

I need to assign data to quote, how can I do this?
1
vote
2answers
41 views

How to add out of stock product to cart programmatically in Magento 2.3

I'm using Magento v2.3, I want to add out of stock products to cart without changing any configuration from backend. I'm using following function to add product to cart addProduct($productInfo, $...
0
votes
0answers
20 views

Magento 2: Billing address same as shipping doesn't work while changing the shipping method

So I have 3 shipping methods on my checkout page, Shipping Method Free Ground Shipping- $0 2-Day Shipping - $15 Overnight - $35 By default, the first one Free Ground Shipping- $0 is always ...
1
vote
1answer
35 views

How do I add a api created guest cart to active guest user or how to get quote ID from active guest user

I have a Magento store and a Wordpress website on the same domain, I want to view edit add and delete products from both sites. So far I've been able to get the products from the local storage and ...
2
votes
2answers
65 views

Magento 2: Change quote currency code before place order with Observer

I am trying to change the quote currency before placing any order. I have used below event for that. Vendor\Module\etc\frontend\events.xml <event name="sales_model_service_quote_submit_before"&...
0
votes
1answer
21 views

Getting a list of basket items in Magento 2.3

I am trying to get a list of products in the basket. I have the following in my class public function __construct(\Magento\Quote\Api\Data\CartInterface $cartInterface) { $this->...
0
votes
1answer
24 views

How to check if a sales rules coupon is allowed

I'm trying to know how can I check if a sales rules coupon is allowed for a quote in magento 1.9. Here the scenario : I have a few active rules in my shop and I would like to check if one of them is ...
1
vote
2answers
35 views

Magento 2.3 How to get Quote Data on product detail page

i want to get this quote data on product page but that not return any data ... only return below array instead of all quote data On other page it working fine issue only on product page. array(4) { ...
0
votes
1answer
21 views

Magento which model is correct for getting the quote in the cart?

I have tried every different combo of model that returns a quote in order to try and find the one that has the quote for the current customer's cart. So far none of them work, and I can't figure out ...
2
votes
1answer
105 views

Customers Cannot checkout as guest in Magento 2.3

Several of our customers have complained that they cannot checkout as a guest. The issue seems to have started around the time we upgraded to Magento 2.3.2. I have tried to checkout as a guest ...
0
votes
1answer
25 views

Get Last Added Product ID of Cart without using checkout session

I am using RESTful APIs of Magento and I want to get the last added product id of in the cart. All of my searches are using the Checkout Session method of Magento which is $this->checkoutSession-&...
0
votes
0answers
31 views

Magento 2.2.3 How to change GrandTotal

var billingAddress = quote.billingAddress(); var billingCountryId = (billingAddress.countryId); // console.log(billingCountryId); console.log({billing: ...
0
votes
0answers
80 views

Apply discount amount on cart line items in Magento 2

I am trying to set discount amount on each cart item in the cart with some condition. I have followed like this to achieve that. Vendor/Module/etc/sales.xml <config xmlns:xsi="http://www.w3.org/...
0
votes
0answers
15 views

Quote Items are showing only if flush cache - Magento 2

I am trying to get cart quote items by the following code: File: app/code/Essence/Fcf/view/frontend/templates/packages.phtml I called this file in my cms page by following code: {{block class="...
0
votes
0answers
15 views

Change Shipping method in quote before magento validation occurs on admin order create

I am creating order from magento admin side but I want my custom method to be set in the quote before the order is submitted I have tried the following code. di.xml <preference for="Magento\...
0
votes
0answers
18 views

How can I know if reward points are used in quote

How can I know if reward points are used in current cart and also how can I remove them?
0
votes
1answer
70 views

Magento 2: Change quote base currency programmatically?

I am creating orders programmatically in Magento 2 and want to change the order base currency as well as current currency to my custom currency, irrespective to currency available in Store as I don't ...
0
votes
0answers
24 views

Magento 1 get quote id of current user

I've gone through a number of questions on here relating to retrieving the current quote for the current browsing user, but each one yields the same result: Mage::getSingleton('checkout/cart')->...
0
votes
2answers
117 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
32 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
29 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
0answers
36 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
39 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
156 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
20 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
327 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
48 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
14 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
66 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
27 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
55 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
23 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
36 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 \...
3
votes
0answers
33 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
9 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
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 ...
0
votes
0answers
24 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
88 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
28 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
249 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
48 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\...