Questions tagged [quoteitem]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
70 views

Magento2 quote item row total rounding issue

We are facing issue in quote_item table with row_total column in which its not rounding prices of items. for example please check below screenshot: 14.2250 should be 14.23 15.9750 should be 15.98 We ...
user avatar
0 votes
0 answers
34 views

How to Select some product from cart to checkout

I'm currently using Magento 2.4 and I'm trying to customize cart page. So I want to add checkbox to cart so I can select some item in my cart to proceed checkout. I have no lead to do this and I'm new ...
user avatar
0 votes
1 answer
202 views

How to add custom column value in quote_item table magento 2

i have added new custom column in quote_item table. i want to add the value in that custom column by item_id in controller. i have item_id 16,17,18 of quote 3 and i want to add value in custom column ...
user avatar
0 votes
0 answers
29 views

Magento 1.9 Convert Order item to Quote Item

I am working on an order edit plugin. What is the best way to convert an order item to a quote item? Like if the order has a configurable product the sales_flat_order_item table has 2 entries, 1 for ...
user avatar
  • 147
0 votes
0 answers
99 views

Magento 2 : Update the product name while adding into the cart

I want to add something with the product name dynamically while adding to the cart. Each product have different concatenation with product name. And that product name should be updated on everywhere ...
user avatar
  • 12
0 votes
0 answers
30 views

How to add bundle product to cart using Magento\Quote\Model\Quote\ItemFactory

I want to add bundle products to the cart using \Magento\Quote\Model\Quote\ItemFactory. I have tried the below code and it is working fine. /** @var \Magento\Quote\Model\Quote\Item $quoteItem */ $...
user avatar
0 votes
0 answers
37 views

How to get description of a Magento\Quote\Model\Quote\Item object?

Magento 2.3 I am having troubles getting the description of a Magento\Quote\Model\Quote\Item object. I tried using $item->getDescription(), but it returns nothing. Any ideas?
user avatar
0 votes
0 answers
45 views

Magento 2 : From where the total discount from cart is returned

I need to know from where the total discount after all validation & calculation is returned for a cart ? I need to get total discount for a cart/quote.
user avatar
0 votes
1 answer
30 views

Updating configurable product throws error We can\'t find the quote item. Magento 2

Basically I am trying to update configurable product which has been successfully added to the shopping cart. I can see record of added configurable product item in my database quote, quote_item , ...
user avatar
  • 109
0 votes
1 answer
266 views

how to get child item object while adding to cart?

I wanna put customize the code with qty while adding to cart product. For that I have created Plugin Magento\Quote\Model\Quote\Item and used addQty() method,but in this method I call quoteItem object. ...
user avatar
0 votes
2 answers
124 views

Magento 1.9 can not remove product fom quote

I have some problem with removing product from quote. I observe "Add to cart" with "checkout_cart_product_add_after" event and there simply do this: $quote->removeItem($...
user avatar
1 vote
0 answers
94 views

Magento2 negotiable quote save programatically

How to create and save the negotiable quote programatically in M2. Can any one provide some example with dummy data / (or) provide me the test script with simple example please Thanks
user avatar
0 votes
1 answer
105 views

How to change Quote Item attributes after adding it to cart?

I want to change almost all the quote item attributes after adding it to care like name,price,sku and almost everything. As we have a requirement where at the runtime only we will decide this ...
user avatar
0 votes
1 answer
274 views

Magento2 - I want to show custom quote item field to checkout page

I want to show custom quote item field to Checkout Page. I don't know how would I do that. I've added one custom drop down to Cart page and selected value I saved in quote_item table now I want that ...
user avatar
  • 361
0 votes
0 answers
120 views

Remove custom options only from cart item

I want to remove only the custom options added with the cart item without removing the product. Is there any solution for this? I am using Magento 2.3.4 version.
user avatar
  • 509
0 votes
1 answer
21 views

Magento 2.3.5 - Remove product groups in the cart programmatically

I'm trying to remove simple and virtual products in groups through a custom form I created. The code is this and it seems to work but in reality when you reload the page the minicart does not update ...
user avatar
  • 297
1 vote
2 answers
74 views

Can not get quote item in custom class

class Productinfo extends \Magento\Framework\View\Element\Template { protected $checkoutSession; protected $quoteFactory; protected $collection; /** * Constructor * * @param \Magento\...
user avatar
  • 728
1 vote
0 answers
198 views

Remove Item from Cart using before add product Plugin

I'm using magento 2.3 and i'm trying to Remove an especifc Item from Cart, using beforAddProduct Plugin. The problem is that i don't know how to remove the Item from Cart. It shows the following error:...
user avatar
0 votes
2 answers
474 views

Magento 2: Prevent add to cart or qty increase if a product already exists in cart

I want a feature where if a customer tries to add a product which already exists in cart then it should prevent it from adding again or qty increase. Instead I want to show a message that 'The product ...
user avatar
1 vote
0 answers
54 views

Magento2: How to separate quote?

Like, I have 5 items in my Cart. It means there is 1 row in quote table. Which contains parent ID. And, 5 rows in quote_item which describe all 5 items. I want separate 3 items from these 5 in ...
user avatar
  • 1,779
1 vote
0 answers
1k views

Add a quote item with a buy request

I would like to get product price with options price using a custom module that calculates product price by formula, i like to use the function without adding the product to the cart. The function ...
user avatar
2 votes
1 answer
201 views

I can't understand difference between quote/quoteitems and order/order Items Magento 2.3

I can't Understand the difference between Order And Quote or Order Items And Quote Items please explain what is it and how it works
user avatar
  • 298
0 votes
0 answers
80 views

How to show the cart products in email template - Magento 2.3.4

How to show the cart products in the email template i can't loop into email template, and i can't pass the products into email template, I want send mail with the current cart products so I'am working ...
user avatar
  • 298
0 votes
2 answers
317 views

Get Quote_item table data

How can I fetch the data in the quote_item table for a specific item ? I'm trying to get the product name with "gift" at the end.
user avatar
  • 81
1 vote
2 answers
142 views

Can't copy data from quote_item to sales_order_item

I have a custom value (In a Magento 2.3.3 installation )that gets added to the quote_item table when I add an item to the basket. When I go to checkout I want to pass that value to the same-named ...
user avatar
1 vote
1 answer
134 views

Fetching Quote Items of Inactive Cart (Abandoned cart)

I am trying to fetch all the items of a Quote. First i am load the quote using \Magento\Quote\Api\CartRepositoryInterface with get() method i am getting Magento\Quote\Api\Data\CartInterface using ...
user avatar
  • 1,128
1 vote
0 answers
71 views

quoteCartRepositoryV1 serach by nested field

I would apply searchCriteria to /V1/carts/search in order to get all carts which contain specific sku. I've performed this query https://shop.dicanio.it/rest/all/V1/carts/search?[filterGroups][0][...
user avatar
0 votes
1 answer
160 views

Unable to get cart item when FPC is enabled Magento 2.3.2

I'm trying to get all cart items in a custom block but unable to get all items, it's throwing an error: Fatal error: Uncaught Error: Call to a member function getAllItems() on null in Block ...
user avatar
  • 7,366
0 votes
1 answer
110 views

Magento 2 - Get all options from a quote item

I need to get all the configurable items related to an item in the cart. For example, if the cart item is of a size "XL", then I need to get all the other options like "S", "M" and "L" together with ...
user avatar
1 vote
0 answers
87 views

What is replacement of this function for converting order item to quote item

As magento/module-checkout/Model/Cart class is deprecated /** * Shopping cart model * * @api * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @deprecated 100.1.0 Use \Magento\Quote\Model\...
user avatar
0 votes
1 answer
512 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 ...
user avatar
  • 728
0 votes
2 answers
1k views

Magetno 2: update custom column values for quote item during add to cart

I am calling ajax request and performing add to cart functionality. Here is my controller code, use Magento\Framework\App\Action\Action; use Magento\Framework\App\Action\Context; use Magento\...
user avatar
  • 1,739
0 votes
1 answer
17 views

Magento 2: How to decrements item qty?

I want to decrements item qty programmatically. $item = $this->cart->getQuote()->getItemById($itemId); $qty = $item->getQty(); if($qty > 0) { $newqty = ($qty - 1); ...
user avatar
  • 1,127
0 votes
1 answer
1k views

Magento 2 Add extension attributes in Quote Item

I want to add custom attribute in quote items Magento\Quote\Api\Data\CartItemExtensionInterface <extension_attributes for="Magento\Quote\Api\Data\CartItemExtensionInterface"> <attribute ...
user avatar
  • 2,443
0 votes
2 answers
2k views

Magento 2 Unable to set custom Price in cart item by API

I'm trying to add an item by API.every thing are working except item price It's Magento Bug that not take price from API https://devdocs.magento.com/redoc/2.3/admin-rest-api.html#operation/...
user avatar
  • 2,443
1 vote
2 answers
1k 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="...
user avatar
  • 135
2 votes
1 answer
1k 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()-&...
user avatar
  • 799
0 votes
0 answers
46 views

Get custom attribute from product in ToOrderItem convert method

I'm implementing a plugin for Magento\Quote\Model\Quote\Item\ToOrderItem public function aroundConvert(\Magento\Quote\Model\Quote\Item\ToOrderItem $subject, \Closure $proceed, \...
user avatar
0 votes
2 answers
2k views

Get data from Quote_items table in Magento 2

I am new to Magento 2 so I do not understand much about select data from the table in Localhost also which file I need to create I want to display data from Quote_item table in the .phtml file, and ...
user avatar
  • 235
2 votes
0 answers
133 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
user avatar
2 votes
3 answers
540 views

Display data from Quote_item error

I have tried to display the data from Quote_item table in the database to file .phtml but it shows this error the code in Magento/MyHistory/Block/View.php <?php namespace Magento\History\Block;...
user avatar
  • 235
5 votes
2 answers
4k 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 ...
user avatar
  • 135
0 votes
1 answer
1k views

How to update custom column value in quote_item table magento 2

Actually i created custom column in quote_item and trying to update the value once product added to the cart programmatically magento2 custom module using Model. If Anyone have idea please ...
user avatar
0 votes
1 answer
711 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->...
user avatar
  • 1,739
1 vote
0 answers
178 views

Why V1/guest-carts/{cart-Id}/ PUT api is not move guest cart item to customer cart in magento-2.2.7?

I want to move guest cart item into customer cart by using this [PUT] /V1/guest-carts/{cart-Id}/ . But it give {"message": "Cannot assign customer to the given cart. You don't have permission for ...
user avatar
0 votes
1 answer
745 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 ...
user avatar
0 votes
1 answer
21 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 ...
user avatar
0 votes
1 answer
297 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 ...
user avatar
1 vote
3 answers
644 views

Magento 2 get custom product attribute

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $objectManager->get('Magento\Catalog\Model\Product')->load('YOUR PRODUCT ID'); echo $product->getAttributeText(...
user avatar
1 vote
1 answer
1k 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 ...
user avatar
  • 1,739