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

#   Update cart using Ajax for update quantity

##

- **[binoy\_p\_v](/forum/user/4135-binoy-p-v "View binoy&#95;p&#95;v's Profile")**
- [![binoy&#95;p&#95;v's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4135-binoy-p-v "View binoy&#95;p&#95;v's Profile") Topic Author
- [ Offline](/forum/user/4135-binoy-p-v)

Less More

- Posts: 29
- Thank you received: 0
-
-

14 years 10 months ago [\#32674](#32674) by [binoy\_p\_v](/forum/user/4135-binoy-p-v "View binoy&#95;p&#95;v's Profile")  *[Update cart using Ajax for update quantity](/forum/2-general-talk-about-hikashop/32674-update-cart-using-ajax-for-update-quantity#32674 "Hi,  Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.  So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.  Regards, Binoy")* was created by *[binoy\_p\_v](/forum/user/4135-binoy-p-v "View binoy&#95;p&#95;v's Profile")*

Hi,

Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.

So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.

Regards,
Binoy

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzMyNjc0LXVwZGF0ZS1jYXJ0LXVzaW5nLWFqYXgtZm9yLXVwZGF0ZS1xdWFudGl0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14280
-
-

14 years 10 months ago [\#32702](#32702) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Update cart using Ajax for update quantity](/forum/2-general-talk-about-hikashop/32674-update-cart-using-ajax-for-update-quantity#32702 "Hi,  Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.  So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.  Regards, Binoy")*

Hi,

On the product page, there is a + and - sign to change the value in the quantity input field. That doesn't require any modifications.

For the quantity of the products in the cart module, you will have to edit the file "cart" of the view "product" via the menu Display-&gt;Views and add you AJAX code there. You can just call the add to cart in AJAX so that it returns the new content of the HikaShop cart and replace the module with that new content.
You can look at the file adminsitrator/components/com_hikashop/helpers/cart.php to see how we did it for the product page add to cart button.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzMyNjc0LXVwZGF0ZS1jYXJ0LXVzaW5nLWFqYXgtZm9yLXVwZGF0ZS1xdWFudGl0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[binoy\_p\_v](/forum/user/4135-binoy-p-v "View binoy&#95;p&#95;v's Profile")**
- [![binoy&#95;p&#95;v's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4135-binoy-p-v "View binoy&#95;p&#95;v's Profile") Topic Author
- [ Offline](/forum/user/4135-binoy-p-v)

Less More

- Posts: 29
- Thank you received: 0
-
-

14 years 10 months ago [\#33154](#33154) by [binoy\_p\_v](/forum/user/4135-binoy-p-v "View binoy&#95;p&#95;v's Profile")  Replied by *[binoy\_p\_v](/forum/user/4135-binoy-p-v "View binoy&#95;p&#95;v's Profile")* on topic *[Re: Update cart using Ajax for update quantity](/forum/2-general-talk-about-hikashop/32674-update-cart-using-ajax-for-update-quantity#33154 "Hi,  Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.  So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.  Regards, Binoy")*

Hi Nicolas,

I tried the option you have tried but i am not sure how we will pass the new selected value to the displayButton function. Please give some more clarity on the method.
I have checked the helper function also but i couldnt make out the logic that you have used in it much. So please guide me to solve this issue.

Regards,
Binoy

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzMyNjc0LXVwZGF0ZS1jYXJ0LXVzaW5nLWFqYXgtZm9yLXVwZGF0ZS1xdWFudGl0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14280
-
-

14 years 10 months ago [\#33192](#33192) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Update cart using Ajax for update quantity](/forum/2-general-talk-about-hikashop/32674-update-cart-using-ajax-for-update-quantity#33192 "Hi,  Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.  So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.  Regards, Binoy")*

The displayButton function is a PHP function.
The code you want to look at is the javascript code in the getJS function of that file.

That's where there is the ajax request made to the server to add the product to the cart and where the new cart module HTML is returned and put in place of the old HTML.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzMyNjc0LXVwZGF0ZS1jYXJ0LXVzaW5nLWFqYXgtZm9yLXVwZGF0ZS1xdWFudGl0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 28
- Thank you received: 0
-
-

10 years 10 months ago [\#223519](#223519) by [AntinJH](/forum/user/39561-antinjh "View AntinJH's Profile")  Replied by *[AntinJH](/forum/user/39561-antinjh "View AntinJH's Profile")* on topic *[Re: Update cart using Ajax for update quantity](/forum/2-general-talk-about-hikashop/32674-update-cart-using-ajax-for-update-quantity#223519 "Hi,  Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.  So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.  Regards, Binoy")*

Hi there !

I just read this topic and realize it was an old one. Is there any other solutions since the last answer ? Or coming soon ?

The ajax "add to cart" is awesome, but I can't find any option for a real ajax cart (updating quantity etc.).

Any idea on this ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzMyNjc0LXVwZGF0ZS1jYXJ0LXVzaW5nLWFqYXgtZm9yLXVwZGF0ZS1xdWFudGl0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14280
-
-

10 years 10 months ago [\#223560](#223560) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Update cart using Ajax for update quantity](/forum/2-general-talk-about-hikashop/32674-update-cart-using-ajax-for-update-quantity#223560 "Hi,  Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.  So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.  Regards, Binoy")*

Hi,

We're currently working on a new cart and checkout system which will allow for that.
You can see a sneak peek of that here:
[ twitter.com/Obsidev](https://twitter.com/Obsidev)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzMyNjc0LXVwZGF0ZS1jYXJ0LXVzaW5nLWFqYXgtZm9yLXVwZGF0ZS1xdWFudGl0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 28
- Thank you received: 0
-
-

10 years 10 months ago [\#224207](#224207) by [AntinJH](/forum/user/39561-antinjh "View AntinJH's Profile")  Replied by *[AntinJH](/forum/user/39561-antinjh "View AntinJH's Profile")* on topic *[Re: Update cart using Ajax for update quantity](/forum/2-general-talk-about-hikashop/32674-update-cart-using-ajax-for-update-quantity#224207 "Hi,  Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.  So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.  Regards, Binoy")*

Great news !!

Do you know when it will be ready ? My client is asking me again and again.... ![;)](/media/kunena/emoticons/24.png ";)")

Regards,
F

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzMyNjc0LXVwZGF0ZS1jYXJ0LXVzaW5nLWFqYXgtZm9yLXVwZGF0ZS1xdWFudGl0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

10 years 10 months ago [\#224212](#224212) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Re: Update cart using Ajax for update quantity](/forum/2-general-talk-about-hikashop/32674-update-cart-using-ajax-for-update-quantity#224212 "Hi,  Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.  So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.  Regards, Binoy")*

Hello,
We are currently working on it to do it as fast as we can. The new cart and checkout system will probably be available through the following months.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzMyNjc0LXVwZGF0ZS1jYXJ0LXVzaW5nLWFqYXgtZm9yLXVwZGF0ZS1xdWFudGl0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 112
- Thank you received: 3
-
-

10 years 8 months ago [\#228813](#228813) by [tbroderick](/forum/user/36185-tbroderick "View tbroderick's Profile")  Replied by *[tbroderick](/forum/user/36185-tbroderick "View tbroderick's Profile")* on topic *[Re: Update cart using Ajax for update quantity](/forum/2-general-talk-about-hikashop/32674-update-cart-using-ajax-for-update-quantity#228813 "Hi,  Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.  So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.  Regards, Binoy")*

There is some functionality needed in the cart that is being requested by a client of ours. I am not sure if these features are available or not. So, your help is appreciated:

1. The product names are showing in the the cart as product name:variant1name variant2name. I do not want the variant name to show. The setting "Display the characteristics name" is already set to "NO".
2. Is there a way to get the price totals in the cart to update automatically when a change to the quantity is made? If not, is there a refresh button that can be added like the one in the checkout?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzMyNjc0LXVwZGF0ZS1jYXJ0LXVzaW5nLWFqYXgtZm9yLXVwZGF0ZS1xdWFudGl0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14280
-
-

10 years 8 months ago [\#228823](#228823) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Update cart using Ajax for update quantity](/forum/2-general-talk-about-hikashop/32674-update-cart-using-ajax-for-update-quantity#228823 "Hi,  Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.  So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.  Regards, Binoy")*

Hi,

1. You should be able to hide the variant name with a bit of CSS code. Just look at it with your browser HTML inspector to get the CSS class to use.

2. It's already the case. Change the quantity in the quantity field and click somewhere else on the page. That will refresh the cart module. You can always add a refresh img tag to the cart module by editing the file "cart" of the view "product" via the menu Display&gt;Views so that the users click there. It will do the refresh automatically like when the user click somewhere else.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzMyNjc0LXVwZGF0ZS1jYXJ0LXVzaW5nLWFqYXgtZm9yLXVwZGF0ZS1xdWFudGl0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 28
- Thank you received: 0
-
-

10 years 7 months ago [\#232321](#232321) by [AntinJH](/forum/user/39561-antinjh "View AntinJH's Profile")  Replied by *[AntinJH](/forum/user/39561-antinjh "View AntinJH's Profile")* on topic *[Re: Update cart using Ajax for update quantity](/forum/2-general-talk-about-hikashop/32674-update-cart-using-ajax-for-update-quantity#232321 "Hi,  Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.  So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.  Regards, Binoy")*

Hi there !

Any news about the new cart system? Will it be ready soon ? I'm working for a client and finishing it's website at the end of the month and I want to be able to give him an answer about that option.

Thanks !

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzMyNjc0LXVwZGF0ZS1jYXJ0LXVzaW5nLWFqYXgtZm9yLXVwZGF0ZS1xdWFudGl0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14280
-
-

10 years 7 months ago [\#232322](#232322) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Update cart using Ajax for update quantity](/forum/2-general-talk-about-hikashop/32674-update-cart-using-ajax-for-update-quantity#232322 "Hi,  Using your great tool i could implement an good website for a restaurant. The work is almost done except the main requirement from client. They are ok with all the features and facilities but they need to update the quantity in product page and in cart using AJAX. They didnt like the option of refreshing the page while updating the quantity.  So kindly help me in solving this issue. Please let me know how we can implement this even if the requested feature is not available in your system.  Regards, Binoy")*

Hi,

We still have work on it. It won't be for the end of the month.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzMyNjc0LXVwZGF0ZS1jYXJ0LXVzaW5nLWFqYXgtZm9yLXVwZGF0ZS1xdWFudGl0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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.112 seconds

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

[](#top)
