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

#   Add to cart link. Ajax or Stay same page POSSIBLE?

##

- **[korkunov](/forum/user/1069-korkunov "View korkunov's Profile")**
- [![korkunov's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1069.jpg)](/forum/user/1069-korkunov "View korkunov's Profile") Topic Author
- [ Offline](/forum/user/1069-korkunov)

Less More

- Posts: 50
- Thank you received: 4
-
-
-

15 years 8 months ago -  15 years 8 months ago [\#8572](#8572) by [korkunov](/forum/user/1069-korkunov "View korkunov's Profile")  *[Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#8572 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")* was created by *[korkunov](/forum/user/1069-korkunov "View korkunov's Profile")*

Hi.

In item (product) card there is a button **Add to cart HTML link**
After clicking on this link (in content) is redirected to checkout.

1. Is it possible to add product from content with ajax ?
2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)

Thanks.

Last edit: 15 years 8 months ago by [korkunov](/forum/user/1069-korkunov "View korkunov's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg1NzItYWRkLXRvLWNhcnQtbGluay1hamF4LW9yLXN0YXktc2FtZS1wYWdlLXBvc3NpYmxlP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

15 years 8 months ago [\#8583](#8583) 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 link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#8583 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

The add to cart HTML link is just a simple link which add a product and redirect to the cart.
Making it ajax is possible if you know javascript...Instead of having your link directly as an href attribute of a link, you could add some JS in your article to trigger that URL. The popup notice could be possible as well but it's also difficult.

In that case, the easiest would be to create a category for your product and add that category to your product. Then, create a new module in the menu Display-&gt;Content modules and set the parent category as that category and set it to display the add to cart button and us the layout "title". You can also add some CSS to remove the name and the price if you don't want it. Then, you can insert your module in your article using the loadposition plugin of joomla.

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

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

Less More

- Posts: 2
- Thank you received: 0
-
-

15 years 7 months ago [\#11983](#11983) by [exit2studios](/forum/user/1772-exit2studios "View exit2studios's Profile")  Replied by *[exit2studios](/forum/user/1772-exit2studios "View exit2studios's Profile")* on topic *[Re: Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#11983 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

This is something I would be very interested to know as well.

How can you make the "add to cart html link" simply add the product to the cart without redirecting? I would like to be able to add multiple items before checkout.

AJAX would be great if we could get an example.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg1NzItYWRkLXRvLWNhcnQtbGluay1hamF4LW9yLXN0YXktc2FtZS1wYWdlLXBvc3NpYmxlP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

15 years 7 months ago -  15 years 7 months ago [\#11987](#11987) 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 link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#11987 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

If you want to make it AJAX, first, you need to include the mootools.js library of joomla in your template:
[ forum.joomla.org/viewtopic.php?p=1533434](http://forum.joomla.org/viewtopic.php?p=1533434)

Then, you need to have your links like this: Code:

&lt;a href="ADD_TO_CART_LINK" onclick="try{ new Ajax('ADD_TO_CART_LINK', { method: 'get' }).request(); }catch(err){ new Request({url:'ADD_TO_CART_LINK', method: 'get'}).send(); } return false;"&gt;Add to cart&lt;/a&gt;

You need to replace ADD_TO_CART_LINK with your link.

Last edit: 15 years 7 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

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

Less More

- Posts: 2
- Thank you received: 0
-
-

15 years 7 months ago [\#12017](#12017) by [exit2studios](/forum/user/1772-exit2studios "View exit2studios's Profile")  Replied by *[exit2studios](/forum/user/1772-exit2studios "View exit2studios's Profile")* on topic *[Re: Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#12017 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

Is the Add to Cart HTML link stored in the db anywhere?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg1NzItYWRkLXRvLWNhcnQtbGluay1hamF4LW9yLXN0YXktc2FtZS1wYWdlLXBvc3NpYmxlP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

15 years 7 months ago [\#12022](#12022) 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 link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#12022 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

No, it's generated based on the product id.

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

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

Less More

- Posts: 26
- Thank you received: 1
-
-

15 years 6 months ago [\#12950](#12950) by [jackinthex](/forum/user/1902-jackinthex "View jackinthex's Profile")  Replied by *[jackinthex](/forum/user/1902-jackinthex "View jackinthex's Profile")* on topic *[Re: Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#12950 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

I would like the same function.
Selling a lot of cheap items and if is add one item to a cart i have to browse all the way back to the product category.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg1NzItYWRkLXRvLWNhcnQtbGluay1hamF4LW9yLXN0YXktc2FtZS1wYWdlLXBvc3NpYmxlP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

15 years 6 months ago [\#12960](#12960) 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 link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#12960 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

You can already have add to cart buttons on the listing of products. You just need to turn on the corresponding option in the modules/menus hikashop options.

What this thread is about is the add to cart link when you want to use joomla articles as product pages and that you need to add your add to cart link manually in the HTML of the article.

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

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

Less More

- Posts: 217
- Thank you received: 1
-
-

15 years 1 week ago -  15 years 1 week ago [\#27569](#27569) by [Mat](/forum/user/4216-mat "View Mat's Profile")  Replied by *[Mat](/forum/user/4216-mat "View Mat's Profile")* on topic *[Re: Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#27569 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

So that ajax works but now I would like it to refresh the checkout. Any thoughts how to do that?

Also with the cart itself you can edit the quantity - how can that be done with ajax?

Last edit: 15 years 1 week ago by [Mat](/forum/user/4216-mat "View Mat's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg1NzItYWRkLXRvLWNhcnQtbGluay1hamF4LW9yLXN0YXktc2FtZS1wYWdlLXBvc3NpYmxlP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

15 years 1 week ago [\#27582](#27582) 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 link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#27582 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

You can refresh the quantity by calling the URL like that:
[ www.demo.hikashop.com/index.php?option=c...kout=1&amp;product\_id=ZZ](http://www.demo.hikashop.com/index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=YY&checkout=1&product_id=ZZ)
where YY is the new quantity of the product in the cart and ZZ is the id of the product.
You can also use it to remove the product with a quantity of 0.

Refresh the checkout ? You can just do a window.location = 'URL_OF_THE_CHECKOUT'; in javascript.

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

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

Less More

- Posts: 217
- Thank you received: 1
-
-

15 years 1 week ago [\#27636](#27636) by [Mat](/forum/user/4216-mat "View Mat's Profile")  Replied by *[Mat](/forum/user/4216-mat "View Mat's Profile")* on topic *[Re: Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#27636 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

**nicolas wrote:**

> You can refresh the quantity by calling the URL like that:
> [ www.demo.hikashop.com/index.php?option=c...kout=1&amp;product\_id=ZZ](http://www.demo.hikashop.com/index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=YY&checkout=1&product_id=ZZ)
> where YY is the new quantity of the product in the cart and ZZ is the id of the product.
> You can also use it to remove the product with a quantity of 0.
>
> Refresh the checkout ? You can just do a window.location = 'URL\_OF\_THE\_CHECKOUT'; in javascript.

My checkout is a module. Will that work?
I want to press the add to cart button like above and get the shopping cart to update via ajax as well. Is there a way?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg1NzItYWRkLXRvLWNhcnQtbGluay1hamF4LW9yLXN0YXktc2FtZS1wYWdlLXBvc3NpYmxlP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

15 years 1 week ago [\#27649](#27649) 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 link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#27649 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

The checkout cannot be a module. It's always displayed on the main area of your website.
You must be talking about refreshing the cart module right ?
Then you should use the functions of the file administrator/components/com_hikashop/helpers/cart.php which already do that for normal add to cart buttons of HikaShop.

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

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

Less More

- Posts: 217
- Thank you received: 1
-
-

15 years 1 week ago [\#27746](#27746) by [Mat](/forum/user/4216-mat "View Mat's Profile")  Replied by *[Mat](/forum/user/4216-mat "View Mat's Profile")* on topic *[Re: Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#27746 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

**nicolas wrote:**

> The checkout cannot be a module. It's always displayed on the main area of your website.
> You must be talking about refreshing the cart module right ?
> Then you should use the functions of the file administrator/components/com\_hikashop/helpers/cart.php which already do that for normal add to cart buttons of HikaShop.

Yes I mean the cart. Thanks for your help so far.

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

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

Less More

- Posts: 10
- Thank you received: 1
-
-

14 years 3 days ago [\#72148](#72148) by [responseit](/forum/user/10312-responseit "View responseit's Profile")  Replied by *[responseit](/forum/user/10312-responseit "View responseit's Profile")* on topic *[Re: Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#72148 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

Is this topic active and different under Joomla 2.5? None of the suggestions above work for me.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg1NzItYWRkLXRvLWNhcnQtbGluay1hamF4LW9yLXN0YXktc2FtZS1wYWdlLXBvc3NpYmxlP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

14 years 1 day ago [\#72421](#72421) 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 link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#72421 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

You don't need to change anything anymore to have add to cart buttons in joomla content stay on the same page.
There are two plugins called "HikaShop Product TAG insertion" and "HikaShop Product TAG translation" which have to be published for that.
Once done, you can use the "product" button below the HTML editor to add the add to cart buttons in your articles and they will use the behavior that you select in the "when a product is added to the cart" option of the Checkout tab of the configuration.

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

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

Less More

- Posts: 10
- Thank you received: 0
-
-

13 years 1 month ago [\#124050](#124050) by [Sovaka](/forum/user/27194-sovaka "View Sovaka's Profile")  Replied by *[Sovaka](/forum/user/27194-sovaka "View Sovaka's Profile")* on topic *[Re: Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#124050 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

Sorry to Necro an old thread... But I was wondering if there has been an update on this?

I can use the Ajax link provided, but I am wondering if there is an amendment to that A HREF to allow us to specify a quantity?

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 1 month ago [\#124087](#124087) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#124087 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

Hi,

In the link you have the quantity parameter "&amp;quantity=1" you just have to replace 1 by the desired quantity.

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

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

Less More

- Posts: 10
- Thank you received: 0
-
-

13 years 1 month ago [\#124103](#124103) by [Sovaka](/forum/user/27194-sovaka "View Sovaka's Profile")  Replied by *[Sovaka](/forum/user/27194-sovaka "View Sovaka's Profile")* on topic *[Re: Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#124103 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

Ahh in the Product page 'Link to HTML', there... Jeeze... So blind sometimes ![:(](/media/kunena/emoticons/5.png ":(")

Thanks Xavier

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

- **[kaya](/forum/user/25605-kaya "View kaya's Profile")**
- [![kaya's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/vacation.jpg)](/forum/user/25605-kaya "View kaya's Profile")
- [ Offline](/forum/user/25605-kaya)

Less More

- Posts: 120
- Thank you received: 2
-
-
- [](http://arasjoomla.ir)
-

10 years 8 months ago -  10 years 8 months ago [\#228189](#228189) by [kaya](/forum/user/25605-kaya "View kaya's Profile")  Replied by *[kaya](/forum/user/25605-kaya "View kaya's Profile")* on topic *[Re: Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#228189 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

Hi
Thank you dear nicolas
It's work very well. Code:

&lt;a href="ADD_TO_CART_LINK" onclick="try{ new Ajax('ADD_TO_CART_LINK', { method: 'get' }).request(); }catch(err){ new Request({url:'ADD_TO_CART_LINK', method: 'get'}).send(); } return false;"&gt;Add to cart&lt;/a&gt;

Now if want remove a product from cart how can use ajax?

Last edit: 10 years 8 months ago by [kaya](/forum/user/25605-kaya "View kaya's Profile").

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

10 years 8 months ago [\#228218](#228218) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Re: Add to cart link. Ajax or Stay same page POSSIBLE?](/forum/4-how-to/8572-add-to-cart-link-ajax-or-stay-same-page-possible#228218 "Hi.  In item (product) card there is a button Add to cart HTML link After clicking on this link (in content) is redirected to checkout.  1. Is it possible to add product from content with ajax ? 2. Do not redirect to checkout, Stay at same page (content) and display a popup notice ? (HikaShop-&gt;System-&gt;Configuration-&gt;Checkout-&gt;After a product is added to the cart: any setting does not affect)  Thanks.")*

Hi,

With that kind of code ; you cannot.
But it will be possible in HikaShop 3.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg1NzItYWRkLXRvLWNhcnQtbGluay1hamF4LW9yLXN0YXktc2FtZS1wYWdlLXBvc3NpYmxlP3RtcGw9bWFya2Rvd24=) 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.537 seconds

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

[](#top)
