- Posts: 115
- Thank you received: 0
shopping cart - plus and minus option (+ or -)
13 years 10 months ago #74509
by itye2012
shopping cart - plus and minus option (+ or -) was created by itye2012
is there any way you can add a "+" or "-" option in the shopping cart. For example if a user wants to purchase more than one item I would like them to just click + or - in the cart to add or remove number of items in the cart without having to go back and add this manually
is this possible?
is this possible?
Please Log in or Create an account to join the conversation.
13 years 10 months ago #74555
by Xavier
Replied by Xavier on topic Re: shopping cart - plus and minus option (+ or -)
Hi,
It can be possible, edit the view "checkout / cart" in HikaShop > Display > Views, and add a "+" with some javascript actions when you click on it like:
It require some PHP and JavaScript knowledge.
It can be possible, edit the view "checkout / cart" in HikaShop > Display > Views, and add a "+" with some javascript actions when you click on it like:
Code:
<a href="#" onClick="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $product-product_id;?>'); qty_field.value += 1; qty_field.form.submit();">+</a>
It require some PHP and JavaScript knowledge.
Please Log in or Create an account to join the conversation.
13 years 10 months ago #75008
by itye2012
Replied by itye2012 on topic Re: shopping cart - plus and minus option (+ or -)
is it ok to insert the above code , will that do or do I need to add anything else?
many thanks for your reply
many thanks for your reply
Please Log in or Create an account to join the conversation.
13 years 10 months ago #75010
by Xavier
Replied by Xavier on topic Re: shopping cart - plus and minus option (+ or -)
Hi,
I have not test this code, but I think that it will do the trick. Not sure on the variable "$product->product_id", maybe you will have to use something else.
I have not test this code, but I think that it will do the trick. Not sure on the variable "$product->product_id", maybe you will have to use something else.
Please Log in or Create an account to join the conversation.
Time to create page: 0.173 seconds