Originally Posted by
PlanetDesign
Hi. Have just returned to using Zen after some time with other carts. Got everything all working EXCEPT for one issue with the one page checkout plugin. Works fine with the guest checkout disabled, but when I enable guest checkout through admin the final stage - 'checkout_one_confirmation' just brings up a page not working message? Am running through wampserver so have attached the error log. Can someone point me in the right direction to resolve this, as really want the guest feature... Payment provider setup as PayPal Std which works fine when the guest feature disabled.
Thanks...
[29-Aug-2023 17:55:06 UTC] PHP Fatal error: Uncaught TypeError: Argument 2 passed to zen_get_zone_code() must be of the type int, string given, called in C:\wamp64\www\zencart158a\includes\modules\payment\paypal.php on line 275 and defined in C:\wamp64\www\zencart158a\includes\functions\functions_addresses.php:173
Stack trace:
#0 C:\wamp64\www\zencart158a\includes\modules\payment\paypal.php(275): zen_get_zone_code(222, '', '-- Please Selec...')
#1 C:\wamp64\www\zencart158a\includes\classes\payment.php(279): paypal->process_button()
#2 C:\wamp64\www\zencart158a\includes\modules\pages\checkout_one_confirmation\heade r_php.php(407): payment->process_button()
#3 C:\wamp64\www\zencart158a\index.php(35): require('C:\\wamp64\\www\\z...')
#4 {main}
thrown in C:\wamp64\www\zencart158a\includes\functions\functions_addresses.php on line 173
[29-Aug-2023 17:55:06 UTC] Request URI: /zencart158a/index.php?main_page=checkout_one_confirmation, IP address: ::1
--> PHP Fatal error: Uncaught TypeError: Argument 2 passed to zen_get_zone_code() must be of the type int, string given, called in C:\wamp64\www\zencart158a\includes\modules\payment\paypal.php on line 275 and defined in C:\wamp64\www\zencart158a\includes\functions\functions_addresses.php:173
Stack trace:
#0 C:\wamp64\www\zencart158a\includes\modules\payment\paypal.php(275): zen_get_zone_code(222, '', '-- Please Selec...')
#1 C:\wamp64\www\zencart158a\includes\classes\payment.php(279): paypal->process_button()
#2 C:\wamp64\www\zencart158a\includes\modules\pages\checkout_one_confirmation\heade r_php.php(407): payment->process_button()
#3 C:\wamp64\www\zencart158a\index.php(35): require('C:\\wamp64\\www\\z...')
#4 {main}
thrown in C:\wamp64\www\zencart158a\includes\functions\functions_addresses.php on line 173.
Your "quickest path to success" is going to be the editing of /includes/modules/payment/paypal.php, line 275, changing that to read
Code:
'state' => zen_get_zone_code((int)$order->customer['country']['id'], (int)$order->customer['zone_id'], $order->customer['state']),
I'll create an issue on OPC's GitHub repository to ensure that those address-related values are integer values for a future release.
n.b. Issue created: https://github.com/lat9/one_page_checkout/issues/383
Bookmarks