[-] FO : fixed bug #PSCFV-4357, #PSCFV-4270
This commit is contained in:
@@ -96,23 +96,22 @@ class AuthControllerCore extends FrontController
|
||||
if (!empty($key))
|
||||
$back .= (strpos($back, '?') !== false ? '&' : '?').'key='.$key;
|
||||
if (!empty($back))
|
||||
{
|
||||
$this->context->smarty->assign('back', Tools::safeOutput($back));
|
||||
if (strpos($back, 'order') !== false)
|
||||
{
|
||||
if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES'))
|
||||
$countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
|
||||
else
|
||||
$countries = Country::getCountries($this->context->language->id, true);
|
||||
|
||||
if (Tools::getValue('display_guest_checkout'))
|
||||
{
|
||||
if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES'))
|
||||
$countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
|
||||
else
|
||||
$countries = Country::getCountries($this->context->language->id, true);
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'inOrderProcess' => true,
|
||||
'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
|
||||
'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
|
||||
'sl_country' => (int)Tools::getValue('id_country', Configuration::get('PS_COUNTRY_DEFAULT')),
|
||||
'countries' => $countries
|
||||
));
|
||||
}
|
||||
$this->context->smarty->assign(array(
|
||||
'inOrderProcess' => true,
|
||||
'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
|
||||
'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
|
||||
'sl_country' => (int)Tools::getValue('id_country', Configuration::get('PS_COUNTRY_DEFAULT')),
|
||||
'countries' => $countries
|
||||
));
|
||||
}
|
||||
|
||||
if (Tools::getValue('create_account'))
|
||||
@@ -400,6 +399,7 @@ class AuthControllerCore extends FrontController
|
||||
|
||||
if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount'))
|
||||
{
|
||||
|
||||
if (!count($this->errors))
|
||||
{
|
||||
if (Tools::isSubmit('newsletter'))
|
||||
@@ -515,6 +515,7 @@ class AuthControllerCore extends FrontController
|
||||
$this->processCustomerNewsletter($customer);
|
||||
|
||||
$customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']);
|
||||
|
||||
if (!count($this->errors))
|
||||
{
|
||||
// if registration type is in one step, we save the address
|
||||
@@ -605,6 +606,10 @@ class AuthControllerCore extends FrontController
|
||||
|
||||
if (count($this->errors))
|
||||
{
|
||||
//for retro compatibility to display guest account creation form on authentication page
|
||||
if (Tools::getValue('submitGuestAccount'))
|
||||
$_GET['display_guest_checkout'] = 1;
|
||||
|
||||
if (!Tools::getValue('is_new_customer'))
|
||||
unset($_POST['passwd']);
|
||||
if ($this->ajax)
|
||||
|
||||
@@ -64,7 +64,7 @@ class OrderControllerCore extends ParentOrderController
|
||||
);
|
||||
}
|
||||
if (!$this->context->customer->isLogged(true) && in_array($this->step, array(1, 2, 3)))
|
||||
Tools::redirect($this->context->link->getPageLink('authentication', true, (int)$this->context->language->id, 'back='.$this->context->link->getPageLink('order', true, (int)$this->context->language->id, 'step='.$this->step.'&multi-shipping='.(int)Tools::getValue('multi-shipping')).'&multi-shipping='.(int)Tools::getValue('multi-shipping')));
|
||||
Tools::redirect($this->context->link->getPageLink('authentication', true, (int)$this->context->language->id, 'back='.$this->context->link->getPageLink('order', true, (int)$this->context->language->id, 'step='.$this->step.'&multi-shipping='.(int)Tools::getValue('multi-shipping')).'&multi-shipping='.(int)Tools::getValue('multi-shipping').'&display_guest_checkout='.(int)Configuration::get('PS_GUEST_CHECKOUT_ENABLED')));
|
||||
|
||||
if (Tools::getValue('multi-shipping') == 1)
|
||||
$this->context->smarty->assign('multi_shipping', true);
|
||||
|
||||
@@ -169,7 +169,7 @@ class Blockcustomerprivacy extends Module
|
||||
{
|
||||
if (!$this->checkConfig())
|
||||
return;
|
||||
$this->context->controller->addJS(($this->_path).'blockcustomerprivacy.js');
|
||||
$this->context->controller->addJS($this->_path.'blockcustomerprivacy.js');
|
||||
}
|
||||
|
||||
public function hookActionBeforeSubmitAccount($params)
|
||||
|
||||
@@ -344,8 +344,10 @@ $(function(){ldelim}
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
</p>
|
||||
</fieldset>
|
||||
{$HOOK_CREATE_ACCOUNT_FORM}
|
||||
<p class="cart_navigation required submit">
|
||||
<span><sup>*</sup>{l s='Required field'}</span>
|
||||
<input type="hidden" name="display_guest_checkout" value="1" />
|
||||
<input type="submit" class="exclusive" name="submitGuestAccount" id="submitGuestAccount" value="{l s='Continue'}">
|
||||
</p>
|
||||
</form>
|
||||
@@ -575,6 +577,5 @@ $(function(){ldelim}
|
||||
<input type="submit" name="submitAccount" id="submitAccount" value="{l s='Register'}" class="exclusive" />
|
||||
<span><sup>*</sup>{l s='Required field'}</span>
|
||||
</p>
|
||||
|
||||
</form>
|
||||
{/if}
|
||||
{/if}
|
||||
Reference in New Issue
Block a user