how to add quantity increment and decreament (+ and - button) in minicart magento 2? Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?shopping cart page increment and decrement buttonIncrement and decrement qty button on shopping cart pageHow to add “Empty Cart” button to minicartUpdate quantity in minicartQuantity Increment and Decrement Button not work in Magento 2Magento 2 product list quantity increment buttonsAdding quantity increment button in cart and mini cartAdd Ajax Quantity Increment and Decrement Button on mini cart in Magento 2How to use blue foot cms in magento 2.3 cmsSalable Quantity is showing zero in product grid magento 2?
When -s is used with third person singular. What's its use in this context?
How much radiation do nuclear physics experiments expose researchers to nowadays?
Can a non-EU citizen traveling with me come with me through the EU passport line?
When to stop saving and start investing?
What are 'alternative tunings' of a guitar and why would you use them? Doesn't it make it more difficult to play?
Is it true that "carbohydrates are of no use for the basal metabolic need"?
Is there a Spanish version of "dot your i's and cross your t's" that includes the letter 'ñ'?
What is the longest distance a 13th-level monk can jump while attacking on the same turn?
Why is black pepper both grey and black?
How to find all the available tools in macOS terminal?
What are the pros and cons of Aerospike nosecones?
How to bypass password on Windows XP account?
How can I fade player when goes inside or outside of the area?
Single word antonym of "flightless"
Should gear shift center itself while in neutral?
Stars Make Stars
Does accepting a pardon have any bearing on trying that person for the same crime in a sovereign jurisdiction?
Do I really need recursive chmod to restrict access to a folder?
3 doors, three guards, one stone
Should I use Javascript Classes or Apex Classes in Lightning Web Components?
Is there a "higher Segal conjecture"?
Disable hyphenation for an entire paragraph
Why is "Captain Marvel" translated as male in Portugal?
How to deal with a team lead who never gives me credit?
how to add quantity increment and decreament (+ and - button) in minicart magento 2?
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?shopping cart page increment and decrement buttonIncrement and decrement qty button on shopping cart pageHow to add “Empty Cart” button to minicartUpdate quantity in minicartQuantity Increment and Decrement Button not work in Magento 2Magento 2 product list quantity increment buttonsAdding quantity increment button in cart and mini cartAdd Ajax Quantity Increment and Decrement Button on mini cart in Magento 2How to use blue foot cms in magento 2.3 cmsSalable Quantity is showing zero in product grid magento 2?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
actually i am trying to add quantity increment and decreament (+ and
- button) in minicart magento 2.3.
If anyone have any idea please guide me.
magento2.3 mini-cart quantity custom-theme qty-increment
add a comment |
actually i am trying to add quantity increment and decreament (+ and
- button) in minicart magento 2.3.
If anyone have any idea please guide me.
magento2.3 mini-cart quantity custom-theme qty-increment
add a comment |
actually i am trying to add quantity increment and decreament (+ and
- button) in minicart magento 2.3.
If anyone have any idea please guide me.
magento2.3 mini-cart quantity custom-theme qty-increment
actually i am trying to add quantity increment and decreament (+ and
- button) in minicart magento 2.3.
If anyone have any idea please guide me.
magento2.3 mini-cart quantity custom-theme qty-increment
magento2.3 mini-cart quantity custom-theme qty-increment
edited Feb 25 at 6:11
Ashish Viradiya
1,2301831
1,2301831
asked Feb 22 at 7:35
hitesh balpandehitesh balpande
3929
3929
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Magento 2 using KnockoutJs for render data in Minicart.
You can override template:vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
And call to ajax function for update datacheckout/sidebar/updateItemQty/
Or use free module:https://github.com/php-cuong/magento2-qty
add a comment |
app/design/frontend/Module/theme/Magento_Checkout/web/template/minicart/item/default.html
<div class="product-item-pricing">
<!-- ko if: canApplyMsrp -->
<div class="details-map">
<span class="label" data-bind="i18n: 'Price'"></span>
<span class="value" data-bind="i18n: 'See price before order confirmation.'"></span>
</div>
<!-- /ko -->
<!-- ko ifnot: canApplyMsrp -->
<!-- ko foreach: $parent.getRegion('priceSidebar') -->
<!-- ko template: name: getTemplate(), data: item.product_price, as: 'price' --><!-- /ko -->
<!-- /ko -->
<!-- /ko -->
<div class="details-qty qty">
<label class="label" data-bind="i18n: 'Qty', attr:
for: 'cart-item-'+item_id+'-qty'"></label>
<div class="more">+</div>
<input data-bind="attr:
id: 'cart-item-'+item_id+'-qty',
'data-cart-item': item_id,
'data-item-qty': qty,
'data-cart-item-id': product_sku
, value: qty"
type="number"
size="4"
class="item-qty cart-item-qty">
<div class="less">-</div>
<button data-bind="attr:
id: 'update-cart-item-'+item_id,
'data-cart-item': item_id,
title: $t('Update')
"
class="update-cart-item"
style="display: none">
<span data-bind="i18n: 'Update'"></span>
</button>
</div>
</div>
app/design/frontend/Module/theme/Magento_Checkout/templates/cart/minicart.phtml
<script type="text/javascript">
require(["jquery"],function($){
$('body').on("click",".more, .less",function()
var obj = $(this);
var currentQty = obj.siblings('.cart-item-qty').val();
var iid = obj.siblings('.update-cart-item').attr('data-cart-item');
if(obj.hasClass('more'))
var newAdd = parseInt(currentQty)+parseInt(1);
obj.siblings('.cart-item-qty').val(newAdd);
obj.siblings('.cart-item-qty').attr('data-item-qty',newAdd);
//$('#update-cart-item-'+iid).click();
$('.update-cart-item').show();
else
if(parseInt(currentQty) > 1)
var newAdd = parseInt(currentQty)-parseInt(1);
obj.siblings('.cart-item-qty').val(newAdd);
obj.siblings('.cart-item-qty').attr('data-item-qty',newAdd);
//$('#update-cart-item-'+iid).click();
$('.update-cart-item').show();
);
);
</script>
Its working fine for me.
add a comment |
For ajax increment and decrement quantity in minicart you can use the below extension.
https://github.com/kirtinariya1/MinicartAjaxQtyIncrementDecrement
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f262976%2fhow-to-add-quantity-increment-and-decreament-and-button-in-minicart-magent%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Magento 2 using KnockoutJs for render data in Minicart.
You can override template:vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
And call to ajax function for update datacheckout/sidebar/updateItemQty/
Or use free module:https://github.com/php-cuong/magento2-qty
add a comment |
Magento 2 using KnockoutJs for render data in Minicart.
You can override template:vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
And call to ajax function for update datacheckout/sidebar/updateItemQty/
Or use free module:https://github.com/php-cuong/magento2-qty
add a comment |
Magento 2 using KnockoutJs for render data in Minicart.
You can override template:vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
And call to ajax function for update datacheckout/sidebar/updateItemQty/
Or use free module:https://github.com/php-cuong/magento2-qty
Magento 2 using KnockoutJs for render data in Minicart.
You can override template:vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
And call to ajax function for update datacheckout/sidebar/updateItemQty/
Or use free module:https://github.com/php-cuong/magento2-qty
answered Feb 22 at 9:34
bang.nguyen47bang.nguyen47
1115
1115
add a comment |
add a comment |
app/design/frontend/Module/theme/Magento_Checkout/web/template/minicart/item/default.html
<div class="product-item-pricing">
<!-- ko if: canApplyMsrp -->
<div class="details-map">
<span class="label" data-bind="i18n: 'Price'"></span>
<span class="value" data-bind="i18n: 'See price before order confirmation.'"></span>
</div>
<!-- /ko -->
<!-- ko ifnot: canApplyMsrp -->
<!-- ko foreach: $parent.getRegion('priceSidebar') -->
<!-- ko template: name: getTemplate(), data: item.product_price, as: 'price' --><!-- /ko -->
<!-- /ko -->
<!-- /ko -->
<div class="details-qty qty">
<label class="label" data-bind="i18n: 'Qty', attr:
for: 'cart-item-'+item_id+'-qty'"></label>
<div class="more">+</div>
<input data-bind="attr:
id: 'cart-item-'+item_id+'-qty',
'data-cart-item': item_id,
'data-item-qty': qty,
'data-cart-item-id': product_sku
, value: qty"
type="number"
size="4"
class="item-qty cart-item-qty">
<div class="less">-</div>
<button data-bind="attr:
id: 'update-cart-item-'+item_id,
'data-cart-item': item_id,
title: $t('Update')
"
class="update-cart-item"
style="display: none">
<span data-bind="i18n: 'Update'"></span>
</button>
</div>
</div>
app/design/frontend/Module/theme/Magento_Checkout/templates/cart/minicart.phtml
<script type="text/javascript">
require(["jquery"],function($){
$('body').on("click",".more, .less",function()
var obj = $(this);
var currentQty = obj.siblings('.cart-item-qty').val();
var iid = obj.siblings('.update-cart-item').attr('data-cart-item');
if(obj.hasClass('more'))
var newAdd = parseInt(currentQty)+parseInt(1);
obj.siblings('.cart-item-qty').val(newAdd);
obj.siblings('.cart-item-qty').attr('data-item-qty',newAdd);
//$('#update-cart-item-'+iid).click();
$('.update-cart-item').show();
else
if(parseInt(currentQty) > 1)
var newAdd = parseInt(currentQty)-parseInt(1);
obj.siblings('.cart-item-qty').val(newAdd);
obj.siblings('.cart-item-qty').attr('data-item-qty',newAdd);
//$('#update-cart-item-'+iid).click();
$('.update-cart-item').show();
);
);
</script>
Its working fine for me.
add a comment |
app/design/frontend/Module/theme/Magento_Checkout/web/template/minicart/item/default.html
<div class="product-item-pricing">
<!-- ko if: canApplyMsrp -->
<div class="details-map">
<span class="label" data-bind="i18n: 'Price'"></span>
<span class="value" data-bind="i18n: 'See price before order confirmation.'"></span>
</div>
<!-- /ko -->
<!-- ko ifnot: canApplyMsrp -->
<!-- ko foreach: $parent.getRegion('priceSidebar') -->
<!-- ko template: name: getTemplate(), data: item.product_price, as: 'price' --><!-- /ko -->
<!-- /ko -->
<!-- /ko -->
<div class="details-qty qty">
<label class="label" data-bind="i18n: 'Qty', attr:
for: 'cart-item-'+item_id+'-qty'"></label>
<div class="more">+</div>
<input data-bind="attr:
id: 'cart-item-'+item_id+'-qty',
'data-cart-item': item_id,
'data-item-qty': qty,
'data-cart-item-id': product_sku
, value: qty"
type="number"
size="4"
class="item-qty cart-item-qty">
<div class="less">-</div>
<button data-bind="attr:
id: 'update-cart-item-'+item_id,
'data-cart-item': item_id,
title: $t('Update')
"
class="update-cart-item"
style="display: none">
<span data-bind="i18n: 'Update'"></span>
</button>
</div>
</div>
app/design/frontend/Module/theme/Magento_Checkout/templates/cart/minicart.phtml
<script type="text/javascript">
require(["jquery"],function($){
$('body').on("click",".more, .less",function()
var obj = $(this);
var currentQty = obj.siblings('.cart-item-qty').val();
var iid = obj.siblings('.update-cart-item').attr('data-cart-item');
if(obj.hasClass('more'))
var newAdd = parseInt(currentQty)+parseInt(1);
obj.siblings('.cart-item-qty').val(newAdd);
obj.siblings('.cart-item-qty').attr('data-item-qty',newAdd);
//$('#update-cart-item-'+iid).click();
$('.update-cart-item').show();
else
if(parseInt(currentQty) > 1)
var newAdd = parseInt(currentQty)-parseInt(1);
obj.siblings('.cart-item-qty').val(newAdd);
obj.siblings('.cart-item-qty').attr('data-item-qty',newAdd);
//$('#update-cart-item-'+iid).click();
$('.update-cart-item').show();
);
);
</script>
Its working fine for me.
add a comment |
app/design/frontend/Module/theme/Magento_Checkout/web/template/minicart/item/default.html
<div class="product-item-pricing">
<!-- ko if: canApplyMsrp -->
<div class="details-map">
<span class="label" data-bind="i18n: 'Price'"></span>
<span class="value" data-bind="i18n: 'See price before order confirmation.'"></span>
</div>
<!-- /ko -->
<!-- ko ifnot: canApplyMsrp -->
<!-- ko foreach: $parent.getRegion('priceSidebar') -->
<!-- ko template: name: getTemplate(), data: item.product_price, as: 'price' --><!-- /ko -->
<!-- /ko -->
<!-- /ko -->
<div class="details-qty qty">
<label class="label" data-bind="i18n: 'Qty', attr:
for: 'cart-item-'+item_id+'-qty'"></label>
<div class="more">+</div>
<input data-bind="attr:
id: 'cart-item-'+item_id+'-qty',
'data-cart-item': item_id,
'data-item-qty': qty,
'data-cart-item-id': product_sku
, value: qty"
type="number"
size="4"
class="item-qty cart-item-qty">
<div class="less">-</div>
<button data-bind="attr:
id: 'update-cart-item-'+item_id,
'data-cart-item': item_id,
title: $t('Update')
"
class="update-cart-item"
style="display: none">
<span data-bind="i18n: 'Update'"></span>
</button>
</div>
</div>
app/design/frontend/Module/theme/Magento_Checkout/templates/cart/minicart.phtml
<script type="text/javascript">
require(["jquery"],function($){
$('body').on("click",".more, .less",function()
var obj = $(this);
var currentQty = obj.siblings('.cart-item-qty').val();
var iid = obj.siblings('.update-cart-item').attr('data-cart-item');
if(obj.hasClass('more'))
var newAdd = parseInt(currentQty)+parseInt(1);
obj.siblings('.cart-item-qty').val(newAdd);
obj.siblings('.cart-item-qty').attr('data-item-qty',newAdd);
//$('#update-cart-item-'+iid).click();
$('.update-cart-item').show();
else
if(parseInt(currentQty) > 1)
var newAdd = parseInt(currentQty)-parseInt(1);
obj.siblings('.cart-item-qty').val(newAdd);
obj.siblings('.cart-item-qty').attr('data-item-qty',newAdd);
//$('#update-cart-item-'+iid).click();
$('.update-cart-item').show();
);
);
</script>
Its working fine for me.
app/design/frontend/Module/theme/Magento_Checkout/web/template/minicart/item/default.html
<div class="product-item-pricing">
<!-- ko if: canApplyMsrp -->
<div class="details-map">
<span class="label" data-bind="i18n: 'Price'"></span>
<span class="value" data-bind="i18n: 'See price before order confirmation.'"></span>
</div>
<!-- /ko -->
<!-- ko ifnot: canApplyMsrp -->
<!-- ko foreach: $parent.getRegion('priceSidebar') -->
<!-- ko template: name: getTemplate(), data: item.product_price, as: 'price' --><!-- /ko -->
<!-- /ko -->
<!-- /ko -->
<div class="details-qty qty">
<label class="label" data-bind="i18n: 'Qty', attr:
for: 'cart-item-'+item_id+'-qty'"></label>
<div class="more">+</div>
<input data-bind="attr:
id: 'cart-item-'+item_id+'-qty',
'data-cart-item': item_id,
'data-item-qty': qty,
'data-cart-item-id': product_sku
, value: qty"
type="number"
size="4"
class="item-qty cart-item-qty">
<div class="less">-</div>
<button data-bind="attr:
id: 'update-cart-item-'+item_id,
'data-cart-item': item_id,
title: $t('Update')
"
class="update-cart-item"
style="display: none">
<span data-bind="i18n: 'Update'"></span>
</button>
</div>
</div>
app/design/frontend/Module/theme/Magento_Checkout/templates/cart/minicart.phtml
<script type="text/javascript">
require(["jquery"],function($){
$('body').on("click",".more, .less",function()
var obj = $(this);
var currentQty = obj.siblings('.cart-item-qty').val();
var iid = obj.siblings('.update-cart-item').attr('data-cart-item');
if(obj.hasClass('more'))
var newAdd = parseInt(currentQty)+parseInt(1);
obj.siblings('.cart-item-qty').val(newAdd);
obj.siblings('.cart-item-qty').attr('data-item-qty',newAdd);
//$('#update-cart-item-'+iid).click();
$('.update-cart-item').show();
else
if(parseInt(currentQty) > 1)
var newAdd = parseInt(currentQty)-parseInt(1);
obj.siblings('.cart-item-qty').val(newAdd);
obj.siblings('.cart-item-qty').attr('data-item-qty',newAdd);
//$('#update-cart-item-'+iid).click();
$('.update-cart-item').show();
);
);
</script>
Its working fine for me.
edited Feb 25 at 6:04
answered Feb 22 at 14:26
hitesh balpandehitesh balpande
3929
3929
add a comment |
add a comment |
For ajax increment and decrement quantity in minicart you can use the below extension.
https://github.com/kirtinariya1/MinicartAjaxQtyIncrementDecrement
add a comment |
For ajax increment and decrement quantity in minicart you can use the below extension.
https://github.com/kirtinariya1/MinicartAjaxQtyIncrementDecrement
add a comment |
For ajax increment and decrement quantity in minicart you can use the below extension.
https://github.com/kirtinariya1/MinicartAjaxQtyIncrementDecrement
For ajax increment and decrement quantity in minicart you can use the below extension.
https://github.com/kirtinariya1/MinicartAjaxQtyIncrementDecrement
answered yesterday
Kirti NariyaKirti Nariya
1,183415
1,183415
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f262976%2fhow-to-add-quantity-increment-and-decreament-and-button-in-minicart-magent%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown