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
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"?>
<!--
/**
* ...
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 ...
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\...
9
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" ...
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
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/...
8
votes
Accepted
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
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'...
8
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:...
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/...
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 ...
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
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
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 ...
6
votes
Order total not showing including tax in shopping cart
in grand-total.js,
change:
getPureValue: function() {
var totals = quote.getTotals()();
if (totals) {
return totals.grand_total;
}
return quote.grand_total;
},
to:
...
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 ...
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\...
6
votes
Accepted
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:...
5
votes
Magento 2: How to remove Paypal Logo from MiniCart & Shopping Cart Page?
You can remove logo using backend.
Stores -> Configuration -> Sales -> Payment Method
Paypal Express Checkout Tab
Click Configure Button,
Go To Basic Settings - Paypal Express Checkout ...
5
votes
Magento 2: How to remove Paypal Logo from MiniCart & Shopping Cart Page?
Copy this file to your custom theme:
vendor/magento/module-checkout/view/frontend/web/template/minicart/content.html
to
app/design/frontend/PACKAGE/THEME/Magento_Checkout/web/template/minicart/...
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 ...
5
votes
Order total not showing including tax in shopping cart
I had the similar issue. This worked for me:
Change grand-total component in checkout_cart_index.xml in Magento_Checkout module(under Magento_Checkout/layout in your theme Directory) to Magento_Tax/...
5
votes
Magento 2 : Cannot Read Property "quoteData" of undefined
For my case it was this block
<referenceBlock name="checkout.cart.shipping" remove="true"/>
I removed that line and I overwrote shipping.phtml on my theme to remove the shipping address and to ...
5
votes
Accepted
Cart items not updating properly in Magento 2
Finally I did it.
<?php
namespace ABCSolutions\LimitCartQty\Observer;
use \Magento\Framework\Message\ManagerInterface ;
class UpdateCartQtyBasedOnCustomerGroupAtObserver implements \Magento\...
5
votes
Magento2: How to add product description to shopping cart and checkout page?
Please follow the below steps:
Step 1: description is an default attribute for the product hence call the same from your custom module as shown below.
/app/etc/NameSpace/ModuleName/etc/...
5
votes
Magento 2 : How to change grand total in shopping cart page
Answer of Khoa helps me to get my solution but for just to explain in details I am posting my answer.
1) Create checkout_cart_index.xml file in your design with below content.
2) Clear cache and ...
5
votes
Magento 2: How to replace minicart icon
Try something like this in your .css:
.minicart-wrapper a.action.showcart::before {
content: "*whatever content you want, for example Font Awesome*";
}
You can also use a background-image.
Here'...
5
votes
Accepted
How to clear item in cart in frontend web page programmatically?
You can delete cart items using below code.
public function deleteQuoteItems()
{
$checkoutSession = $this->getCheckoutSession();
$allItems = $checkoutSession->getQuote()->...
5
votes
Accepted
plus, minus in cart page
For the cart page
First, override this file in your module or theme Path: vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
Find the element <div class="control qty"...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
shopping-cart × 577magento2 × 172
cart × 148
magento-1.9 × 127
shopping-cart-price-rules × 54
checkout × 51
addtocart × 48
magento-2.1 × 33
magento-1.8 × 30
mini-cart × 27
magento-1.7 × 26
magento2.3 × 23
shipping × 21
product × 20
ajax × 17
php × 14
event-observer × 14
onepage-checkout × 13
custom-options × 13
configurable-product × 11
quote × 11
free-shipping × 11
magento-1 × 10
tax × 10
quantity × 10