Phoenix 1.0.8.0 and 1.0.8.1
PHP 7.4.16
The Profile and signout are ghosted (unselectable) after guest created account with password, code works as designed. See below for some step debugs I put to the error_log:
Some debug if it helps:
Code: Select all
// do things if a guest comes from checkout success
if ( isset($_SESSION['customer_is_guest']) && isset($_SESSION['navigation']->snapshot['page']) && $_SESSION['navigation']->snapshot['page'] == 'checkout_success.php' ) {
error_log("If 1.0 About to MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_KEEP_ACCOUNT_STATUS", 0);
if ( defined('MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_KEEP_ACCOUNT_STATUS') && MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_KEEP_ACCOUNT_STATUS == 'True' &&
$PHP_SELF == 'account.php' && strpos($GLOBALS['messageStack']->output('account'), 'alert-success') ) {
// Unregister and remove guest from customers table if password is successful set
error_log("Session About to Unset", 0);
unset($_SESSION['customer_is_guest']);
error_log("Session Unset", 0);
tep_db_query(sprintf(<<<'EOSQL'
UPDATE customers
SET customers_guest = '0'
WHERE customers_id = %s
EOSQL
, (int)$_SESSION['customer_id']));
error_log("endif DOne", 0);
} elseif ( $PHP_SELF != 'download.php' && basename($PHP_SELF) != 'set_password.php' && substr($PHP_SELF, 0, 8) != 'checkout' ) {
// else delete guest account
$this->delete_guest_account($_SESSION['customer_id']);
}
[12-Apr-2021 07:46:10 America/New_York] If 1.0 About to MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_KEEP_ACCOUNT_STATUS
[12-Apr-2021 07:46:32 America/New_York] If 1.0 About to MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_KEEP_ACCOUNT_STATUS
[12-Apr-2021 07:46:44 America/New_York] If 1.0 About to MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_KEEP_ACCOUNT_STATUS
[12-Apr-2021 07:46:44 America/New_York] If 1.0 About to MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_KEEP_ACCOUNT_STATUS
[12-Apr-2021 07:46:44 America/New_York] Session About to Unset
[12-Apr-2021 07:46:44 America/New_York] Session Unset
[12-Apr-2021 07:46:44 America/New_York] endif DOne
Thanks,