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

#   Extremly long execution time when adding a product to the cart

##

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

Less More

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

8 years 1 month ago [\#298140](#298140) by [tedgar](/forum/user/35236-tedgar "View tedgar's Profile")  *[Extremly long execution time when adding a product to the cart](/forum/3-bug-report/895760-extremly-long-execution-time-when-adding-a-product-to-the-cart#298140 "-- HikaShop version -- : HikaShop Business 3.5.1 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.2.0 -- Browser(s) name and version -- : Chrome/Firefox -- Error-message(debug-mod must be tuned on) -- : When a product will be added to a cart, the afterRender&#95;car method of the mod&#95;hikashop&#95;cart takes ca. 130 s to finish what makes the shopping impossible.  When a product will be added to a cart, the afterRender&#95;car method of the mod&#95;hikashop&#95;cart takes ca. 130 s to finish what makes the shopping impossible.")* was created by *[tedgar](/forum/user/35236-tedgar "View tedgar's Profile")*

-- HikaShop version -- : HikaShop Business 3.5.1
-- Joomla version -- : 3.8.12
-- PHP version -- : 7.2.0
-- Browser(s) name and version -- : Chrome/Firefox
-- Error-message(debug-mod must be tuned on) -- : When a product will be added to a cart, the afterRender_car method of the mod_hikashop_cart takes ca. 130 s to finish what makes the shopping impossible.

When a product will be added to a cart, the afterRender_car method of the mod_hikashop_cart takes ca. 130 s to finish what makes the shopping impossible.

This message contains confidential information

- [ ![error.png](/forum/attachment/44893) ](/forum/attachment/44893 "error.png") [ ](/forum/attachment/44893?download=1 "error.png")

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

Less More

- Posts: 86290
- Thank you received: 14268
-
-

8 years 1 month ago [\#298143](#298143) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Extremly long execution time when adding a product to the cart](/forum/3-bug-report/895760-extremly-long-execution-time-when-adding-a-product-to-the-cart#298143 "-- HikaShop version -- : HikaShop Business 3.5.1 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.2.0 -- Browser(s) name and version -- : Chrome/Firefox -- Error-message(debug-mod must be tuned on) -- : When a product will be added to a cart, the afterRender&#95;car method of the mod&#95;hikashop&#95;cart takes ca. 130 s to finish what makes the shopping impossible.  When a product will be added to a cart, the afterRender&#95;car method of the mod&#95;hikashop&#95;cart takes ca. 130 s to finish what makes the shopping impossible.")*

Hi,

I see that you're using the old add to cart system of HikaShop 2.x.
So first, turn off the "add to cart legacy" setting of the HikaShop configuration to switch to the new add to cart system in Ajax of HikaShop 3.x. That might help.
Otherwise, looking at the MySQL queries log, I can see that the delay happens between the loading of the discounts for the products in the cart and the loading of the auto loaded coupons for the cart:
[ monosnap.com/file/2hq6lySOqDBUmfPvARyu4FzBFWIbj4](https://monosnap.com/file/2hq6lySOqDBUmfPvARyu4FzBFWIbj4)
It's highly likely that this comes from a plugin which is triggered with the onAfterCartProductsLoad event.
Also, it's possible that this comes from a connection to a distant server timing out.
For example, when the UPS shipping plugin tries to connect to the UPS server but fails because your hosting kills the request (due to strict firewall rules), the UPS shipping plugin has to wait until the timeout before it can give back the hand to HikaShop telling it that it couldn't get any shipping rate calculated.
I don't think that it comes from that plugin since it doesn't implement that onAfterCartProductsLoad trigger.
But I suspect that you might have a similar issue with another plugin which also requires connecting to something else. Maybe a tax calculation plugin, like Taxcloud, or a custom plugin. I don't know.
You would have to check the different plugins enabled in the groups hikashop, hikashoppayment, hikashopshipping and system of your website. Try to disable them one by one and testing each time to find the culprit.

The following user(s) said Thank You: [tedgar](/forum/user/35236-tedgar "View tedgar's Profile")

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

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

Less More

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

8 years 1 month ago [\#298220](#298220) by [tedgar](/forum/user/35236-tedgar "View tedgar's Profile")  Replied by *[tedgar](/forum/user/35236-tedgar "View tedgar's Profile")* on topic *[Extremly long execution time when adding a product to the cart](/forum/3-bug-report/895760-extremly-long-execution-time-when-adding-a-product-to-the-cart#298220 "-- HikaShop version -- : HikaShop Business 3.5.1 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.2.0 -- Browser(s) name and version -- : Chrome/Firefox -- Error-message(debug-mod must be tuned on) -- : When a product will be added to a cart, the afterRender&#95;car method of the mod&#95;hikashop&#95;cart takes ca. 130 s to finish what makes the shopping impossible.  When a product will be added to a cart, the afterRender&#95;car method of the mod&#95;hikashop&#95;cart takes ca. 130 s to finish what makes the shopping impossible.")*

Hi,

you were right, it came from a 3rd party payment plugin that was trying to connect to a remote server. It would be great if you would consider adding some mechanism, that would prevent such kind of issues.
Thank you!

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

Less More

- Posts: 86290
- Thank you received: 14268
-
-

8 years 1 month ago [\#298221](#298221) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Extremly long execution time when adding a product to the cart](/forum/3-bug-report/895760-extremly-long-execution-time-when-adding-a-product-to-the-cart#298221 "-- HikaShop version -- : HikaShop Business 3.5.1 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.2.0 -- Browser(s) name and version -- : Chrome/Firefox -- Error-message(debug-mod must be tuned on) -- : When a product will be added to a cart, the afterRender&#95;car method of the mod&#95;hikashop&#95;cart takes ca. 130 s to finish what makes the shopping impossible.  When a product will be added to a cart, the afterRender&#95;car method of the mod&#95;hikashop&#95;cart takes ca. 130 s to finish what makes the shopping impossible.")*

Hi,

That's indeed a good idea.
Unfortunately, once the plugins trigger is sent to Joomla by HikaShop, HikaShop has no control on which plugin is triggered (it's Joomla which does that), which one was slow or fast, etc.
That's an idea that should be brought up with Joomla's core so that the debug system could also log the timings of each event being triggered for each plugin implementing the event.

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

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

[](#top)
