20 votes
Accepted

Magento2 redirecting to Shopping cart

Like Magento1.x, there is an option in Magento2 admin panel to redirect to shopping cart page after adding product to cart. Change the option as, Stores->Configuration->Sales->Checkout->Shopping ...
  • 3,941
17 votes
Accepted

Grand Total not updated when discount code is applied

Please follow the below steps might be useful. Path:- app/code/core/Mage/Sales/Model/Config/Ordered.php Comment this code /** * Aggregate before/after information from all items and ...
16 votes
Accepted

Customize sticky behaviour of Cart Summary: Magento 2

I finally found the answer to this. The sticky behavior of the cart summary is due to the code in the file magento_root/vendor/magento/theme-frontend-blank/Magento_Theme/web/js/theme.js. $('.cart-...
  • 904
16 votes
Accepted

How to add breadcrumbs on cart page in magento2?

Create a file app/design/frontend/vendor/theme/Magento_Checkout/layout/checkout_cart_index.xml and add following code in checkout_cart_index.xml file <?xml version="1.0"?> <!-- /** * ...
  • 6,309
14 votes
Accepted

Auto update cart quantity when change quantity

First edit the cart template /app/design/frontend/{package}/{theme}/template/checkout/cart.phtml and add an id on the form element for easier access. Let's say you add 'id="cart-form"'; Now edit the ...
  • 197k
14 votes
Accepted

How to increase customer session time

Go to System > Configuration > Web > Session Cookie Management and set Cookie Lifetime
14 votes

Abandoned Carts Don't Show in Reports Magento 1.9.2.2

This is a magento core bug. What happens is, when customers are registered on website, the middle name attribute entity value is not created at the customer_entity_varchar table. The value should be ...
  • 627
13 votes
Accepted

Adding quantity increment button in cart and mini cart

app/code/Amsi/UserManagement/view/frontend/templates/cart/item/default.phtml I have added For both increment and decrementing quantity. You can add the button ...
  • 1,754
11 votes

persistent shopping cart disadvantages

@Marius while you would expect that to be logical in reality there is an edge case where the guest checkout option is disabled. Replication Logged in customer adds items to basket Customer closes ...
  • 828
11 votes

Shopping cart sorting

We'll need to fix this in 2 parts. The first part is actually tracking which simple products in the cart come from grouped products. The second is the sorting. First for the tracking. We'll add an ...
  • 37.5k
10 votes
Accepted

Magento2 - How to add placeholder to knockoutjs field?

This is a bit of a shot in the dark, as I've only looked at it for around 15 minutes. But it looks as thought the placeholder is coming from the Abstract.js this file is located Vender\Theme\...
  • 1,383
9 votes
Accepted

Hide State/Province from Estimate and shipping tax from cart page magento2

You can do it by following method: Create a file with name checkout_cart_index.xml under app/design/frontend/Vendor/theme/Magento_Checkout/layout/checkout_cart_index.xml and add the below code: &...
8 votes

which phtml file is called by $this->renderTotals()?

The easier way to find out what template is used is to enable the template path hints. But here is the stacktrace you need to follow. Mage_Checkout_Block_Cart_Totals::renderTotals calls renderTotal ...
  • 197k
8 votes
Accepted

Share cart in magento 2 multistore

Finally I sorted it out. So for sake of others, here is how we share cart between Magento multistore setup on different domains: Magento configuration: Create 2 different stores, store views under a ...
  • 1,211
8 votes

How to modify minicart.js Magento 2?

You'd better extend the minicart component. For example: app/code/vendor/module/view/frontend/requirejs-config.js var config = { 'config': { 'mixins': { 'Magento_Checkout/js/...
  • 810
8 votes

How to update cart qty using ajax Magento 2

Reload totals cart after ajax change quantity 1. Step In your custom them create ( Magento_Theme/layout/checkout_cart_index.xml ) <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
8 votes

Magento 2 Custom remove item from cart button

You can simply use in app/design/frontend/Vendor/Themename/Magento_Checkout/templates/cart/item/default.phtml below code. <a href="#" title="<?= $block->escapeHtml(__('Remove item'...
  • 3,279
7 votes

Update Shopping Cart button in checkout/cart does not update the quantity when clicked

Found the solution. I replaced <?php echo $this->getBlockHtml(‘formkey’); ?> with <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->...
  • 151
7 votes

which observer to call while removing item from cart and empty cart?

Besides the controller pre|post dispatch events that don't do you much good, though you can still use them controller_action_predispatch_checkout_cart_delete and ...
  • 197k
7 votes
Accepted

Magento 2 : Update Cart summary html

Update cart summary in ajax response has been solved, we need to call getTotalsAction() javascript function as i mentioned below code : demo.js define([ 'jquery', 'Magento_Checkout/...
  • 305
7 votes
Accepted

$block Class Some Method is won't appear in get_class_methods() call

Throughout, Magento uses a range of magic methods (they start with get, set, uns and has) which do not appear in the method list. These methods are shortcuts to access data that has been set on the ...
7 votes
Accepted

How to pass data from PHP to JavaScript component

You can add your custom data to window.checkoutConfig object from your custom module app/code/Anshu/Custom/etc/frontend/di.xml <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http:...
  • 8,858
6 votes

Auto update cart quantity when change quantity

Assuming your site has jQuery included in no-conflict mode, here's a way of doing this asynchronously (much less annoying!). jQuery(document).ready(function(){ jQuery('#shopping-cart-table') .on( ...
6 votes

Abandoned Carts Don't Show in Reports Magento 1.9.2.2

Solutions: Yes this is known bug caused by the middle name attribute in recent versions of Magento. Here is the solution for this issue, we need to insert records for middle name attribute for old ...
6 votes

Grand Total not updated when discount code is applied

Had this same exact problem (#1) on CE 1.9 running PHP 7, applying the Inchoo "PHP 7 compatibility extension for Magento 1" solved the issue! https://github.com/Inchoo/Inchoo_PHP7
  • 562
6 votes
Accepted

Change Shopping Cart Title

You can change this directly in the checkout i18l file: app/code/Magento/Checkout/i18n/en_US.csv in your theme, like: app/design/frontend/Vendor/theme/i18n/en_US.csv Just change string ...
6 votes

Magento 2 - How to set a maximum order qty of individual products?

For Magento 2.1.x Goto Admin -> Stores -> Configuration For individual settings, go to product details Click Advanced Inventory
6 votes
Accepted

Magento 2 Add to cart one product with different size at once but seems as one product

Magento core module retrive Product object using $product = $this->_initProduct(); as it checks in cart session and retrive previous Item Id if matched so all need to do is remove ...
6 votes
Accepted

What does the Magento 2 ko scope: 'minicart_content' reference?

This is telling knockoutJS to use the minicart_content ui component as the base object. What this means is that data-bind="html: getCartParam('subtotal') resolves to the getCartParam method found in ...
  • 8,889
6 votes
Accepted

Remove Shipping Estimate Block From Cart Summary

Completely removing the shipping estimate block breaks a fair bit of javascript causing the total summary to not render. I recently got around this by disabling the UI Component, instead of removing ...
  • 2,458

Only top scored, non community-wiki answers of a minimum length are eligible