indiscreetak Posted September 25, 2012 Share Posted September 25, 2012 Hi, I have recently upgraded to Prestashop 1.5 and I am having a problem connecting to google checkout from my website. I receive this error when I click pay through google checkout : Fatal Error : Cannot access protected property GCheckout::$context in /home2/indiscr1/public_html/tickets/modules/gcheckout/payment.php on line 38 Can anyone shed any light on this? Thanks Andy Link to comment Share on other sites More sharing options...
Prestadget Posted October 5, 2012 Share Posted October 5, 2012 (edited) Hi, in Prestashop 1.5.1 : The context variable is defined in /classes/module/Module.php, unfortunately, this variable is declared as protected (line 117). A quick fix is to change protected by public. But after have fixed this, I got Oops! PrestaShop has sent Google a shopping cart with errors in it. We'll contact them to ask that they fix this problem. As this could be a temporary issue, you can go back in your browser to try checking out again. Debugging information If you are acting on behalf of the merchant, more information about this error has been made available in the Integration Console under the Tools section. You can access the details of this error directly by logging into your merchant account and then pasting the following url: https://checkout.goo...48-25309146d9fd Edited October 5, 2012 by Prestadget (see edit history) 1 Link to comment Share on other sites More sharing options...
Adober Posted October 17, 2012 Share Posted October 17, 2012 I have same problem. Do you find any solution? Link to comment Share on other sites More sharing options...
mcamp7 Posted November 2, 2012 Share Posted November 2, 2012 Same problem. Link to comment Share on other sites More sharing options...
europablue Posted November 3, 2012 Share Posted November 3, 2012 And the same here. Link to comment Share on other sites More sharing options...
Arkadia Posted November 12, 2012 Share Posted November 12, 2012 Anyone make any progress with this issue? Link to comment Share on other sites More sharing options...
steve_c Posted November 25, 2012 Share Posted November 25, 2012 Same problem. Has anyone fixed this? Thanks Link to comment Share on other sites More sharing options...
jamestaylor Posted November 28, 2012 Share Posted November 28, 2012 Same problem and any solution ? Can someone in the team give us an answer about this problem ? Link to comment Share on other sites More sharing options...
Spidersiteme Posted December 14, 2012 Share Posted December 14, 2012 has anybody fix this bug yet Link to comment Share on other sites More sharing options...
jamestaylor Posted December 14, 2012 Share Posted December 14, 2012 (edited) And nobody can't give an answer about this issue. What is wrong with the team. How can Prestashop wins awards if the Prestashop team dont give any support with an important issue ? Edited December 14, 2012 by jamestaylor (see edit history) Link to comment Share on other sites More sharing options...
steve_c Posted December 14, 2012 Share Posted December 14, 2012 I had to pay $399 to have this problem fixed. Link to comment Share on other sites More sharing options...
jamestaylor Posted December 14, 2012 Share Posted December 14, 2012 $399 ! just to fix a module developped by Prestashop ! Link to comment Share on other sites More sharing options...
mux Posted December 28, 2012 Share Posted December 28, 2012 Same here but no support yet from anywhere Link to comment Share on other sites More sharing options...
mac83 Posted January 27, 2013 Share Posted January 27, 2013 this work great on v:1.5.2 Hi, in Prestashop 1.5.1 : The context variable is defined in /classes/module/Module.php, unfortunately, this variable is declared as protected (line 117). A quick fix is to change protected by public. But after have fixed this, I got Oops! PrestaShop has sent Google a shopping cart with errors in it. We'll contact them to ask that they fix this problem. As this could be a temporary issue, you can go back in your browser to try checking out again. Debugging information If you are acting on behalf of the merchant, more information about this error has been made available in the Integration Console under the Tools section. You can access the details of this error directly by logging into your merchant account and then pasting the following url: https://checkout.goo...48-25309146d9fd Link to comment Share on other sites More sharing options...
ukbaz Posted February 25, 2013 Share Posted February 25, 2013 Same issue! Anyone solve this yet?!!!! Link to comment Share on other sites More sharing options...
charlie123 Posted February 25, 2013 Share Posted February 25, 2013 Same here, the current version of 1.5 and when customer is choosing Google Checkout as Payment method, all you can see is: Fatal error: Cannot access protected property GCheckout::$context in /home/admin/domains/xxxxxx/public_html/modules/gcheckout/payment.php on line 37 I've noticed there is a .httaccess file in gcheckout module folder, I don't know if this is causing the issue. Anyone know how to fix it? Link to comment Share on other sites More sharing options...
ukbaz Posted February 27, 2013 Share Posted February 27, 2013 Still no answer???? Link to comment Share on other sites More sharing options...
Host Yorkshire Posted March 7, 2013 Share Posted March 7, 2013 I have this problem too. Anyone any further with it? I'm also getting a blank page when trying to use the 2Checkout Module :-( Link to comment Share on other sites More sharing options...
Mr S Posted March 16, 2013 Share Posted March 16, 2013 (edited) please up vote for fix bug reported at http://forge.prestas...browse/PNM-1093 Just an update 1st: Tools::redirect('index.php?co:q:q:qntroller=authentication&back=order.php'); should be: Tools::redirect('index.php?controller=authentication&back=order.php'); and it looks like the errors is caused by Context::getContext()->customer->isLogged() I am going to try to wright a new payment function with ModuleFrontController http://doc.prestashop.com/display/PS15/New+Developers+Features+In+PrestaShop+1.5#NewDevelopersFeaturesInPrestaShop1.5-NewFile-treeAndOperations Edited March 16, 2013 by HA!*!*Y (see edit history) Link to comment Share on other sites More sharing options...
Mr S Posted March 16, 2013 Share Posted March 16, 2013 Its a step backwards but it works <?php include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../init.php'); include(dirname(__FILE__).'/gcheckout.php'); if (!$cookie->isLogged(true)) Tools::redirect('authentication.php?back=order.php'); elseif (!$cart->getOrderTotal(true, Cart::BOTH)) Tools::displayError('Error: Empty cart'); $gcheckout = new GCheckout(); /* //this code was causing error if (_PS_VERSION_ >= '1.5' && !Context::getContext()->customer->isLogged(true)) Tools::redirect('index.php?controller=authentication&back=order.php'); else if (_PS_VERSION_ < '1.5' && !$cookie->isLogged(true)) Tools::redirect('authentication.php?back=order.php'); else if (!$gcheckout->context->cart->getOrderTotal(true, Cart::BOTH)) Tools::displayError('Error: Empty cart'); */ // Prepare payment $gcheckout->preparePayment(); include(dirname(__FILE__).'/../../header.php'); // Display echo $gcheckout->display('gcheckout.php', 'confirm.tpl'); include_once(dirname(__FILE__).'/../../footer.php'); Link to comment Share on other sites More sharing options...
ukbaz Posted March 18, 2013 Share Posted March 18, 2013 Where can I find the 1.5 version of google checkout module - can't seem to find it on any download now! Can anyone attach the zip file here please? Link to comment Share on other sites More sharing options...
charlie123 Posted March 18, 2013 Share Posted March 18, 2013 Its a step backwards but it works isLogged(true)) Tools::redirect('authentication.php?back=order.php'); elseif (!$cart->getOrderTotal(true, Cart::BOTH)) Tools::displayError('Error: Empty cart'); $gcheckout = new GCheckout(); /* //this code was causing error if (_PS_VERSION_ >= '1.5' && !Context::getContext()->customer->isLogged(true)) Tools::redirect('index.php?controller=authentication&back=order.php'); else if (_PS_VERSION_ < '1.5' && !$cookie->isLogged(true)) Tools::redirect('authentication.php?back=order.php'); else if (!$gcheckout->context->cart->getOrderTotal(true, Cart::BOTH)) Tools::displayError('Error: Empty cart'); */ // Prepare payment $gcheckout->preparePayment(); include(dirname(__FILE__).'/../../header.php'); // Display echo $gcheckout->display('gcheckout.php', 'confirm.tpl'); include_once(dirname(__FILE__).'/../../footer.php'); This doesn't fix the issue properly (well, not for me) You can now click Google Checkout and you are able to see the confirmation page, but as soon as you click I CONFIRM MY ORDER, you are redirected to the Google Wallet page which throws the error: Oops! PrestaShop has sent Google a shopping cart with errors in it. We'll contact them to ask that they fix this problem. As this could be a temporary issue, you can go back in your browser to try checking out again. Debugging information If you are acting on behalf of the merchant, more information about this error has been made available in the Integration Console under the Tools section. You can access the details of this error directly by logging into your merchant account and then pasting the following url: https://checkout.google.com/sell/settings?section=IntegrationConsole&returnURL=https%3A%2F%2Fcheckout.google.com%2Fsell%2Fsettings%3Fsection%3DIntegrationConsole&serialNumber=8ae6... Link to comment Share on other sites More sharing options...
Mr S Posted March 18, 2013 Share Posted March 18, 2013 Where can I find the 1.5 version of google checkout module - can't seem to find it on any download now! Can anyone attach the zip file here please? go to your back office Modules page and search for "gcheckout" ... Oops! PrestaShop has sent Google a shopping cart with errors in it. We'll contact them to ask that they fix this problem. As this could be a temporary issue, you can go back in your browser to try checking out again. .... It's working for me i get to the Google payment screen with out error. 1st could you check your: /modules/gcheckout/error_log (if your server saves php errors) 2nd Log in to your Google checkout: https://checkout.google.com/sell/ Than go to Tools ->Integration Console (https://checkout.google.com/sell/settings?section=IntegrationConsole) Send the error log as PM or post it on the forum to see what PS is sending to Google also did you read the file /modules/gcheckout/htaccessBugInformation.php to see if this bug applies to your server. Link to comment Share on other sites More sharing options...
charlie123 Posted March 19, 2013 Share Posted March 19, 2013 (edited) It's working for me i get to the Google payment screen with out error. 1st could you check your: /modules/gcheckout/error_log (if your server saves php errors) 2nd Log in to your Google checkout: https://checkout.google.com/sell/ Than go to Tools ->Integration Console (https://checkout.goo...egrationConsole) Send the error log as PM or post it on the forum to see what PS is sending to Google also did you read the file /modules/gcheckout/htaccessBugInformation.php to see if this bug applies to your server. Thank you for the message, Ok, I've noticed this error in Integration Console: Error parsing XML; message from parser is: Invalid value for attribute name in checkout-shopping-cart/checkout-flow-support/merchant-checkout-flow-support/shipping-methods/flat-rate-shipping: Required field must not be blank More documentation for this error. Warnings: XML failed to validate against the schema at line: 20, column 20, with error: cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_nameFlatRateShipping'. XML failed to validate against the schema at line: 20, column 20, with error: cvc-attribute.3: The value '' of attribute 'name' on element 'flat-rate-shipping' is not valid with respect to its type, 'null'. Looks like something to do with the shipping, let me play around... Edited March 19, 2013 by charlie123 (see edit history) Link to comment Share on other sites More sharing options...
charlie123 Posted March 19, 2013 Share Posted March 19, 2013 (edited) I can't find the solution... I provide free shipping. I am using SSL. The USE GOOGLE SHIPPING FEES is unticked on my side. Oh, and I am using one page checkout instead of four steps Integration error details: scr.hu/0gkm/s6yir Looks like Google is moaning about this bit: <flat-rate-shipping name=""> How I can get it to work? Thank you Edited March 19, 2013 by charlie123 (see edit history) Link to comment Share on other sites More sharing options...
ukbaz Posted March 20, 2013 Share Posted March 20, 2013 Well - definitive from Prestashop - they are no longer supporting Google checkout! That's just great for those of us who use it! Link to comment Share on other sites More sharing options...
Mr S Posted March 23, 2013 Share Posted March 23, 2013 @charlie123 try editing file /modules/gcheckout/library/googleshipping.php from: function GoogleFlatRateShipping($name, $price) { $this->name = $name; $this->price = $price; } To: function GoogleFlatRateShipping($name, $price) { $this->name = 'FreeShipping'; $this->price = $price; } 1 Link to comment Share on other sites More sharing options...
ukbaz Posted March 23, 2013 Share Posted March 23, 2013 Can someone plaes post the 1.5 Google Checkout module - It is missing from the lastest v1.5 download! Thanks Link to comment Share on other sites More sharing options...
Mr S Posted March 23, 2013 Share Posted March 23, 2013 Go to your back office Modules page and search for "gcheckout" Link to comment Share on other sites More sharing options...
charlie123 Posted March 25, 2013 Share Posted March 25, 2013 @charlie123 try editing file /modules/gcheckout/library/googleshipping.php from: function GoogleFlatRateShipping($name, $price) { $this->name = $name; $this->price = $price; } To: function GoogleFlatRateShipping($name, $price) { $this->name = 'FreeShipping'; $this->price = $price; } Thanks! It worked, managed to get on the Wallet Checkout page, will need to test it now if everything work fine Thank you! Link to comment Share on other sites More sharing options...
charlie123 Posted April 17, 2013 Share Posted April 17, 2013 Well, all happiness has been destroyed after 1.5.4 update as the Google Checkout doesn't work anymore. It was also reported here:http://www.prestashop.com/forums/topic/236465-google-checkout-on-prestashop-154/ I don't know why it doesn't work as the files from gcheckout were untouch during the update. Anyone has the same issue? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now