Skip to main content

Questions tagged [cart]

Question related to the shopping cart: adding/removing products, shoping cart price rules, the appearance of the shopping cart page.

Filter by
Sorted by
Tagged with
1 vote
3 answers
1k views

How to auto remove items from cart after 1 day - Magento 2.2.4

Guest / Logged-in user: Auto removes items from the cart after 24 hours. Canceling and returning from the payment page auto-remove cart after 24 hours.
0 votes
5 answers
5k views

Magento 2 - get Current Country Code in Cart Page

I want to Fetch Current Country Code in Cart Page Section (js)
0 votes
2 answers
1k views

How to add yes or no confirmation pop up after enter the clear shopping cart.Now its directly clear the cart

How to make yes or no confirmation popup after clicking the clear shopping cart. Now it's clearing the cart without confirmation. /** * Copyright © 2016 Magento. All rights reserved. * See COPYING....
0 votes
1 answer
27 views

Add to cart without leaving the page

we have the default add to cart button, that when we click it, it goes to the cart page. I would like to put a add to cart button on the product card, that doesnt leave the page so the client can ...
0 votes
2 answers
1k views

need to create shopping cart price rule for buy 2 get 5% off and buy 3 get 10% off

I wanted to give an offer to the users. If they buy the same product with qty 2 then 5% off and if they buy 3 then 10% off. I tried it with shopping cart price rules but only one shopping cart price ...
4 votes
2 answers
2k views

Add product to guest cart with custom option and its price in Magento 2 api

I need to add product in cart using magento 2 api. I am using below api "rest/V1/guest-carts/{cart_id}/items I am passing parameters like below, { "cartItem": { "sku": "...
1 vote
1 answer
1k views

Shopping Cart Price Rule Not Applying

I have a magento store running 1.9.3.6 and I cannot get a shopping cart price rule to work. Essentially, I want 4 items from a particular category with 3 attributes to be discounted to £10 from full ...
0 votes
2 answers
21 views

Magento2 For a logged-in customer, when I click 'View and Edit Cart,' the customer is automatically logged out after reaching the cart page

Website: www.artlounge.in I'm encountering an issue where, after a customer logs in and adds a product to the cart, clicking on 'View and Edit Cart' causes an automatic logout. This issue occurs when ...
0 votes
1 answer
2k views

Change Row Total for Quote Item whithout changing the Price

I have tried to set a custom price for this purpose but it's getting multiplied by quantity. All I need to add an extra amount(like 50$) to each quote item after it's added to the cart. So it will be ...
27 votes
9 answers
31k views

Cart dropping all items / cart session clears

A site I manage suddenly (potentially 2 weeks ago - from GA stats, and only reported now) started dropping the cart items when you view the cart, or go to checkout. The top 'mini-cart' shows the ...
0 votes
2 answers
2k views

Magento 2 Mini Cart values with Full Page Cache

Running Magento 2.1.10 CE, with multiple stores. We have all the cache enabled, with Full Page Cache running with Varnish. Having an issue with the minicart values since enabling cache Steps: 1- ...
1 vote
1 answer
2k views

Magento 2 - Prevent form submit on page reload when Product add from sample script to Magento Shopping Cart

Below sample PHP script will list simple/configurable product with add to cart button. When user clicks on submit button, it will redirect to Magento shopping cart page and selected product will be ...
0 votes
1 answer
19 views

Change "Discount" title in order summary in cart

I am trying to change the "Discount" title to "Savings" in the order summary in cart. I have tried modifying the following files and none of them seem to work. app/design/frontend/...
0 votes
2 answers
2k views

how to redirect to cart page by clicking go to check out button

I need to redirect to cart page instead of checkout page as i click go to checkout button in cart drop-down.
0 votes
2 answers
3k views

Magento 2 - invalid form key (add/delete from cart)

I have serious problems with custom Magento 2 theme and (probably) formkey cashing. I have 2 views of exactly same e-shop. - View 1: Luma Theme - View 2: Custom Theme (Luma child) - overriding ...
0 votes
0 answers
12 views

Checkout button is not displaying on the cart page and quantity is not updating on the cart page in Magento1.8 based website

I am using the Magento 1.8 version and am facing a sudden critical issue while checking out my LIVE website. Problem: : The "Checkout" button on the cart page is not showing, and any order ...
2 votes
1 answer
2k views

Product dimensions in Magento 2.2.5 update

I have installed Magento 2.2.5 locally with sample data. Now three new attributes Length, Width, Height Added. These are the default attributes, created by Magento 2.2.5 or by some third party ...
0 votes
1 answer
3k views

Magento2: Update additional options in cart page

I added the custom option to the shopping cart like this tutorial Cloudways . My question is how can I update this option in Cart page like "Qty"?
1 vote
1 answer
1k views

custom fee order totals issue

I created custom fee based on following link. (Please look at my module at : https://github.com/sivajik34/Delivery-Signature-Magento2) how to add fee to order totals in magento2 Everything is ...
1 vote
1 answer
2k views

Magento 2 Minicart content not displaying

I'm working on developing my own theme by extending the Magento Blank theme. I'm trying to add the minicart to my header.phtml file. I'm loading the minicart in my header like so: <?php echo $...
5 votes
1 answer
2k views

Magento 2 order redirected to cart -> getLastSuccessQuoteId() returns false

I'm trying to place order in magento 2.1.7 but every-time I click the "place order" button, I get redirected to the cart page. With debugging I found out, that in the class /vendor/magento/module-...
0 votes
2 answers
2k views

How can i do cross sell products blocks on add to cart popup box

How can i display my cross sell products blocks under add to cart popup box, my add to cart block, <?php class Cmsmart_AjaxCart_IndexController extends Mage_Core_Controller_Front_Action { ...
0 votes
1 answer
2k views

Magento 2: Change UI template

For the checkout, I would like to use a different UI template to that which is used on the cart. Currently, they both use the same UI template: <item name="template" xsi:type="string">ui/form/...
0 votes
1 answer
44 views

Is it possible to programmatically disable customer group pricing?

I have some code that programmatically creates an order by building a quote object and then calling: $this->cartManagementInterface->placeOrder($quote->getId()); For these specific orders I'm ...
4 votes
3 answers
2k views

Magento 2: What is the best way to observe cart change to modify cart item in magento 2?

I'm using Magento v2.3.4 and i want to modify the cart item, if there is an update on the cart (add to cart, update cart item, and remove cart item). Currently I'm using plugin for quote collectTotals(...
0 votes
0 answers
57 views

Magento 2 coupon code shows 1 Times used in admin but it is not showing in any orders

We are currently using Magento version 2.4.5-p1. We've encountered an issue with the Magento cart price rule with coupon codes. The problem is as follows: 1 - In the Magento admin panel -> Cart ...
0 votes
2 answers
2k views

Cart page sub total label

Using Magento 1.9.2.2 I want to change Sub Total Label(Just label) everywhere... I found that it's coming from app/design/frontend/base/default/template/tax/checkout/subtotal.phtml From this ...
2 votes
1 answer
3k views

Magento2 - Add Custom Column in cart item table and insert data to custom column when product add to cart

i have added new column in 'quote_item' table. i want to add the data to custom column when user add any product to cart.
0 votes
1 answer
1k views

Magento2.4 How to override \Magento\Checkout\Controller\Cart?

Even if I simply copy the file without changes, it does not work as a preference. Any idea why? I created a preference in di.xml <?xml version="1.0"?> <config xmlns:xsi="http://...
3 votes
2 answers
3k views

What settings control how long the products stay in cart for guests?

At the moment most of our customers are guests (we do no require accounts) Very often when customers returns to our website they see empty cart page (verified by testing and screen recording tools) ...
3 votes
2 answers
3k views

How to reload the quote or cart in Magento 2

I am working on ajax cart. When i update the cart qty, I am trying to reload the quote but its not loading properly $this->cart->getQuote()->getShippingAddress()->collectShippingRates()-&...
2 votes
1 answer
2k 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
1 answer
1k views

Magento 2: How to set item Row total?

I want to set a custom row total. I am using 'checkout_cart_product_add_after' event. And want to update Row total. I going to add an extra amount in an item row total. like, $item->setRowTotal($...
6 votes
2 answers
4k views

Magento 2.3.2 Call to undefined function Magento\InventorySales\Model\IsProductSalableForRequestedQtyCondition\bccomp()

When I am inserting product to the cart then below error is occured. Fatal error: Uncaught Error: Call to undefined function Magento\InventorySales\Model\IsProductSalableForRequestedQtyCondition\...
2 votes
3 answers
4k views

Disable "Proceed to Checkout" button on cart page magento 2

In my custom module I have to check some conditions and have to disable "Proceed to Checkout" button from the Cart page. I know it's coming from magento\vendor\magento\module-checkout\view\frontend\...
0 votes
3 answers
1k views

How to Remove cart products if a specific product is added in cart

This is my onpage.phtml page to get product id. I need to remove all other products in cart except the mention product id below if this product is on cart. $objectManager = \Magento\Framework\App\...
0 votes
1 answer
3k views

Apply discount if 2 of the different item from a category are added

I'm looking to build the following Shopping Cart Rule and I have no idea how to do it. I have multiple sku available, if you add 2 different sku in your cart from the same category, you get 10% off. ...
0 votes
1 answer
2k views

Get quantity in stock for items added in cart in JS

I need the quantity available for each product in cart in my custom javascript file. Does anyone know how to do this?
0 votes
1 answer
2k views

Trigger modal after placing a product in minicart on Magento 2

I need to show a modal after a product is placed inside cart. This is what i have so far. This is my default.xml <body> <referenceContainer name="content"> <block ...
0 votes
1 answer
2k views

How to add onClick event to add to cart button

Magento version 2.1.9 I want to use facebook pixel on my magento site. I want to add onclick event to all "add to cart" buttons. Thank you in advance.
0 votes
1 answer
2k views

How to check if the current shopping cart has met the conditions of a specific Shopping Cart Price Rule

I have a specific shopping cart rule that checks weather 3 items or greater of products from certain categories have been added to the cart, and then gives a discount on a specific Item ( I will call ...
0 votes
3 answers
2k views

How to get updated cart subtotal in checkout_cart_product_add_after event observer in Magento 2?

I want to add a free product to cart with another product. For that I wrote checkout_cart_product_add_after event observer. My problem is, I don't get the updated cart subtotal(after adding first ...
1 vote
2 answers
4k views

Magento 2 How to remove shipping rate estimation in shopping cart?

Sometimes the estimation of shipping showed Shipping (undefined - undefined) so I want to remove this row of thing. How can I remove it? Thanks.
1 vote
1 answer
3k views

How to update subtotal after changing price with observer

I am using an observer to change bundle product price. I have tried events 'checkout_cart_product_add_after' and 'checkout_cart_save_after'. Both events update the product's price but the subtotal ...
0 votes
1 answer
1k views

Remove wishlist items when added to cart

I want to remove the wishlist products that are added to the cart. I've followed this link: Keeping wishlist items for keeping the wish list items after being added to the cart.i have set my $delete ...
8 votes
2 answers
7k views

Magento 2 No such entity with cartid =

I'm experiencing this error on my site quite often: Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with cartId = It's not using multiple stores, so the entity_ids ...
3 votes
1 answer
4k views

Magento 2 adding multiple items to cart at one time

I am trying to add multiple products to Cart at one time, But i am facing issue while second product adding to cart as per attached screen shot. The second product showing in cart items but price is ...
1 vote
2 answers
2k views

Show discount including tax, calculate discount excluding tax

I want to display the discount amount including tax on cart overview page (totals summary). Magento 2.1.8 Relevant settings: Catalog prices: Excluding tax Apply Customer Tax: After discount Apply ...
7 votes
3 answers
8k views

How to get item id from quote item collection in Magento 2?

I am trying to get all item ids currently added in cart. Here is what I have done so far. public function __construct( \Magento\Checkout\Model\Cart $cart ) { $this->_cart = $cart; } ...
1 vote
1 answer
5k views

Magento 2 : How to Get Selected Bundle Option Product Details in Cart Page

I need to get details of selected product of a bundled product. I tried following code in cart page. But it's not working. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $cart =...

1
2 3 4 5
45