Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7916959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:59:15+00:00 2026-06-03T14:59:15+00:00

I am struggling with modifying some code in Customer registration management module. Instant checkout

  • 0

I am struggling with modifying some code in Customer registration management module. Instant checkout is not working the way it should. When the Customer registration management module is disabled, the Instant Checkout is working fine, on submit and with no errors we go to the next step/screen. When Customer registration module is enabled, once we click on submit button under Instant checkout, we do not go to the next step/screen, instead we come back to the same screens, forms empty, and in url we have this: authentication?back=order.php%3Fstep%3D1
I managed to identify a piece a code which is preventing a customer from going to the following screen from Instant checkout form. It is the code in function hookCreateAccount($params)

    function hookCreateAccount($params)
{
  require_once (dirname(__FILE__).'/ApprovedCustomer.php');
  global $cookie, $back;

  $registration_code = pSQL(Tools::getValue('registration_code'));
  if ($registration_code != '' AND $registration_code == $this->_registrationCode) {
   $customer = $params['newCustomer'];
   $customer->cleanGroups();
   $customer->addGroups ($this->_defaultGroups);

  }

  $cookie->logged = $this->_isCustomerRegistredByDefault;
  $cust = $params['newCustomer'];
  $approval = new ApprovedCustomer($cust->id);
  $approval->is_approved = $this->_isCustomerRegistredByDefault;
  $approval->privilege_request = intval(Tools::getValue('privilege_request'),0);
  $approval->privilege_message = pSQL(Tools::getValue('privilege_message'), '');;
  if (! $approval->save())
   Tools::D('Unable to save approval information');

  if ($this->_sendAdminMail)
   $this->sendMail('pending_registration', array('customer' => $cust, 'approval'=>$approval));
  if (! $approval->is_approved) {
   $back = 'modules/'.basename(__FILE__, '.php').'/messages.php?msg=noconnect&back=my-account.php';
   $cookie->logged = 0;
  $cookie->id_customer = 0;
  }

  elseif ($back == '')
   $back = 'my-account.php';
}

Anybody has any ideas what in this code is causing this? any help would be really appreciated.

exactly what happens: once the user fill in Instant checkout form and clicks on submit, the form is redirected to the same page: … /authentication?back=order.php%3Fstep%3D1
but it should go to: /order?step=2

the Instant Checkout form action:

<form action="{$link->getPageLink('authentication.php', true)}?back={$back}" method="post" id="new_account_form" class="std">

so, should I change the action part then? how does this work? could somebody point me to the right direction? any help would be really appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:59:17+00:00Added an answer on June 3, 2026 at 2:59 pm

    I suspect that the conflict occurs because by definition your customer isn’t registering as part of the One Page Checkout functionality (I assume this is what you mean by Instant Checkout).

    You could try refactoring the first block of code as:

    global $cookie, $back;
    
    $customer = $params['newCustomer'];
    if ($customer->is_guest)
      return;
    
    require_once (dirname(__FILE__).'/ApprovedCustomer.php');
    
    
    $registration_code = pSQL(Tools::getValue('registration_code'));
    if ($registration_code != '' AND $registration_code == $this->_registrationCode) {
      $customer->cleanGroups();
      $customer->addGroups ($this->_defaultGroups);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Attempting/struggling to get registration and sign-up working within an active admin project. I have
Struggling with this tournament fixtures algorithm. The code is working perfectly but I need
Struggling with Bing's json request (bing search, not map), I am getting an error
I'm still working on modifying my existing WPF application to be compliant with the
Struggling to get nested repeaters working although I feel I am close! I am
Struggling with onchange for JQuery Datetime plugin: http://plugins.jquery.com/project/datetime I am using the following code.
Im struggling with some iOS development and I hope someone will be able to
still struggling with regex :) i have this code: $link = '/\bhttp:\/\/.+\..+[\/\w]?\b/i'; $match =
Im struggling a bit with the UIkeyboard, I have a datePicker, IntervalPicker some custom
Struggling to set permissions on a listitem... everything appears to be working fine.. no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.