- Posts: 5
- Thank you received: 0
Add to cart using Mootools- Add to cart HTML link
- wemustdesign
-
Topic Author
- Offline
Less
More
14 years 5 months ago #47852
by wemustdesign
Add to cart using Mootools- Add to cart HTML link was created by wemustdesign
I have followed posts in the forum on how to use the add to cart html link without redirecting to cart and this works fine. I used the code below. I read on the forum that I should refresh the page to refresh the cart module. How would I do this, would I add the refresh to the code below, if so where would I insert it?
<a href="index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=1" onclick="try{ new Ajax('index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=1', { method: 'get' }).request(); }catch(err){ new Request({url:'index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=1', method: 'get'}).send(); } return false;">Add to cart</a>
<a href="index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=1" onclick="try{ new Ajax('index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=1', { method: 'get' }).request(); }catch(err){ new Request({url:'index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=1', method: 'get'}).send(); } return false;">Add to cart</a>
Please Log in or Create an account to join the conversation.
14 years 5 months ago #47952
by nicolas
Replied by nicolas on topic Re: Add to cart using Mootools- Add to cart HTML link
You would have to change that code's javascript to have something similar to the JS in the function getJS of the file administrator/components/com_hikashop/helpers/cart.php
Please Log in or Create an account to join the conversation.
Time to create page: 0.156 seconds