shopping cart - plus and minus option (+ or -)

  • Posts: 115
  • Thank you received: 0
12 years 2 weeks ago #74509

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?

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
12 years 2 weeks ago #74555

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:

<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.

  • Posts: 115
  • Thank you received: 0
12 years 2 weeks ago #75008

is it ok to insert the above code , will that do or do I need to add anything else?

many thanks for your reply

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
12 years 2 weeks ago #75010

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.

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum