Le problème est quand on a mis des produits dans le panier sans être connecté ou enregistrer.
Donc on a mis des produits dans le panier et on clic terminer ma commande.
On arrive a la page de connexion et enregistrement d'un nouveau client.
C'est la ou il n'y a rien qui se passe.
<?php
/**
* @package HikaShop for Joomla!
* @version 3.2.2
* @author hikashop.com
* @copyright (C) 2010-2018 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
if(!$this->identified){
$this->nextButton = false;
$params = null; $js = null;
$classLogin = "hikashop_hidden_checkout";
$classRegistration = "";
$defaultSelection = '2';
$span='';
$display_login = $this->config->get('display_login',1);
$sr = explode(',', $this->simplified_registration);
$this->registration = array(0=>false,1=>false,2=>false,3=>false);
foreach($sr as $r) {
$this->registration[ (int)$r ] = true;
}
$registration_count = count($sr);
if($display_login){
$classLogin = '';
$classRegistration = 'hikashop_hidden_checkout';
$defaultSelection = 'login';
}
if($this->display_method == 0) {
?>
<!-- CLASSIC DISPLAY-->
<?php
if($display_login) {
if($this->registration[2]){
echo '<h1>'.JText::_('LOGIN_OR_GUEST').'</h1>';
} else {
echo '<h1>'.JText::_('LOGIN_OR_REGISTER_ACCOUNT').'</h1>';
}
}
?>
<div id="hikashop_checkout_login" class="hikashop_checkout_login row-fluid">
<?php
if($display_login) {
?>
<div id="hikashop_checkout_login_left_part" class="hikashop_checkout_login_left_part span4">
<fieldset class="input">
<h2><?php echo JText::_('HIKA_LOGIN');?></h2>
<?php echo $this->loadTemplate('form'); ?>
</fieldset>
</div>
<?php } ?>
<div id="hikashop_checkout_login_right_part" class="hikashop_checkout_login_right_part span8">
<fieldset class="input">
<h2><?php
if($this->registration[2]) {
echo JText::_('GUEST');
} else {
echo JText::_('HIKA_REGISTRATION');
}
?></h2>
<?php
$usersConfig = JComponentHelper::getParams( 'com_users' );
$allowRegistration = $usersConfig->get('allowUserRegistration');
if($allowRegistration || $this->registration[2]){
echo hikashop_getLayout('user','registration',$params,$js);
}else{
echo JText::_('REGISTRATION_NOT_ALLOWED');
}
?>
</fieldset>
</div>
</div>
<input type="hidden" id="login_view_action" name="login_view_action" value="" />
<div style="clear:both"></div><br/>
<?php
}else{
if($display_login && ($this->registration[0] || $this->registration[1] || $this->registration[3]) && $this->registration[2])
echo '<h1>'.JText::_('LOGIN_OR_REGISTER_ACCOUNT_OR_GUEST').'</h1>';
else if($display_login && ($this->registration[0] || $this->registration[1] || $this->registration[3]))
echo '<h1>'.JText::_('LOGIN_OR_REGISTER_ACCOUNT').'</h1>';
else if($display_login && $this->registration[2])
echo '<h1>'.JText::_('LOGIN_OR_GUEST').'</h1>';
else if(!$display_login && ($this->registration[0] || $this->registration[1] || $this->registration[3]) && $this->registration[2])
echo '<h1>'.JText::_('REGISTER_ACCOUNT_OR_GUEST').'</h1>';
?>
<!-- THIS IS THE SWITCHER DISPLAY, RADIO BUTTON ON THE LEFT, FORMS ON THE RIGHT-->
<div id="hikashop_checkout_login" class="hikashop_checkout_login row-fluid">
<?php
if($this->display_method == 1 && (($display_login && $registration_count > 0) || $registration_count > 1)) {
$span='span8';
?>
<div id="hikashop_checkout_login_left_part" class="hikashop_checkout_login_left_part span4">
<fieldset class="input">
<h2><?php echo JText::_('IDENTIFICATION');?></h2>
<?php
$values = array();
$v = null;
if($display_login) {
$v = JHTML::_('select.option', 'login', JText::_('HIKA_LOGIN').'<br/>');
$v->class = 'hikabtn-checkout-login';
$values[] = $v;
}
if($this->registration[0]){
$v = JHTML::_('select.option', 0, JText::_('HIKA_REGISTRATION').'<br/>');
$v->class = 'hikabtn-checkout-registration';
$values[] = $v;
}
if($this->registration[1]){
$v = JHTML::_('select.option', 1, JText::_('HIKA_REGISTRATION').'<br/>');
$v->class = 'hikabtn-checkout-simplified';
$values[] = $v;
}
if($this->registration[3]){
$v = JHTML::_('select.option', 3, JText::_('HIKA_REGISTRATION').'<br/>');
$v->class = 'hikabtn-checkout-simplified-pwd';
$values[] = $v;
}
if($this->registration[2]){
$v = JHTML::_('select.option', 2, JText::_('GUEST').'<br/>');
$v->class = 'hikabtn-checkout-guest';
$values[] = $v;
}
$defaultSelection = $this->config->get('default_registration_view','login');
if(empty($defaultSelection)){
$defaultSelection = 'login';
}
$js = "
window.hikashop.ready( function(){
var currentRegistrationSelection = window.document.getElementById('data_register_registration_method".$defaultSelection."');
if(!currentRegistrationSelection) currentRegistrationSelection = window.document.getElementById('data[register][registration_method]".$defaultSelection."');
displayRegistration(currentRegistrationSelection);
});";
$doc = JFactory::getDocument();
$doc->addScriptDeclaration("\n<!--\n".$js."\n//-->\n");
echo JHTML::_('hikaselect.radiolist', $values, 'data[register][registration_method]', ' onchange="displayRegistration(this)"', 'value', 'text', $defaultSelection, false, false, true );
?>
</fieldset>
</div>
<?php } ?>
<div id="hikashop_checkout_login_right_part" class="hikashop_checkout_login_right_part <?php echo $span; ?>">
<div id="hikashop_checkout_registration" class="<?php echo $classRegistration; ?>">
<fieldset class="input">
<h2 id="hika_registration_type"><?php
if($this->registration[2] && $registration_count == 1) {
echo JText::_('GUEST');
} else {
echo JText::_('HIKA_REGISTRATION');
}
?></h2>
<?php
$usersConfig = JComponentHelper::getParams( 'com_users' );
$allowRegistration = $usersConfig->get('allowUserRegistration');
if ($allowRegistration || $this->registration[2]) {
echo hikashop_getLayout('user','registration',$params,$js);
} else {
echo JText::_('REGISTRATION_NOT_ALLOWED');
}
?>
</fieldset>
</div>
<?php if($display_login){ ?>
<div id="hikashop_checkout_login_form" class=" <?php echo $classLogin; ?>">
<fieldset class="input">
<h2><?php echo JText::_('HIKA_LOGIN');?></h2>
<?php echo $this->loadTemplate('form'); ?>
</fieldset>
</div>
<?php } ?>
</div>
</div>
<input type="hidden" id="login_view_action" name="login_view_action" value="" />
<div style="clear:both"></div><br/>
<?php }
}?>
Code: checkout / login_form.php
<?php
/**
* @package HikaShop for Joomla!
* @version 3.2.2
* @author hikashop.com
* @copyright (C) 2010-2018 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
if(JPluginHelper::isEnabled('authentication', 'openid')) {
$lang = &JFactory::getLanguage();
$lang->load( 'plg_authentication_openid', JPATH_ADMINISTRATOR );
$langScript = 'var JLanguage = {};'.
' JLanguage.WHAT_IS_OPENID = \''.JText::_( 'WHAT_IS_OPENID' ).'\';'.
' JLanguage.LOGIN_WITH_OPENID = \''.JText::_( 'LOGIN_WITH_OPENID' ).'\';'.
' JLanguage.NORMAL_LOGIN = \''.JText::_( 'NORMAL_LOGIN' ).'\';'.
' var comlogin = 1;';
$document = &JFactory::getDocument();
$document->addScriptDeclaration( $langScript );
JHTML::_('script', 'openid.js');
}
if(!HIKASHOP_RESPONSIVE) {
?>
<p id="com-form-login-username">
<label for="username"><?php echo JText::_('HIKA_USERNAME') ?></label><br />
<input name="username" id="username" type="text" class="inputbox" alt="username" size="18" />
</p>
<p id="com-form-login-password">
<label for="passwd"><?php echo JText::_('HIKA_PASSWORD') ?></label><br />
<input type="password" id="passwd" name="passwd" class="inputbox" size="18" alt="password" />
</p>
<?php if(JPluginHelper::isEnabled('system', 'remember')) : ?>
<p id="com-form-login-remember">
<label for="remember"><?php echo JText::_('HIKA_REMEMBER_ME') ?></label>
<input type="checkbox" id="remember" name="remember" value="yes" alt="Remember Me" />
</p>
<?php endif; ?>
<?php
echo $this->cart->displayButton(JText::_('HIKA_LOGIN'),'login',@$this->params,'',' hikashopSubmitForm(\'hikashop_checkout_form\', \'login\'); return false;');
$button = $this->config->get('button_style','normal');
if ($button=='css')
echo '<input type="submit" style="position: absolute; left: -9999px; width: 1px; height: 1px;"/></input>';
?>
<?php
if(!HIKASHOP_J16){
$reset = 'index.php?option=com_user&view=reset';
$remind = 'index.php?option=com_user&view=remind';
}else{
$reset = 'index.php?option=com_users&view=reset';
$remind = 'index.php?option=com_users&view=remind';
}
?>
<ul>
<li>
<a href="<?php echo JRoute::_( $reset ); ?>">
<?php echo JText::_('HIKA_FORGOT_YOUR_PASSWORD'); ?></a>
</li>
<li>
<a href="<?php echo JRoute::_( $remind ); ?>">
<?php echo JText::_('HIKA_FORGOT_YOUR_USERNAME'); ?></a>
</li>
</ul>
<?php } else { ?>
<div class="userdata form-inline">
<div id="form-login-username" class="control-group">
<div class="controls">
<div class="input-prepend input-append">
<span class="add-on">
<i class="icon-user tip" title="<?php echo JText::_('HIKA_USERNAME'); ?>"></i>
<label for="modlgn-username" class="element-invisible"><?php echo JText::_('HIKA_USERNAME'); ?></label>
</span>
<input id="modlgn-username" type="text" name="username" class="input-small" tabindex="1" size="18" placeholder="<?php echo JText::_('HIKA_USERNAME'); ?>" />
<a href="<?php echo JRoute::_('index.php?option=com_users&view=remind');?>" class="btn hasTooltip" title="<?php echo JText::_('HIKA_FORGOT_YOUR_USERNAME'); ?>"><i class="icon-question-sign"></i></a>
</div>
</div>
</div>
<div id="form-login-password" class="control-group">
<div class="controls">
<div class="input-prepend input-append">
<span class="add-on">
<i class="icon-lock tip" title="<?php echo JText::_('HIKA_PASSWORD') ?>"></i>
<label for="modlgn-passwd" class="element-invisible"><?php echo JText::_('HIKA_PASSWORD') ?></label>
</span>
<input id="modlgn-passwd" type="password" name="passwd" class="input-small" tabindex="2" size="18" placeholder="<?php echo JText::_('HIKA_PASSWORD') ?>" />
<a href="<?php echo JRoute::_('index.php?option=com_users&view=reset');?>" class="btn hasTooltip" title="<?php echo JText::_('HIKA_FORGOT_YOUR_PASSWORD'); ?>"><i class="icon-question-sign"></i></a>
</div>
</div>
</div>
<?php if(JPluginHelper::isEnabled('system', 'remember')) { ?>
<div id="form-login-remember" class="control-group checkbox">
<label for="modlgn-remember" class="control-label"><?php echo JText::_('HIKA_REMEMBER_ME') ?></label>
<input id="modlgn-remember" type="checkbox" name="remember" value="yes"/>
</div>
<?php } ?>
<div id="form-login-submit" class="control-group">
<div class="controls">
<?php echo $this->cart->displayButton(JText::_('HIKA_LOGIN'), 'login', @$this->params, '',' var b = document.getElementById(\'login_view_action\'); if(b) { b.value = \'login\'; } document.hikashop_checkout_form.submit(); return false;','', 0, 1, 'btn btn-primary'); ?>
</div>
</div>
</div>
<?php } ?>
après avoir rempli le questionnaire la page est rafraîchie mais sans avoir enregistré un nouveau client.