Re: One-Page Checkout [Support Thread]
Latest WebPay and OPC installed to topkayakerDOTcom. PHP 7.4
getting
Code:
[05-May-2022 18:54:50 UTC] Request URI: /index.php?main_page=checkout_process, IP address: ***.***.***.***
#1 var_export() called at [/includes/classes/OnePageCheckout.php:744]
#2 OnePageCheckout->updateOrderAddresses() called at [/includes/classes/observers/class.checkout_one_observer.php:422]
#3 checkout_one_observer->update() called at [/includes/classes/class.base.php:118]
#4 base->notify() called at [/includes/classes/order.php:425]
#5 order->cart() called at [/includes/classes/order.php:35]
#6 order->__construct() called at [/includes/modules/checkout_process.php:48]
#7 require(/includes/modules/checkout_process.php) called at [/includes/modules/pages/checkout_process/header_php.php:14]
#8 require(/includes/modules/pages/checkout_process/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 744.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
dbltoe
Latest WebPay and OPC installed to topkayakerDOTcom. PHP 7.4
getting
Code:
[05-May-2022 18:54:50 UTC] Request URI: /index.php?main_page=checkout_process, IP address: ***.***.***.***
#1 var_export() called at [/includes/classes/OnePageCheckout.php:744]
#2 OnePageCheckout->updateOrderAddresses() called at [/includes/classes/observers/class.checkout_one_observer.php:422]
#3 checkout_one_observer->update() called at [/includes/classes/class.base.php:118]
#4 base->notify() called at [/includes/classes/order.php:425]
#5 order->cart() called at [/includes/classes/order.php:35]
#6 order->__construct() called at [/includes/modules/checkout_process.php:48]
#7 require(/includes/modules/checkout_process.php) called at [/includes/modules/pages/checkout_process/header_php.php:14]
#8 require(/includes/modules/pages/checkout_process/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 744.
Zen Cart version?
Re: One-Page Checkout [Support Thread]
Re: One-Page Checkout [Support Thread]
This is just a partial (had to cut it to fit) but, today, we have started getting the line 567 added to the mix.
[CODE][06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
[06-May-2022 03:09:59 UTC] Request URI: /index.php?main_page=checkout_one, IP address: 172.89.81.16
#1 var_export() called at [/includes/classes/OnePageCheckout.php:567]
#2 OnePageCheckout->startGuestOnePageCheckout() called at [/includes/modules/pages/checkout_one/header_php.php:41]
#3 require(/includes/modules/pages/checkout_one/header_php.php) called at [/index.php:35]
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
Re: One-Page Checkout [Support Thread]
@dbltoe, what happens if you change line 567 of /includes/classes/OnePageCheckout.php from
Code:
$this->debugMessage('startGuestOnePageCheckout, exit: sendto: ' . ((isset($_SESSION['sendto'])) ? $_SESSION['sendto'] : 'not set') . ', billto: ' . ((isset($_SESSION['billto'])) ? $_SESSION['billto'] : 'not set') . var_export($this, true));
to
Code:
$this->debugMessage('startGuestOnePageCheckout, exit: sendto: ' . ((isset($_SESSION['sendto'])) ? $_SESSION['sendto'] : 'not set') . ', billto: ' . ((isset($_SESSION['billto'])) ? $_SESSION['billto'] : 'not set') . json_encode($this));
If that suppresses the error, would you turn on the OPC debug and send a copy of the generated log to my private email address? I have no idea where that circular reference is coming from.
Re: One-Page Checkout [Support Thread]
commented out line 567 and added your code to 569. Got
Code:
[06-May-2022 20:57:29 UTC] PHP Parse error: syntax error, unexpected ')' in /includes/classes/OnePageCheckout.php on line 569
[06-May-2022 20:57:29 UTC] Request URI: /index.php?main_page=index&Path=3, IP address: 157.55.39.46
--> PHP Parse error: syntax error, unexpected ')' in /includes/classes/OnePageCheckout.php on line 569.
so I put 567 back.
Re: One-Page Checkout [Support Thread]
Hi, me again!
I think that in checkout_one_confirmation/header_php.php there is a problem with the message stack.
Here's the code that handles the "translation" of messages to the correct class of message:
Code:
if ($error || $messageStack->size('checkout_payment') > 0 || !$order_confirmed) {
// -----
// Need to "redirect" any messages to 'checkout' (issued by ot_coupon and possibly others) so they display properly
// on the checkout_one page.
//
if ($messageStack->size('checkout') > 0) {
foreach ($messageStack->messages as $i => $current_message) {
if ($current_message['class'] == 'checkout') {
$messageStack->messages[$i]['class'] = 'checkout_payment';
}
}
}
$checkout_one->debug_message("Something causing redirection back to checkout_one, error ($error), order_confirmed ($order_confirmed)" . var_export($messageStack->messages, true) . var_export($ot_total, true));
zen_redirect(zen_href_link(FILENAME_CHECKOUT_ONE, '', 'SSL'));
}
The problem is that the method $messageStack->size includes a reset of the variable $_SESSION['messageToStack'] which means that one loses all the add_session messages.
I think you need to do something like:
Code:
$temp['checkout_payment'] = 0;
$temp['checkout'] = 0;
if (count($messageStack->messages)) {
foreach ($messageStack->messages as $m) {
switch ($m['class']) {
case 'checkout_payment':
$temp['checkout_payment']++;
break;
case 'checkout':
$temp['checkout']++;
break;
default:
break;
}
}
}
if ($error || $temp['checkout_payment'] > 0 || !$order_confirmed) {
// -----
// Need to "redirect" any messages to 'checkout' (issued by ot_coupon and possibly others) so they display properly
// on the checkout_one page.
//
if ($temp['checkout'] > 0) {
foreach ($messageStack->messages as $i => $current_message) {
if ($current_message['class'] == 'checkout') {
$messageStack->messages[$i]['class'] = 'checkout_payment';
}
}
}
$checkout_one->debug_message("Something causing redirection back to checkout_one, error ($error), order_confirmed ($order_confirmed)" . var_export($messageStack->messages, true) . var_export($ot_total, true));
zen_redirect(zen_href_link(FILENAME_CHECKOUT_ONE, '', 'SSL'));
}
Nick
Re: One-Page Checkout [Support Thread]
@niccol, what version of Zen Cart are you running on? The zc157+ version of /includes/classes/message_stack.php don't include that session reset.
Update: Never mind; I'll get OPC updated.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
@niccol, what version of Zen Cart are you running on? The zc157+ version of /includes/classes/message_stack.php don't include that session reset.
Update: Never mind; I'll get OPC updated.
GitHub tracking issue: https://github.com/lat9/one_page_checkout/issues/326
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
@niccol, what version of Zen Cart are you running on? The zc157+ version of /includes/classes/message_stack.php don't include that session reset.
Update: Never mind; I'll get OPC updated.
Oh, now I am not sure. This is a site I have inherited.
It says 1.5.7a but obviously the line is not in the default Zen code. (or in 1.5.0) So, I don't know.
What I am seeing on this site is this: (but it might be non-standard and someone has edited in the past.)
Code:
function size($class)
{
if (!empty($_SESSION['messageToStack'])) {
foreach ($_SESSION['messageToStack'] as $next_message) {
$this->add($next_message['class'], $next_message['text'], $next_message['type']);
}
}
$_SESSION['messageToStack'] = array();
$count = 0;
foreach ($this->messages as $next_message) {
if ($next_message['class'] == $class) {
$count++;
}
}
return $count;
}
But your point about it being unnecessary anyway on Github makes a lot of sense :-)