VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Saliven007 on November 05, 2019, 12:52:46 PM

Title: Add to cart response too long on first load
Post by: Saliven007 on November 05, 2019, 12:52:46 PM
Hi,

when I open site https://www.natur-kraeuter.de for the first time and try to add to cart, it takes very long time when add to cart popup window will appear. (on mobile its about 4 - 6 seconds). It causes generally after first load of website. On next loads it is already ok. Website is optimalilzed with JCH.

Can anyobody give me some hint how to solve it? Thanks a lot.

Virtuemart 3.6.6
Joomla 3.9.12
PHP 7.2.10
APC User Cache with conservative caching.

Tomas
Title: Re: Add to cart response too long on first load
Post by: StefanSTS on November 05, 2019, 14:54:47 PM
Sorry, I cannot help you, my IP address is black listed on your site.
Title: Re: Add to cart response too long on first load
Post by: Saliven007 on November 05, 2019, 15:08:50 PM
Please try now.
Title: Re: Add to cart response too long on first load
Post by: StefanSTS on November 05, 2019, 15:38:23 PM
Could be a lot of things:

1. That Popup for ratings that always pops up in front of my nose when I want to look at products, might interfere with some other script.

2. Too many products loaded on the page, lazy load for images should be fine, but no idea, how that interacts with the popup.

3. Maybe a minimum package for hosting, maybe faster server needed.

That might be something to start at.

Regards
Stefan
Title: Re: Add to cart response too long on first load
Post by: hellorain on November 06, 2019, 08:29:48 AM
Hi,

I check your site.


In console
https://www.natur-kraeuter.de/undefined/components/com_virtuemart/assets/images/vm-preloader.gif 404
https://www.natur-kraeuter.de/undefined/components/com_virtuemart/assets/images/fancybox/fancy_close.png 404

Please check virtuemart configuration and change path for images.

Best Regards,
hellorain.
Title: Re: Add to cart response too long on first load
Post by: Saliven007 on November 06, 2019, 08:59:37 AM
Thank you for notice, its because I have tried to stop using fancybox...it is minor issue.

Now I have discovered following error in JS console: "XHR failed loading: POST "https://www.natur-kraeuter.de/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=de&Itemid=88"."

Anybody knows how to deal with this error?

Thank you
Title: Re: Add to cart response too long on first load
Post by: Saliven007 on November 06, 2019, 09:26:17 AM
On https://natur.vyvijime.cz I have switched on VM debugging...I hope it helps.
Title: Re: Add to cart response too long on first load
Post by: Studio 42 on November 06, 2019, 11:24:26 AM
XHR failed loading: POST "https://www.natur-kraeuter.de .... is because you load a script with www. on a page loaded by https://natur-kraeuter.de it's why is important to redirect any www traffic to non www using an .htaccess rule.
And your SSL certificate is only valid in the main domain, if you try loading using https://www.natur-kraeuter.de it gives a unsecure connection.

And in your main site you have same problem here :
Access to XMLHttpRequest at 'https://widgets.shopvote.de/allvotes-v2.php?shopid=12809&type=1&src=https&lang=de' from origin 'https://www.natur-kraeuter.de' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://natur.vyvijime.cz' that is not equal to the supplied origin.
Because you have crossorigin filters in your server.

Note that i have no slow loading problem on my add to cart test.