cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to add quantity button for product increment and decrement

Trying to add quantity button for product increment and decrement

I have a simple text field on my product page as default and i am trying to add a quantity button to increment and decrement as quantity box using KnockoutJS . I think adding a quantity button provide customers an option to easily add quantity for products. But i have been stuck somewhere as i don't know why the button is not functioning properly after clicking. I have followed this tutorial https://magenticians.com/quantity-increment-decrement-magento-2/ . Is there anything missing ?

4 REPLIES 4

Re: Trying to add quantity button for product increment and decrement

So whats the error are you able to see on console ? while clicking on the button ? what exact error are you facing ?

if issue solved,Click Kudos & Accept as Solution

Re: Trying to add quantity button for product increment and decrement

You can get the source codes in the github How to create the buttons increase and decrease quantity in Magento 2

This is the results

 

How to create the buttons increase and decrease quantity in Magento 2.gif

 

See the video how it works https://www.youtube.com/watch?v=ihn9P0cLP80&list=PL98CDCbI3TNvPczWSOnpaMoyxVISLVzYQ&index=24

I hope it will save your time.

Re: Trying to add quantity button for product increment and decrement

I had followed the same tutorial and the button were properly working in my PDP page. 

Please check your folder structure or check the console to see the errors.

Re: Trying to add quantity button for product increment and decrement

There are one or more solution check below link.

 

https://magento.stackexchange.com/questions/229978/magento-2-how-to-add-quantity-increment-decrement...

 

if issue solved,Click Kudos & Accept as Solution

If Issue Solved, Click Kudos/Accept As solutions.