Purchase without Account

Profile Ghosted (unselected) after password creation. - Purchase without Account

Profile Ghosted (unselected) after password creation.

by plamastus » Mon Apr 12, 2021 1:00 pm

Hi Raiwa,

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']);
      }
error_log:
[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,
patrick
plamastus
Member
Posts: 82
Joined: Fri Mar 12, 2021 2:09 am
Phoenix Version:
Contact:

Re: Profile Ghosted (unselected) after password creation.

by raiwa » Mon Apr 12, 2021 1:36 pm

If you go one page further after setting password, it will not be disabled any more. (Same happens in core for example on logoff, user still shows in the account menu until the next pageload) That's normal.

Forget for 1.0.8.1, it's not yet updated for that version and will probably not be updated until 1.0.9.0 release.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact:

Re: Profile Ghosted (unselected) after password creation.

by plamastus » Mon Apr 12, 2021 1:46 pm

Works perfect ....Thanks
patrick
plamastus
Member
Posts: 82
Joined: Fri Mar 12, 2021 2:09 am
Phoenix Version:
Contact: