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

#   hikashop - automatic update of the total amount of the shopping cart at checkout

##

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

Less More

- Posts: 127
- Thank you received: 3
-
-

5 years 10 months ago [\#328824](#328824) by [zetap](/forum/user/44792-zetap "View zetap's Profile")  *[hikashop - automatic update of the total amount of the shopping cart at checkout](/forum/27-checkout/901764-hikashop-automatic-update-of-the-total-amount-of-the-shopping-cart-at-checkout#328824 "-- url of the page with the problem -- :   www.abierto.uy/  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3  Hello  Is it possible that the purchase checkout automatically updates the total amount of the purchase when the number of units of the product is modified, without having to click on the update button? Reviewing the code, I see that the quantity textbox has a scheduled onclick event, but it seems that they do not have the functionality to update the purchase amount.  Many thanks, greetings!")* was created by *[zetap](/forum/user/44792-zetap "View zetap's Profile")*

-- url of the page with the problem -- : [ www.abierto.uy/](https://www.abierto.uy/)
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.24
-- PHP version -- : 7.3

Hello

Is it possible that the purchase checkout automatically updates the total amount of the purchase when the number of units of the product is modified, without having to click on the update button?
Reviewing the code, I see that the quantity textbox has a scheduled onclick event, but it seems that they do not have the functionality to update the purchase amount.

Many thanks, greetings!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMTc2NC1oaWthc2hvcC1hdXRvbWF0aWMtdXBkYXRlLW9mLXRoZS10b3RhbC1hbW91bnQtb2YtdGhlLXNob3BwaW5nLWNhcnQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) 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: 14327
-
-

5 years 10 months ago [\#328828](#328828) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[hikashop - automatic update of the total amount of the shopping cart at checkout](/forum/27-checkout/901764-hikashop-automatic-update-of-the-total-amount-of-the-shopping-cart-at-checkout#328828 "-- url of the page with the problem -- :   www.abierto.uy/  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3  Hello  Is it possible that the purchase checkout automatically updates the total amount of the purchase when the number of units of the product is modified, without having to click on the update button? Reviewing the code, I see that the quantity textbox has a scheduled onclick event, but it seems that they do not have the functionality to update the purchase amount.  Many thanks, greetings!")*

Hi,

In the file show_block_cart.php, that you can edit via the menu Display&gt;Views, you'll find this piece of javascript code:
window.hikashop.checkQuantity(this);
That's what you have in the "onchange" attribute of the quantity input field in the cart view of the checkout.
So you can add after it such code: Code:

if (this.value != \''.$product-&gt;cart_product_quantity.'\'){'.$input.'return window.checkout.submitCart('.$this-&gt;step.','.$this-&gt;module_position.'); }

That will refresh the cart view.
Note however that it is in an onchange event.
So after you changed the value, you need to click elsewhere to validate the change. Otherwise, if we were submitting the data as you type, you wouldn't be able to enter numbers higher than 9 in it as it would submit the data right after you pressed the first digit.
Or it would require a waiting time, but it could be different from one person to another.
So it's better to have it on "onchange" I believe.
In fact, the code modification I'm proposing above is what will be in the next version of HikaShop.

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

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