Joomla 3.9.12
Virtuemart 3.8.4
PHP 7.3
Hello,
In my shop https://www.jcmackintosh.es/vm.html?lang=es the add to cart button does not work for any product. Any ideas please? Thank you.
Console shows a JavaScript problem. You are loading a version of jQuery through your phocaupgrade plugin which I think is incompatible with VirtueMart.
Try to disable that plugin and enable VM jQuery
Thank you Jenkinhill,
I disabled Phocaupgrade plugin, and VM JQuery UI scrips in Core Css Styels & Javascritps under templates in configuration was already enabled. As a result a thinking rotating wheel shows up (for the first time, I think), but it seems to get stuck there. :-\ Any ideas please? Thank you,
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://jcmackintosh.es/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=es&Itemid=429. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
you need to force either www or no www
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
in your .htaccess
Thank you GJC, in order to force www I added the the .httaccess file
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
but the add to cart button keeps on not wanting to work.
Is there anything I did wrong? Thank you,
it is still showing
The Same Origin Policy disallows reading the remote resource at https://jcmackintosh.es/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=es&Itemid=429.
(Reason: CORS request did not succeed).
I have no idea why the ajax call isn't using www
you could try forcing no www
# match any URL with www and rewrite it to https without the www
RewriteCond %{HTTP_HOST} ^(www\.)(.*) [NC]
RewriteRule (.*) https://%2%{REQUEST_URI} [L,R=301]
Open the configuration.php file located at the root of your site. Find the following codes -
public $live_site = 'https://jcmackintosh.es';
Replace above by:
public $live_site = '';
Save the file. This will resolve the problem.
Thank you Jumbo!, problem solved! :D