20 votes

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 ...
saravanavelu's user avatar
  • 3,941
17 votes

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 ...
Nagaraju Kasa's user avatar
16 votes

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-...
V.S's user avatar
  • 904
16 votes

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"?> <!-- /** * ...
Dinesh Yadav's user avatar
  • 6,437
14 votes

Abandoned Carts Don't Show in Reports Magento

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 ...
Franc's user avatar
  • 627
13 votes

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 ...
aravind's user avatar
  • 1,834
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 ...
Sander Mangel's user avatar
10 votes

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\...
andy jones's user avatar
  • 1,383
9 votes

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: &...
Sukumar Gorai's user avatar
8 votes

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 ...
Arvind07's user avatar
  • 1,229
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/...
Quisse's user avatar
  • 860
8 votes

Magento 2: Add after/before positioning in pre existing xml block/container

<move element="checkout.cart.shipping" destination="cart.summary" before="-"/> This link helps me. how to change block ordering in layouts
Jancy Abraham's user avatar
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" ...
Surendra Kumar Ahir's user avatar
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'...
Ansar Husain's user avatar
  • 3,409
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 ...
Marius's user avatar
  • 198k
7 votes

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/...
Lucky's user avatar
  • 315
7 votes

$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 ...
Kristof at Fooman's user avatar
7 votes

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:...
Anshu Mishra's user avatar
  • 8,950
6 votes

Abandoned Carts Don't Show in Reports Magento

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 ...
Jitendra Mandloi's user avatar
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
kmdsax's user avatar
  • 562
6 votes

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 ...
Siarhey Uchukhlebau's user avatar
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
Sohel Rana's user avatar
  • 35.7k
6 votes

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 ...
Ronak Chauhan's user avatar
6 votes

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 ...
Aaron Allen's user avatar
  • 9,009
6 votes

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 ...
Pmclain's user avatar
  • 2,588
6 votes

How to add breadcrumbs on cart page in magento2?

Overwrite in ur custom theme magento\vendor\magento\module-checkout\view\frontend\layout\checkout_cart_index.xml to magento\app\design\frontend\<Vendor>\<Theme_Name>\Magento_Checkout\...
Jackson's user avatar
  • 9,889
6 votes

Trigger Proceed to checkout button in Magento2

Here you need to build a module in which you need to use event 'controller_action_predispatch_checkout_index_index'. Create registration.php <?php \Magento\Framework\Component\ComponentRegistrar:...
Magento Dev's user avatar
  • 1,264
5 votes

Persistent Shopping Cart and Guest / Anonymous Users

The time duration for which Item saved into cart depends on two parameters Magento Admin: System -> Configuration -> Web -> Session Cookie Management Cookie Lifetime PHP.ini - session.gc_maxlifetime ...
Elixir Techne's user avatar
5 votes

How to use rewrite the cart/item/default.phtml template file to my module in Magento2

i used plugin for this and it working fine in di.xml <type name="Magento\Checkout\Block\Cart\AbstractCart"> <plugin name="item-test" type="YOURNAMESPACE\Checkout\Block\AbstractCart" ...
Pradeep Kumar's user avatar
5 votes

Magento 2 - Setting "Continue Shopping Url" programmatically

You need to write a plugin to achieve this. For that define di.xml file in your module. File: app/code/<Namespace>/<Module>/etc/frontend/di.xml <?xml version="1.0" ?> <config ...
Rajeev K Tomy's user avatar

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