title: Prestashop - customer registration management module - slight modification
body: <p>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)</p>
  
  <pre><code>    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-&gt;_registrationCode) {
     $customer = $params['newCustomer'];
     $customer-&gt;cleanGroups();
     $customer-&gt;addGroups ($this-&gt;_defaultGroups);
  
    }
  
    $cookie-&gt;logged = $this-&gt;_isCustomerRegistredByDefault;
    $cust = $params['newCustomer'];
    $approval = new ApprovedCustomer($cust-&gt;id);
    $approval-&gt;is_approved = $this-&gt;_isCustomerRegistredByDefault;
    $approval-&gt;privilege_request = intval(Tools::getValue('privilege_request'),0);
    $approval-&gt;privilege_message = pSQL(Tools::getValue('privilege_message'), '');;
    if (! $approval-&gt;save())
     Tools::D('Unable to save approval information');
  
    if ($this-&gt;_sendAdminMail)
     $this-&gt;sendMail('pending_registration', array('customer' =&gt; $cust, 'approval'=&gt;$approval));
    if (! $approval-&gt;is_approved) {
     $back = 'modules/'.basename(__FILE__, '.php').'/messages.php?msg=noconnect&amp;back=my-account.php';
     $cookie-&gt;logged = 0;
    $cookie-&gt;id_customer = 0;
    }
  
    elseif ($back == '')
     $back = 'my-account.php';
  }
  </code></pre>
  
  <p>Anybody has any ideas what in this code is causing this? any help would be really appreciated.</p>
  
  <p>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</p>
  
  <p>the Instant Checkout form action:</p>
  
  <pre><code>&lt;form action="{$link-&gt;getPageLink('authentication.php', true)}?back={$back}" method="post" id="new_account_form" class="std"&gt;
  </code></pre>
  
  <p>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.</p>