Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [quote]

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

0
votes
0answers
11 views

Custom created quote is not assigning to Customer cart

I have create functionality to create quotation from admin with flexible price from admin. Customer can show it in my account section,If he like it and want to buy he can. As he click on order button ...
1
vote
1answer
18 views

Magento 2.3 - Add product to cart issue with store view

I have two stores with id 1 and 2. Am trying to add product programmatically using below code $params = array( 'form_key' => $this->_formkey->getFormKey(), 'product' =...
2
votes
1answer
64 views
+50

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); ...
1
vote
1answer
38 views

Duplicate current quote with new ID on Magento 2

Is there a way to somehow take the existing quote and create a new one identical to it but with a new ID? This is what I currently have: Updated following suggestions from @Vishwas: use Magento\...
1
vote
2answers
63 views

How to get current Cart_id/quote_id in plugin file Magento 2?

namespace Asm\Setsellerid\Plugin; use Magento\Quote\Model\Cart\Totals\ItemConverter; use Magento\Quote\Api\Data\TotalsItemExtensionFactory; class Item { /** * @var TotalsItemExtensionFactory ...
3
votes
1answer
34 views

Overriding Quote Item Weight Programatically

My goal is to alter the weight of a product based on a chosen custom option. I have the custom option part working, but am unable to alter the weight of the item is such a way that affects the ...
3
votes
1answer
26 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 ...
1
vote
0answers
37 views

Cron deleting expired quotes

Magento has a cron job for the deletion of expired quotes which hasn't changed since the first version I got in touch with, i.e. 1.6. The cron job is located in Mage_Sales_Model_Observer::...
2
votes
0answers
21 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 ...
0
votes
1answer
26 views

What is quote_preview table used for in Magento 2

I was checking the quote tables in Database and stumbled upon quote_preview table, anyone have idea what it is used for ?
1
vote
0answers
24 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 ...
1
vote
0answers
54 views

Klarna Checkout

I am new to Magento and have built a Magento 2 multi-store site which uses the Klarna KCO (Checkout) The checkout works fine except in the following usage: Add product to cart as guest Create new ...
1
vote
2answers
72 views

Create Column in Quote Payment Table in magento2

i want to add new column in Quote payment table i tried script but not working <?php namespace Ibnab\Additional\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\...
1
vote
1answer
43 views

Showing custom alert message after quote updated in Magento 2

I am trying to show the custom alert message after quote updated, for these, I have overwritten the ajaxSubmit method from catalog-add-to-cart.js file like below. $.ajax({ url: form....
0
votes
0answers
11 views

Apply different shipping methods to each item in cart and get total shipping amount in magento 2

I am facing problem in applying different shipping methods to each item in the cart and then getting total shipping amount for the quote in Magento 2. Can anyone help me with this? Any help would be ...
1
vote
1answer
41 views

Get applied sales rule ids for quote in Magento 2

I want to retrieve all salesrule ids applied to the quote, by using my quote id for example: $quote = $this->quote->create()->loadActive($quoteId); $salesruleIds = $quote->...
0
votes
0answers
48 views

how to get the weight unit of the product from quote in magento 2

I wish to get the weight unit of the product from quote in magento 2. Please provide me a solution to get quote value.
0
votes
1answer
21 views

Programmatically creating an order: How to add custom options to products in quote?

I'm trying to create an order programmatically. With simple products without custom options it already works like a charm. But when I try to add custom options I get the very specific error: We ...
0
votes
0answers
29 views

How to update product quantity in cart by custom field

I added some custom field(receipent_email) in quote_item table. When user adding item in cart, I m sending custom data to cart item. Data is saving in quote_item table perfectly. Also i split item ...
0
votes
1answer
33 views

Show value of all totals in controller action

I need to log the values of all totals from a controller action. If the controller action is called, then i need a list rendered which shows the totals: If you are not familiar with totals then look ...
0
votes
0answers
11 views

How to call a template after minicart is loaded in magento 2

How to call a template after minicart is loaded in magento 2 I wish to call the template for all the pages after the quote is created. So please provide me a solution to cal a template after the quote ...
2
votes
2answers
88 views

getItemById($itemId) for Magento Quote Model not working as expected in Magento 2

Here is my code, where I'm calling Quote model file and getItemById function. public function __construct( \Magento\Quote\Model\Quote $quote ) { $this->quote = $quote; } ...
1
vote
1answer
89 views

Magento 2 : Quote returns empty

I'm trying to get quote but It return me empty(null). I'm trying to get this is addToCart.phtml file where it returns empty. and i tried at Magento_Checkout where it works pretty great. Dont know ...
0
votes
0answers
47 views

quote getAllItems returns empty array

public function getItems(){ $a=array(); $customerId = null; $userType = GroupInterface::NOT_LOGGED_IN_ID; $isGuest = true; $quote = null; if($this->isLoggedIn()){ $...
0
votes
1answer
77 views

Magento 2 - setCustomPrice() does not work after Quote Item Update

I've been struggling with this issue for the past few weeks now. My goal is to set a custom price for an item after I edit them on Cart. Basically, I'm using an observer on the event ...
0
votes
0answers
61 views

Magento2 Reorder using REST Api

Can anyone let me know if we can Reorder in Magento2 using REST webapi? Actually i have made one api and used same code as magento default reorder does, here is my code in API function using order_id ...
0
votes
2answers
36 views

Magento 2 Not get the quote item

In magento 2.2.5, I tried to get the quote item using below codes. But it is not working. link 1 link 2
4
votes
2answers
392 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 ...
0
votes
0answers
287 views

set custom shipping amount programmatically in Magento2

I am trying to set the custom shipping amount to quote or order without shipping method. Main thing is that shipping amount have to be stored in the database. Please help me for the same .. My ...
1
vote
1answer
155 views

Magento 2 : Add product to cart as per customer with custom price programmatically

I need to add product to cart as per customer vise with custom price. I'm trying by below code. But, it returns error Uncaught TypeError: Argument 1 passed to Magento\Quote\Model\Quote::...
1
vote
1answer
65 views

magento 2 set shipping amount for each item

How I can set shipping amount for each order items. In my cart, I set for each cart item one shipment but I don't know how I can save it and which model or table saved it?
0
votes
2answers
257 views

Magento 2 : how to convert custom quote field to order field

I added a new field "management_fee" on table "quote" properly. I add this field on "sales_order" field too. I would like to update this field on sales_order table while quote is converting to order. ...
0
votes
1answer
177 views

How to set additional data to quote_item table from controller in Magento 2?

I have a controller with following code $data = $this->getRequest()->getPostValue(); $item_id = $data['item_id']; $additionalOptions = $data['additional_options']; $itemFactory = $...
0
votes
0answers
157 views

Add product to quote in admin programmatically magento 2

I am trying to add a free product to another product if a min qty of product is added to cart . I am able to do this in front end . In Backend admin same code is not working .So i tried to get quote ...
0
votes
0answers
65 views

Magento2: Issue in saving custom option to quote

I am saving custom options to the quote programmatically. But custom options are not visible in the backend. On debugging I found that in quote_item _option table rows are missing, entry corresponding ...
0
votes
2answers
136 views

How to get cart items using customer id in magento 1.9

I am trying to get the cart items for particular customer id. I am getting products but it's displaying in two times. For example: If the cart has two products here it's displaying four products, ...
0
votes
0answers
48 views

Request for quote and checkout at same time

We have a requirement like a customer can quote an item and checkout on same time by click on the process to checkout button. we have 2 type of products on our website. one for quote item and normal ...
0
votes
0answers
55 views

Magento 2.2.6: Mini cart qty not updated after I add cart items programatically

I use the QuoteFactory in order to load the quote by id & add items. Then I save the quote & call $quote->setTotalsCollectedFlag(false)->collectTotals(). After that, I can see on the ...
0
votes
1answer
76 views

Create order programmatically with UPS shipping method

I'm trying to get available shipping methods and create an order in model. I have Flatrate and UPS enabled, and see these options in checkout on frontend. Particularly, list of available methods is ...
1
vote
0answers
58 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
3
votes
1answer
83 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 ...
0
votes
1answer
24 views

Possibility of creating order programatically without quote

Has anyone checked wheter it is possible to add order programatically without creation of quote?
2
votes
1answer
103 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 ...
1
vote
1answer
70 views

Quote discounts by applied rules

I need to get cart rules applied to a quote, with the discount amount related to them. Say I have the following: **Rule 1**: Buy 2, get 1 free on product 1 **Rule 2**: 10% discount on all products *...
2
votes
2answers
212 views

What is the purpose of using quote_id_mask Table?

What is the purpose of using quote_id_mask Table ?
7
votes
0answers
158 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 ...
1
vote
0answers
30 views

If condition satisfies Not to apply any coupon (No coupon)

We have a customization like a quote edit and approve functionality. Ex: Original product price is 350 where customer write a note "I need this product for 200" admin can approve the request at ...
0
votes
0answers
25 views

Magento 1 - Getting product options from quot item

I have a simple request, to get all of the product options from a Quote item. This can be done very simply with the Order item as follows: $item = $order->getItemById($itemId); $item->...
0
votes
1answer
52 views

Magento 2 | Get number of items in cart

I am trying to get items qualntity from car. I tried using this but it game not expected result: <?php $helper = $this->helper('\Magento\Checkout\Helper\Cart'); echo $helper->getItemsCount(...
0
votes
1answer
72 views

How to get Quote subtotal by customer Id in magento 2?

I have used below code to get the quote object from customer id { protected $_objectManager = null; protected $_customerSession; protected $quoteFactory; public function __construct( \Magento\...