- Posts: 846
- Thank you received: 92
check box selection instead increment
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
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
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 or Create an account to join the conversation.
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
It require good php knowledges.
Please Log in or Create an account to join the conversation.
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
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
Please Log in or Create an account to join the conversation.
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->Views and hide the quantity field (with a display:none for example):
I think that it will be the easiest.
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
onclick="document.getElementById('hikashop_listing_quantity_<?php echo $this->row->product_id;?>').value=intval(this.checked);"
or something like that.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
lionel75 wrote: hi
intval is not define refer to firebug ?
regard's
Please Log in or Create an account to join the conversation.
it's parseInt, not intval. My mistake. intval is for php:
stackoverflow.com/questions/2322935/trying-to-change-string-int
Please Log in or Create an account to join the conversation.
I use your software in a non standart way but it 's really work with little modification !!!
Thank's a lot .
Please Log in or Create an account to join the conversation.