- Posts: 86243
- Thank you received: 14232
+ and - instead Refresh button in Chekout and Cart
9 years 5 months ago #266747
by nicolas
Replied by nicolas on topic + and - instead Refresh button in Chekout and Cart
Hi,
For the cart module, you can use such javascript:
window.hikashop.submitCartModule(this, 'hikashop_cart_<?php echo $module_id; ?>', 'cart');
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.
9 years 5 months ago - 9 years 5 months ago #266810
by alikon1
Code with getElementById in /components/com_hikashop/views/product/tmpl/cart.php doesn't work at all. Id changes after every cart update.
Code with getElementsByName display rotating dots, but nothig changes.
Replied by alikon1 on topic + and - instead Refresh button in Chekout and Cart
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.
Code:
<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.
Code:
<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: 9 years 5 months ago by alikon1.
Please Log in or Create an account to join the conversation.
9 years 5 months ago #266840
by nicolas
Replied by nicolas on topic + and - instead Refresh button in Chekout and Cart
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.
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.145 seconds