+ and - instead Refresh button in Chekout and Cart

  • Posts: 81564
  • Thank you received: 13072
  • MODERATOR
7 years 3 weeks ago #266747

Hi,

For the cart module, you can use such javascript:
window.hikashop.submitCartModule(this, 'hikashop_cart_<?php echo $module_id; ?>', 'cart');

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

  • Posts: 177
  • Thank you received: 5
7 years 3 weeks ago #266810

nicolas wrote: Hi,
For the cart module, you can use such javascript:
window.hikashop.submitCartModule(this, 'hikashop_cart_<?php echo $module_id; ?>', 'cart');


Code with getElementById in /components/com_hikashop/views/product/tmpl/cart.php doesn't work at all. Id changes after every cart update.
<a href="#" onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $product->cart_product_id;?>'); qty_field.value=parseInt(qty_field.value)+1;window.hikashop.submitCartModule(this, 'hikashop_cart_<?php echo $module_id; ?>', 'cart');">+</a>

Code with getElementsByName display rotating dots, but nothig changes.
<a href="#" onclick="var qty_field = document.getElementsByName('item[<?php echo $product->cart_product_id;?>][cart_product_quantity]'); qty_field.value=parseInt(qty_field.value)+1;window.hikashop.submitCartModule(this, 'hikashop_cart_<?php echo $module_id; ?>', 'cart');">+</a>

Last edit: 7 years 3 weeks ago by alikon1.

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

  • Posts: 81564
  • Thank you received: 13072
  • MODERATOR
7 years 3 weeks ago #266840

No. You should use the modification from:
www.hikashop.com/forum/product-category-...and-cart.html#266777
I was simply saying that the cart module can be refreshed with such javascript.

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

Time to create page: 0.061 seconds
Powered by Kunena Forum