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
1answer
16 views

Create a share cart link

Is there a way to create a cart link (from a guest cart) in Magento to share with other people?
0
votes
1answer
24 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)){ $...
0
votes
1answer
17 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
98 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
51 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
33 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
24 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
0answers
28 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
21 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
22 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
190 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
24 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
35 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
67 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
72 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
25 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
28 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 ...
0
votes
0answers
30 views

How can i set custom price on grand total and subtotal on cart item update?

How can i set custom price on grand total and subtotal on cart item update ? I am doing below but its not working $quote = Mage::getSingleton('checkout/session')->getQuote(); $quote->...
0
votes
2answers
59 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->...
0
votes
2answers
32 views

Magento Add to Cart Button Change to Add to Quote on some products

Any information on adding "Add to Quote" option in Magento2 website .. for bulk order is highly appreciated.
0
votes
1answer
32 views

Magento2 - How to lock customer cart?

I have added product to customer cart programmatically with custom prices as quatation. Now customer should not add,remove or update cart items as it is fixed quatation. How can i achieve this?
1
vote
2answers
62 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
156 views

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
80 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
75 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
55 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
84 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
102 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
29 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
28 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
29 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
110 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
122 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
76 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
13 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
210 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
141 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
41 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
42 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
39 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
14 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 ...
3
votes
2answers
117 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
238 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
57 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
109 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
1answer
121 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
41 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
5
votes
2answers
518 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 ...