Skip to main content

Add to cart using Mootools- Add to cart HTML link

More
14 years 5 months ago #47852 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&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;checkout=1&amp;product_id=1" onclick="try{ new Ajax('index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;checkout=1&amp;product_id=1', { method: 'get' }).request(); }catch(err){ new Request({url:'index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;checkout=1&amp;product_id=1', method: 'get'}).send(); } return false;">Add to cart</a>

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

More
14 years 5 months ago #47952 by nicolas
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
Powered by Kunena Forum