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

#   check box selection instead increment

##

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

Less More

- Posts: 846
- Thank you received: 92
-
-

13 years 4 months ago -  13 years 4 months ago [\#111499](#111499) by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")  *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#111499 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")* was created by *[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")*

Hi

hikashop use increment logic for choose the number of same article
Does hikashop support in the case there is only many unique single article a checkbox ?

Thank's

Last edit: 13 years 4 months ago by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile").

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

13 years 4 months ago [\#111522](#111522) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#111522 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")*

Hi,

If you want to be able to add only one product on your add to cart buttons, you can change the option "Display the quantity field on the product page" of the configuration to "no display".

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

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

Less More

- Posts: 846
- Thank you received: 92
-
-

13 years 4 months ago [\#111549](#111549) by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")  Replied by *[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")* on topic *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#111549 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")*

No i really need that hikashop handle select item not by define number attach to a product in the client side but by checkbox ....
if end user select an item article ( check) then it mean he could only buy this product once ( after he buy it another the next end user could not buy it )

regard's

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg0MzU2LWNoZWNrLWJveC1zZWxlY3Rpb24taW5zdGVhZC1pbmNyZW1lbnQ/dG1wbD1tYXJrZG93bg==) 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)
-

13 years 4 months ago [\#111571](#111571) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#111571 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")*

Hi,

Without checkbox it can have the same effect, you jsut have to set a quantity of 1 for the product, and it will be a unique product which can be purchased only once.
In the option you can set too to not display the out of stock products.

To have the checkbox, it will require a button template override, you can find some documentation here:
[ www.hikashop.com/fr/support/documentatio...r-documentation.html](http://www.hikashop.com/fr/support/documentation/62-hikashop-developer-documentation.html)
It require good php knowledges.

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

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

Less More

- Posts: 846
- Thank you received: 92
-
-

13 years 3 months ago -  13 years 3 months ago [\#112178](#112178) by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")  Replied by *[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")* on topic *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#112178 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")*

Hello

Yes i think override is the way to go . You write button override not file template layout override , is it like this ?.In the client side there is no joomla only html css javascript and HTML element and checkbox is html element standart !!! .

i have a look to some code and see a lot of javascript for layout view of article so really not easy to understand. For increment increment "gui" , which implementation choice is use for increment ?
(jquery , ajax , GET /POST , JSON ......... ?
Does cart is the API that manage in the server side the number of product select in the client side ?
[ www.hikashop.com/fr/support/documentatio...umentation.html#cart](http://www.hikashop.com/fr/support/documentation/62-hikashop-developer-documentation.html#cart)

Which files are is use to send "increment gui/widget" and to compute the choice after the user send his choice to the server ?

I think a increment widget is more advance ( javascript is use ) than a default html checkbox !!
so implement checkbox in client side must be more easy when work ( "remove" /simplify code ) for starting coding using a copy of the files that manage increment ( send receive) ?

Could you check if what i write is right or wrong and have more information about button override on the server side ? (some link .... the name of the joomla class to extend )

Thank's

Last edit: 13 years 3 months ago by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile").

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

13 years 3 months ago [\#112189](#112189) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#112189 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")*

If you want to add a checkbox for each product on your listings, first you can change the option "Display the quantity field on the product page" of the configuration to "global on listing".
That will display a quantity field for each product with a global add to cart button at the bottom.
Then, you can edit the file add_to_cart_listing via the menu Display-&gt;Views and hide the quantity field (with a display:none for example): Code:

&lt;input id="hikashop_listing_quantity_&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;" type="text" style="width:40px;" name="data[&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;]" class="hikashop_listing_quantity_field" value="0" /&gt;

and add next to it a checkbox with some javascript which will change the value of the input field when the checkbox is ticked or unticked.

I think that it will be the easiest.

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

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

Less More

- Posts: 846
- Thank you received: 92
-
-

13 years 3 months ago -  13 years 3 months ago [\#112528](#112528) by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")  Replied by *[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")* on topic *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#112528 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")*

Do you mean that click on the check box can using javascript
1 change the value stock to 0 ( if enabled) or 1 (if disabled)
2 emulate a click on the hidden button to send information in the server ?
3 update the module cart item with the article ( uncheck/check box article) ?

Thank's

Last edit: 13 years 3 months ago by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile").

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

13 years 3 months ago [\#112537](#112537) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#112537 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")*

I mean option 1. You just update the value of the input with javascript. It's basic JS code.
onclick="document.getElementById('hikashop_listing_quantity_&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;').value=intval(this.checked);"

or something like that.

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

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

Less More

- Posts: 846
- Thank you received: 92
-
-

13 years 3 months ago [\#112555](#112555) by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")  Replied by *[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")* on topic *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#112555 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")*

thank's , i hate javascript so i hope it ll work after test some basic code .

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

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

Less More

- Posts: 846
- Thank you received: 92
-
-

13 years 3 months ago -  13 years 3 months ago [\#112737](#112737) by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")  Replied by *[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")* on topic *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#112737 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")*

hi

Last edit: 13 years 3 months ago by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile").

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

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

Less More

- Posts: 846
- Thank you received: 92
-
-

13 years 3 months ago -  13 years 3 months ago [\#112739](#112739) by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")  Replied by *[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")* on topic *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#112739 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")*

> lionel75 wrote: hi
>
> intval is not define refer to firebug ?
>
> regard's

Last edit: 13 years 3 months ago by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile").

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

13 years 3 months ago [\#113068](#113068) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#113068 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")*

Hi,

it's parseInt, not intval. My mistake. intval is for php:
[ stackoverflow.com/questions/2322935/trying-to-change-string-int](http://stackoverflow.com/questions/2322935/trying-to-change-string-int)

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

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

Less More

- Posts: 846
- Thank you received: 92
-
-

13 years 3 months ago -  13 years 3 months ago [\#113104](#113104) by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")  Replied by *[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")* on topic *[check box selection instead increment](/forum/2-general-talk-about-hikashop/84356-check-box-selection-instead-increment#113104 "Hi  hikashop use increment logic for choose the number of same article Does hikashop support in the case there is only many unique single article a checkbox ?  Thank's")*

your code was usefull ..
I use your software in a non standart way but it 's really work with little modification !!!

Thank's a lot .

Last edit: 13 years 3 months ago by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg0MzU2LWNoZWNrLWJveC1zZWxlY3Rpb24taW5zdGVhZC1pbmNyZW1lbnQ/dG1wbD1tYXJrZG93bg==) 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.083 seconds

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

[](#top)
