As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [mini-cart]

denotes questions related to Magento mini cart

Filter by
Sorted by
Tagged with
15 votes
3 answers
3k views

magento 2 remove mini cart item page reload?

How can I reload the page when I remove mini cart item ? I know it's Magento 2 bug. On the checkout cart page there are many products In mini cart as well as In checkout cart page when I remove In ...
Pratik's user avatar
  • 3,755
13 votes
3 answers
26k views

I want to customize my minicart in Magento 2. I need to add 3 attributes

I want to customize my minicart in Magento 2. I need to add 3 attributes: SKU, Manufacturer, and Manufacturer part number. These are existing attributes. I see where to add the output values but not ...
Matthew McLennan's user avatar
12 votes
2 answers
9k views

How to add "Empty Cart" button to minicart

How can you add an "Empty Cart" button to the minicart in Magento 2. Is it possible with layout xml?
Holly's user avatar
  • 4,773
12 votes
2 answers
13k views

Magento 2 Add to cart frontend event listener

I am trying to find good solution to execute custom javascript when product is successfully added to cart. Also this custom javascript need information about product that was added to cart (sku, qty, ...
Sergii Ivashchenko's user avatar
11 votes
4 answers
23k views

Magento 2 Get Cart Quote Total in minicart.phtml

I'm trying to get the cart quote total in minicart.phtml, but I'm having no luck. I'm injecting Magento\Checkout\Model\Cart. Here's my code: $this->cart = $cart; $cartQuote= $this->cart->...
Paul's user avatar
  • 1,491
10 votes
2 answers
8k views

Getting the product SKU in the header mini-cart

I want to be able to display the product SKU in the mini-cart of a Magento 2 site. But I'm not sure how to use KnockoutJS to pull in additional product information. The template that is being called ...
circlesix's user avatar
  • 4,213
9 votes
1 answer
4k views

Mini-Cart displaying Configurable Product Image instead of simple Product Image Magento 2

While adding product variations from configurable product, in mini cart it displays only configurable product image, how to show simple product image instead of current parent image.
Krishnakumar C's user avatar
9 votes
1 answer
7k views

Magento 2 show normal price with special price on minicart

I can set Normal price along with Special price while put custom function in core file vendor/magento/module-weee/Block/Item/Price/Renderer.php public function getUnitItemPriceExclTax() { $...
Ronak Chauhan's user avatar
9 votes
2 answers
2k views

Magento 2 How do I sort mini cart items?

I am trying to sort the items based on the product ordered qty. Is there any logical method to the way cart items are sorted by ordered qty?
Navin Bhudiya's user avatar
8 votes
8 answers
12k views

Magento 2, Change On hover instead of 'click' for mini cart

In magento 2. For mini cart and store switcher, they are dropdown with click. How to change on hover instead of 'click'. I had tried with jquery trigger click, but It don't work.
Mr Tim's user avatar
  • 343
8 votes
1 answer
2k views

Difference between Minicart and Cart in Magento 2

I want to know the difference between Mini cart and Cart in details.
Sanjay Gohil's user avatar
  • 2,180
8 votes
1 answer
18k views

Unable to process binding Knockout.js magento 2

I have created a new theme in Magento 2 and rewritten minicart.phtml, but when adding product to cart, mini-cart does not show items and have error JS (knockout.js) like this: Uncaught TypeError: ...
Simple's user avatar
  • 347
7 votes
6 answers
8k views

Magento 2: How to remove Paypal Logo from MiniCart & Shopping Cart Page?

I'm using Magento 2 CE with Porto Theme. Also referred but it's for Magento 1 How to remove paypal express checkout link from mini cart in right column I have tried from Admin Paypal Settings. But ...
Jackson's user avatar
  • 9,749
7 votes
3 answers
28k views

remove items from cart in controller - magento2

I need to remove all the items from cart, below method remove the items in chenckout/cart/index page but header minicart section still dispaly the items even after refresh page too. I have try this ...
Bilal Usean's user avatar
  • 9,837
6 votes
8 answers
8k views

Form Key Error when removing a product from Mini cart

So this is a problem that I have been trying to solve for a few days now. I'm not an expert at this, but I manage quite a bit through googling and testing myself. My website is more or less ready to ...
Naeem's user avatar
  • 163
6 votes
1 answer
5k views

Magento 2 - How to show tax and shipping costs in mini-cart pop up

How to show tax and shipping costs in mini cart popup in Magento 2?
nuwaus's user avatar
  • 2,264
6 votes
4 answers
7k views

Display total price and total items in minicart

I have installed magento 2.0.7 and overide the template minicart.phtml to my custom theme. I want to show total price and total items in the header minicart like the below image
Asha's user avatar
  • 617
6 votes
1 answer
970 views

Magento 2 : How to reload minicart from Plugin?

I've written plugin for Magento\Checkout\Controller\Cart::Delete Plugin works great and removed my desirable product from cart. As much as I know Minicart is render with local storage. So that we ...
anonymous's user avatar
  • 3,724
5 votes
6 answers
18k views

Magento 2 Open minicart when item is added

I have a relatively stock minicart implementation, and I wanted to know if there is a configuration option or some other way of setting up the mini cart to drop down (open) when an item is ...
Pat Marx's user avatar
  • 207
5 votes
1 answer
6k views

How to modify minicart.js Magento 2?

Without editing the core file, I want to add some code to minicart.js so I tried overriding the minicart.js file in my theme by this: var/www/animals/app/design/frontend/Dogs/husky/Magento_Checkout/...
Kara's user avatar
  • 179
5 votes
3 answers
5k views

Magento 2 : Get custom product attribute in minicart

In my magento 2 store I need to return and print a custom product attribute in mini cart for each product in the cart. But it seems data are load using KO js so I have no idea , how to get attribute ...
Chamal Chamikara's user avatar
5 votes
3 answers
371 views

Duplicate Product in Cart Magento 2

I have an issue in Magento 2.1.6. When I add the same product in cart it's adding as a new line not update Qty of product. The same issue in the mini cart also. Actual Result: Add as a separate ...
Divyarajsinh Dodiya's user avatar
5 votes
4 answers
4k views

When Adding a product to cart programatically ,the price of the product becomes zero ($0.00) [duplicate]

When Adding a product to cart programatically ,the price of the product becomes zero ($0.00) on the fist time , but on adding the same item to the cart, it shows the price . The product adding is ...
Akhil Kurian's user avatar
4 votes
5 answers
8k views

Magento2 Minicart showing blank count

When I open the page in Private Browsing / Quote no initialize at that time it show the empty value in minicart count, but it should show 0. If I add product(s) in cart then I can see the number of ...
user avatar
4 votes
1 answer
7k views

Magento 2 Minicart - Display line item subtotal rather than unit price

In the Magento 2 mini cart I would like to display the line item subtotal rather than unit price. So in the example below the price in the minicart should be $90 because I've added two watches to the ...
Holly's user avatar
  • 4,773
4 votes
2 answers
3k views

Add custom product attribute to mini-cart

I have to use a custom product attribute in the mini cart and the full cart view. After creating the file /etc/catalog_attributes.xml in my module folder i could read my custom attribute in the full ...
Karkan's user avatar
  • 65
4 votes
2 answers
3k views

Update quantity in minicart

I want to add Quantity increment / decrement buttons in header minicart. For that I have added divs as follows <div class="more">+</div> <input ...
Anshu Mishra's user avatar
  • 8,888
4 votes
2 answers
691 views

How to call rewards block phtml content into minicart section magento 2?

Magento 2 Enterprise, With Magento Reward module, Inside layout file checkout_cart_index.xml file with reward block is defined as below. <block class="Magento\Reward\Block\Tooltip\Checkout" name=...
Rakesh Jesadiya's user avatar
4 votes
2 answers
1k views

RWD mini-cart: How to reload cart page if product removed via mini cart?

I am having UI issues with the mini-cart and the RWD theme. Test 1: Add Item to cart, then click on Mini-Cart in top right corner and select "View Shopping Cart". Once on the shopping cart, ...
Mr. L's user avatar
  • 63
4 votes
6 answers
8k views

Magento 2 : How to clear mini cart programatically

I am using this solution and get referenece from Here. But It dose not update mincart after page refresh. Although it deletes items from quote_item table. I am also trying deleting quote id from ...
Abhishek's user avatar
  • 931
4 votes
2 answers
8k views

How can I get discount amount and grand total amount in mini cart ? (Magento 1.9)

I would like to display discount amount and grand total (including discount) in mini cart with Magento 1.9 instead of sub total. I didn't find out how to display discount (cart price rule without ...
Max's user avatar
  • 43
4 votes
3 answers
1k views

Magento 2.3 Minicart check if subtotal is above value

I want to check inside my /app/design/frontend/theme/theme/Magento_Checkout/web/template/minicart/subtotal/totals.html file if the subtotal is larger than 29.95. I want to display some additional ...
JGeer's user avatar
  • 1,446
4 votes
1 answer
2k views

Magento 2 | Mini Cart has items but cart is empty | Session problem? | Double clicking on "Proceed To Checkout" redirects to an empty cart

I have a weird problem where my mini-cart is showing that there are products in the cart, however, cart is showing empty. Also, when refreshing the checkout a few times, it redirects to the cart with ...
Greg's user avatar
  • 2,889
4 votes
1 answer
3k views

Magento and Varnish (Turpentime) Mini Cart is being cached

I've just configured correctly the Varnish cache, finally, but now I ran into some issues... I've notices, at the moment one important error and can't get to fix it. The thing is that the Mini Cart ...
Artur Rain's user avatar
4 votes
1 answer
3k views

Magento 2: How to update mini cart after add product to cart from API?

I'm working on a task that need an API endpoint for adding product to cart in Magento 2. My code do the job "add product to cart" properly (it add product to cart and when I go to .../checkout/cart I ...
0xh8h's user avatar
  • 475
4 votes
2 answers
69 views

broken minicart - urgent

I have attempted to edit the minicart on our webstore, however this resulted in an error occurring which seems to be quite common but no one seems to have an easy fix. The minicart now outputs a JS ...
user avatar
4 votes
0 answers
443 views

Zero price for first item in mini cart

I created a controller to add configurable product to cart but when i try to reload the minicart dynamically using javascript or even refresh the page in product detail page it shows the wrong price ...
Shell Suite's user avatar
  • 1,682
4 votes
2 answers
2k views

mini cart not showing items

I have installed magento 2.0.7 and override minicart.phtml file in my custom theme. After adding product in cart ,click on the Minicart icon in the header, the content area of the minicart displays ...
Asha's user avatar
  • 617
3 votes
5 answers
14k views

Adding quantity increment button in cart and mini cart

I need to add a quantity increment button in cart page and mini cart popup like this. I added the button but I can't assign the functionality. This is what I did app/code/Amsi/UserManagement/...
Ebin Manuval's user avatar
3 votes
3 answers
2k views

Magento 2 How to show count 0 on mini cart when no product is in cart?

Basically i want to show count on cart when no product is in cart.
usman's user avatar
  • 430
3 votes
2 answers
6k views

Magento 2 : Show cart items total to header cart link

I want to display cart items total to my header cart link. I have get some reference from https://magento.stackexchange.com/ but not any solution work for me. Some are works but only it will display ...
Suresh Chikani's user avatar
3 votes
3 answers
5k views

Magento2, echo product attribute in minicart

How can I access product attribute to echo it in minicart /web/template/minicart/item/default.html Like below works for cart page templates/cart/item/default.phtml <?php $product = $_item->...
Zinat's user avatar
  • 2,039
3 votes
2 answers
5k views

Magento 2 Change Minicart Product Image from thumbnail to regular image

After editing the minicart for a couple of days now i've noticed that the images are smaller versions of the images that you would see on the product pages. This means as i'm upscaling them to fit a ...
A. Fletcher's user avatar
3 votes
2 answers
1k views

Magento 2 : Minicart disable quanity box

How can we initially disable quantity box (read-only) of mini cart and enable it while clicking edit link for each separate product ?
Vishal Tanna's user avatar
3 votes
1 answer
2k views

How do I get the discount amount in the minicart for 1.9?

In the minicart of 1.9, the total is produced by $this->getSubtotal(). See file app/design/frontend/rwd/default/template/checkout/cart/minicart/items.phtml. That total does not subtract any potential ...
Klistrian's user avatar
  • 113
3 votes
1 answer
4k views

Magento 2: Minicart Failed to load the "Magento_SalesRule/js/view/payment/discount" component

I am working on MiniCart Extension in which I need a coupon code text box in my Minicart. For that I have overridden default.xml in my Custom Module but everytime It returns following error in the ...
Sameer Bhayani's user avatar
3 votes
1 answer
3k views

How to change process to checkout url of minicart in Magento 2.2.1

I want to change "Process to checkout" url of minicart with custom theme. I override content.html in my custom theme but I don't know how we change url of button. <div class="actions" if="...
Rahul's user avatar
  • 729
3 votes
2 answers
4k views

On hover instead of 'click' for mini cart and top account buttons in Magento RWD theme

Where do i have to change the jQuery functionality to show the drop downs from the 'mini cart' and the 'top-account' on hover instead of click on the desktop versions? Thanks!
Meez's user avatar
  • 483
3 votes
1 answer
2k views

Magento 2 how to get product name and qty in mini cart

Magento 2 how to get product name and its qty in mini cart when we add to mini cart
trilok kumar's user avatar
3 votes
1 answer
3k views

Magento 2 - Product names with special characters

Products having special characters like TM, I am importing products using &trade; for TM, it appears as expected on product detail and listing page. But when the product is added to cart, in mini-...
DEEP JOSHI's user avatar

1
2 3 4 5
10