Stack Exchange Network

Stack Exchange network consists of 174 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
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [quote]

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

0
votes
0answers
12 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
16 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
29 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
8 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
72 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
23 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
40 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
42 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
26 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
34 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
174 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
122 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
85 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
41 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
67 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
45 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
80 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
30 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
70 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
37 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
86 views

Get shipping tax rate from Quote

I'm trying to retrieve the tax rate applied to shipping from a Quote object but apparently the code i wrote is not working for all tax configurations. My code: $shippingAppliedTaxes = $order->...
0
votes
0answers
24 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
50 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
35 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
63 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
18 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
60 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
42 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
130 views

What is the purpose of using quote_id_mask Table?

What is the purpose of using quote_id_mask Table ?
5
votes
0answers
68 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
27 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
18 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
26 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
34 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\...
1
vote
0answers
10 views

Incorrect amounts on order when custom currency set on quote

So when I create an order programmatically, I use the following lines to set a custom currency different from the base, in this example GBP as custom and EUR as base. I also select the store to use: ...
0
votes
0answers
25 views

Are <fieldsets> a must?

I'm applying a custom discount for each individual product which isn't necessarily a fixed amount. I think I need to sum up this value with all values in both discount_amount and base_discount_amount ...
0
votes
1answer
73 views

Magento 1: Check if customer has quote

How can I filter customers by the fact if they have a quote in the sales_flat_quote table? I could foreach every customer to check if their email address is located in the sales_flat_quote table, but ...
0
votes
0answers
60 views

Magento 2 programmatically create quote but don't count all item in total

I am creating quote programmatically from admin. For this, I have created one custom module. Create a quote is working fine. I have created a quote using this solution. Now, let say I have created a ...
0
votes
1answer
35 views

Magento 1 - Quote data is null but order is created and processed

Have been trying to figure out why this happens. We have a shop that runs Magento 1.9, that doesn't use the built-in customer account/sign in functionality when creating orders etc. We never require ...
1
vote
1answer
101 views

Shipping method returns zero amount

When I get price data from Quote extension_attributes and then set this price to method price, getRates returns 0 for this shipping method instead price. Magento CE 2.2.3 My code: Setup extension ...
0
votes
0answers
133 views

CE 1.9.3.x: Customer cart (quote items) not merged correctly on login (new cart is replaced instead of merged)

I think I have found a strange bug with the cart in Magento 1.9.3.x which causes customers to lose their cart contents when they login. Any help or insight towards fixing this would be great! Steps ...
1
vote
1answer
70 views

Magento custom column in quote table not store value

im creating new column in quote table by using this line $installer->run("ALTER TABLE `{$installer->getTable('sales/quote')}` ADD `excl_price` int(1) NOT NULL DEFAULT 1 ;"); im saving value to ...
2
votes
1answer
546 views

Magento 2 Load REST API cart quote on frontend via URL

I want to load a previous generated quote in magento 2 using REST API. Directly on frontend using custom URL like "/myurl/cart/index" that should redirect to "/checkout/cart" with the products loaded. ...
1
vote
0answers
42 views

How to change totals of Magento 2 cart

$quote = $this->quoteFactory->create()->load($quote_id); $quote->setSubtotalWithDiscount(number_format((float)0, 4, '.', '')); $quote->setBaseSubtotalWithDiscount(number_format((float)...
0
votes
0answers
98 views

Duplicate quote on reload last quote

Recently, I needed to create an order programmaticaly. Here's my code : public function createMageOrder($orderData) { $store=$this->_storeManager->getStore(); $websiteId =...
0
votes
1answer
279 views

How to change item custom option in cart

I have products with custom options. One of these products options must be updated just after product has been added to cart. I then created an event launched just after ...
1
vote
0answers
34 views

Magento Quote Duplicate value coming

I just need to find the categories of item in cart. For that I've used: class MageCustom_ShippingFilter_Model_Shipping extends Mage_Shipping_Model_Shipping { public function collectCarrierRates($...
1
vote
0answers
28 views

Load last quote

is that possible to load the last quote of the logged customer to get all product from this quote and add them into cart ? I want to to this directly from front end, so i'll probably add a button on ...
1
vote
2answers
232 views

Get store name corresponding to a quote object created: Magento 2

I have a custom module that works with the default Magento quote factory. Here, I am fetching the quote data using the, \Magento\Quote\Model\QuoteFactory $quoteFactory and in my block I am getting ...
1
vote
1answer
96 views

Quote data is empty in multiple store views: Magento 2

I have a custom module that works with the default Magento quote factory. Here, I am fetching the quote data using the, \Magento\Quote\Model\QuoteFactory $quoteFactory In my controller, I am ...