[Skip to main content](#vessel-content)

#   Add quantity increment and decrement buttons

##

- **[Hristov](/forum/user/12584-hristov "View Hristov's Profile")**
- [![Hristov's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12584-hristov "View Hristov's Profile") Topic Author
- [ Offline](/forum/user/12584-hristov)

Less More

- Posts: 57
- Thank you received: 5
-
-

12 years 2 months ago [\#170541](#170541) by [Hristov](/forum/user/12584-hristov "View Hristov's Profile")  *[Add quantity increment and decrement buttons](/forum/4-how-to/870926-add-quantity-increment-and-decrement-buttons#170541 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.4  Hi Hika team,  I'm trying to add the quantity increment and decrement buttons to the checkout form. (views/cart.php)  I copied the two buttons from show&#95;quantity.php but they don't work.  I added this bit to cart.php as well expecting it to magically start working, but of course it didn't.  How far from the truth am I?  One more question - what does the $i variable do?  Kind regards,  Drago.")* was created by *[Hristov](/forum/user/12584-hristov "View Hristov's Profile")*

-- url of the page with the problem -- : localhost
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4

Hi Hika team,

I'm trying to add the quantity increment and decrement buttons to the checkout form. (views/cart.php)

I copied the two buttons from show_quantity.php but they don't work.

I added this bit to cart.php as well expecting it to magically start working, but of course it didn't. Code:

$i =$this-&gt;params-&gt;get('i'); $min_quantity =$this-&gt;params-&gt;get('min_quantity'); $max_quantity =$this-&gt;params-&gt;get('max_quantity'); $html =$this-&gt;params-&gt;get('html');

How far from the truth am I?

One more question - what does the $i variable do?

Kind regards,

Drago.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDkyNi1hZGQtcXVhbnRpdHktaW5jcmVtZW50LWFuZC1kZWNyZW1lbnQtYnV0dG9ucz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

12 years 2 months ago [\#170591](#170591) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Add quantity increment and decrement buttons](/forum/4-how-to/870926-add-quantity-increment-and-decrement-buttons#170591 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.4  Hi Hika team,  I'm trying to add the quantity increment and decrement buttons to the checkout form. (views/cart.php)  I copied the two buttons from show&#95;quantity.php but they don't work.  I added this bit to cart.php as well expecting it to magically start working, but of course it didn't.  How far from the truth am I?  One more question - what does the $i variable do?  Kind regards,  Drago.")*

Hi,

The view "checkout &#124; cart" does not use the view "product &#124; show_quantity" to display the quantity field.
It provides two different "layout", a simple text box or a drop down list.

If you want to extend the features in that view, you will have to add more content and import some elements from the view "show_quantity" into the checkout cart view.
And you will find the content of " params-&gt;get('html') " in the HikaShop cart class, at the beginning of the function "displayButton".

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDkyNi1hZGQtcXVhbnRpdHktaW5jcmVtZW50LWFuZC1kZWNyZW1lbnQtYnV0dG9ucz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")**
- [![maujbigo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32468-maujbigo "View maujbigo's Profile")
- [ Offline](/forum/user/32468-maujbigo)

Less More

- Posts: 147
- Thank you received: 6
-
-

11 years 6 months ago [\#200959](#200959) by [maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")  Replied by *[maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")* on topic *[Add quantity increment and decrement buttons](/forum/4-how-to/870926-add-quantity-increment-and-decrement-buttons#200959 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.4  Hi Hika team,  I'm trying to add the quantity increment and decrement buttons to the checkout form. (views/cart.php)  I copied the two buttons from show&#95;quantity.php but they don't work.  I added this bit to cart.php as well expecting it to magically start working, but of course it didn't.  How far from the truth am I?  One more question - what does the $i variable do?  Kind regards,  Drago.")*

Hi, Is there a tutorial on how to do this?
I also would like to add the + - buttons to the checkout products.

I copied the link/buttons from "show_quantity" into the cart/checkout. I also copied the params-&gt;get('html') variable from the top of the "show_quantity" and pasted on the top of cart/checkout, but no lucky.
They appear fine but when I click it there is no action. I just takes me to the top of the page. And no effect to the product quantity input field it self.

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDkyNi1hZGQtcXVhbnRpdHktaW5jcmVtZW50LWFuZC1kZWNyZW1lbnQtYnV0dG9ucz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 6 months ago [\#200976](#200976) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Add quantity increment and decrement buttons](/forum/4-how-to/870926-add-quantity-increment-and-decrement-buttons#200976 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.4  Hi Hika team,  I'm trying to add the quantity increment and decrement buttons to the checkout form. (views/cart.php)  I copied the two buttons from show&#95;quantity.php but they don't work.  I added this bit to cart.php as well expecting it to magically start working, but of course it didn't.  How far from the truth am I?  One more question - what does the $i variable do?  Kind regards,  Drago.")*

Hi,

The easiest solution will be to use javascript, onclick on the + or - button in order to update the input field based on its id or via jQuery pointers.

So it require some Javascript / jQuery knowledges.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDkyNi1hZGQtcXVhbnRpdHktaW5jcmVtZW50LWFuZC1kZWNyZW1lbnQtYnV0dG9ucz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.049 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
