Add to cart using Mootools- Add to cart HTML link

  • Posts: 5
  • Thank you received: 0
12 years 9 months ago #47852

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>

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

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
12 years 9 months ago #47952

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.054 seconds
Powered by Kunena Forum