[Skip to main content](#vessel-content)

#   Add to cart using Mootools- Add to cart HTML link

##

- **[wemustdesign](/forum/user/7146-wemustdesign "View wemustdesign's Profile")**
- [![wemustdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7146-wemustdesign "View wemustdesign's Profile") Topic Author
- [ Offline](/forum/user/7146-wemustdesign)

Less More

- Posts: 5
- Thank you received: 0
-
-

14 years 7 months ago [\#47852](#47852) by [wemustdesign](/forum/user/7146-wemustdesign "View wemustdesign's Profile")  *[Add to cart using Mootools- Add to cart HTML link](/forum/4-how-to/47852-add-to-cart-using-mootools-add-to-cart-html-link#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...")* was created by *[wemustdesign](/forum/user/7146-wemustdesign "View wemustdesign's Profile")*

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?

&lt;a href="index.php?option=com_hikashop&amp;amp;ctrl=product&amp;amp;task=updatecart&amp;amp;quantity=1&amp;amp;checkout=1&amp;amp;product_id=1" onclick="try{ new Ajax('index.php?option=com_hikashop&amp;amp;ctrl=product&amp;amp;task=updatecart&amp;amp;quantity=1&amp;amp;checkout=1&amp;amp;product_id=1', { method: 'get' }).request(); }catch(err){ new Request({url:'index.php?option=com_hikashop&amp;amp;ctrl=product&amp;amp;task=updatecart&amp;amp;quantity=1&amp;amp;checkout=1&amp;amp;product_id=1', method: 'get'}).send(); } return false;"&gt;Add to cart&lt;/a&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ3ODUyLWFkZC10by1jYXJ0LXVzaW5nLW1vb3Rvb2xzLWFkZC10by1jYXJ0LWh0bWwtbGluaz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

14 years 7 months ago [\#47952](#47952) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Add to cart using Mootools- Add to cart HTML link](/forum/4-how-to/47852-add-to-cart-using-mootools-add-to-cart-html-link#47952 "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...")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ3ODUyLWFkZC10by1jYXJ0LXVzaW5nLW1vb3Rvb2xzLWFkZC10by1jYXJ0LWh0bWwtbGluaz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.040 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
