News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

error updating cart

Started by car, December 15, 2015, 16:53:06 PM

Previous topic - Next topic

car

Hello,
j have a problem with cart,
when j select the "payment types" or check "Terms of Service" or click to buttom to buy the product,
the system shows a popup windows with this text "Error Updating cart".
How do j fix it?
J use
1) joomla 3.4.5
2) virtuemart 3.012
3) PHP 5.4.16
N.B. j 'm working in local server on my pc, with xampp 1.8.2
thank you, regards
__________________

jenkinhill

Difficult to help if on local, but check for JavaScript conflicts:   http://forum.virtuemart.net/index.php?topic=119638.0

Also if you have selected to use PayPal Express as a pay option the deselect/unpublish it. I have found it to be problematic on locahost.
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

car

Thanks for your suggestion. I had already tried to clear Ajax for OPC on the configuration and cart worked. after I selected again
AJAX for OPC and cleared payment method with PayPal, the cart worked.Probabily as you say there was a conflict between libraries
javascript. Now, selecting ajax for OPC and the method of payment with PayPal, the cart works. I hope that the problem will not go back.
Thanks for the suggestion.
regards!

loppan

#3
I am also getting "error updating cart" but only when using Paypal Express in combination with the Ajax for OPC setting in VM, using Joomla 3.4.6 and VM 3.0.12. I suppose it is template issue / jquery conflict - perhaps caused by bootstrap, but I can't seem to find the reason exactly. I have made my template from scratch, as leight weight as I possibly can, and I try to use as few "fancy" modules & plugins as possible. So there's not much for me to disable while troubleshooting ;). As far as I know, my template does not load any other .js files than the ones coming with Joomla 3...

This is the error message in my console :

QuoteXMLHttpRequest cannot load https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-6L7031724Y667453Y. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.crashdiet.org' is therefore not allowed access.

When disabling Ajax in OPC it works as it should. Every other payment module, including the classic Paypal checkout, works fine too. But I would obviously prefer to be able to use Ajax in combination with Paypal Express :).

Here's how to reproduce this on my test store :

Go to http://www.crashdiet.org/vm/test-categoru/bundle-beanie-scarf-1399-detail.html and add this product to cart, then view cart and try selecting the Paypal payment method. This will show "error updating cart".

I would TRULY appreciate if anybody could give me some hints here :). Thank you in advance!

Best wishes

Peter

GJC Web Design

is this also the case when not using the sandbox?
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

loppan

Quote from: GJC Web Design on December 28, 2015, 22:53:34 PM
is this also the case when not using the sandbox?

Good point, but yes, sadly it is. Same error message, just a different URL :

QuoteXMLHttpRequest cannot load https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-0JE36056D8115024G. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.crashdiet.org' is therefore not allowed access.

But note that checkout still works, kind of... after receiving the message, the "Confirm Checkout" button in VM turns grey - but if I refresh the page I get redirected to Paypal and can pay without problems. Also, if I click the "Checkout with Paypal"-button that appear on my checkout page after enabling Paypal Express, I'm redirected to Paypal without problems. So at least that part works. Still, I can't present such a messy checkout page to the customer of course :D.

GJC Web Design

Have never used Paypal express so can't give any definite help apart from Google

they discuss setting the header specifically  .. e.g. $this->response->setHeader('Access-Control-Allow-Origin', '*');

Is there somewhere in the Paypal plug that this could be done?
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

loppan

Hey there and thanks for your time as always!

I suppose this can be done somewhere in the plugin, but isn't it possible that this is some kind of javascript conflict or similiar? I don't get this message when I disable ajax in OPC. I have googled a lot but some people mentioned some security concerns when setting the header like that... which also make me hesitate a little bit :). and it would be nice to not have to mess with the code, obviously. At least until we know for sure that this isn't a template issue :).

GJC Web Design

QuoteI don't get this message when I disable ajax in OPC

I assume because the call is AJAX when enabled?  Have u studied the calls in the console and compared the 2 situations?
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

loppan

Hmm, this is even more weird.

I disabled ajax OPC, and now, once I select the "Paypal Express" option and click "Save", I'm immediately transfered to Paypal. Even without agreeing on TOS, and without a change to add order comments (unless the customer does this BEFORE chosing payment method, which is unlikely to happen... since the order comments field is below payment method :)). On every other payment method I offer, the customer have to click "Save" first, and then "Confirm checkout", which makes sense.

Anyways, I did not encounter any error messages in my console with ajax disabled.

I have the bronze VM membership so perhaps I'll open a support ticket about this, as I'm really getting clueless here now :D.

depika

Did you find a solution for this?

loppan

hi depika, sadly no :/. I disabled Paypal Express and are using the paypal standard thing instead... In the end, I'm fine with this "solution" :).

jimijot

I confirm the problem still exists.
tested on php 5.6.10, php 7.0.7
Virtuemart 3.0.16, 3.0.17
Joomla 3.5.1
Template without additional scripts except FB/G+
option Ajax for OPC - on
While displaying "Error displaying cart" console displays the following log entry:

XMLHttpRequest cannot load https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-XXXXXXXXXXXXXXXXX. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.mydomain.pl' is therefore not allowed access.

It seems to be interaction between script dynupdate.js and paypal payment plugin.

n2o37

#13
Hi,

I'm new in joomla and I can't solve this same problem on my website. I'm using paypal standard but nothing!
What I have to do? Can someone help me?

Thanks

VirtueMart 3.0.18
Joomla! 3.6.4


amruthalalm

The issue is still there with PayPal express checkout. can anyone help?