Skip to main content

+ and - instead Refresh button in Chekout and Cart

More
9 years 5 months ago #266747 by nicolas
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.

More
9 years 5 months ago - 9 years 5 months ago #266810 by alikon1

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.

More
9 years 5 months ago #266840 by nicolas
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.145 seconds
Powered by Kunena Forum