News:

Looking for documentation? Take a look on our wiki

Main Menu

Add to cart not working on English website - SOLVED

Started by postkat, October 23, 2018, 12:18:33 PM

Previous topic - Next topic

postkat

Hi there,

On this website there are two domains: https://www.daylightlamps.ie and https://www.truelightdaglichtlampen.nl.
There are no add to cart problems on the Dutch site but on daylightlamps.ie the add to cart button is not working. The pop-up doesn't appear.
I think this problem started with VirtueMart 3.4.2.

Also tested in beez3 and the problem remains.

Joomla and Virtuemart latest version, PHP 7.2

Regards,
Dorine

jenkinhill

You have this error on add to cart:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.truelightdaglichtlampen.nl/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=en&Itemid=584. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

postkat

Thank you!
I enabled CORS and the problem is solved.

Regards, Dorine

GJC Web Design

so u really want to add to cart in the .nl site from the .ie site???
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

postkat

No I found something in the Joomla configuration file that was the cause of this problem, $live_site was filled. I don't do that usually.....

GJC Web Design

interesting --  so var vmSiteurl takes its value from the Jconfig if live_site set?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation