Skip to main content

Pressing enter on checkout login, results in error

More
12 years 4 months ago - 12 years 4 months ago #157246 by iwally
UPDATE: This only happens when I have the bootstrap design enabled.
Use bootstrap design: Yes. When I turn it off, it works fine.
However I want to use the bootstrap design?

Attatched info:

Checkout configuration: +
beta.iwally.nl/index.php?option=com_hika...t=listing&Itemid=240

Hi during the checkout, the customer can choose to either login or create an account.



That looks fine, however when they type in their username and password and press / hit enter on their keyboard.

It tells them: Please fill in an e-mailaddress,


This will confuse people who are used to hitting enter, and they might give up?
Can somebody please tell me how to fix this?

I tried changing the login layout to switcher, but the same problem presist?

Another problem I am facing with this layout, is that when people try to create an account, and click Register, (registeren)
it will refresh the page, and not create the account? However when I press enter / hit enter, it will work? What is going on? :)

I have my configration settings like this:

Unable to register this way, unless if user hits enter / presses enter after completing fields.


This way they are unable to continue the checkout process... When I change the settings in Hikashop to Switcher during checkout.
like this,

Able to register, however not able to login with hitting enter, / pressing enter. when loginbox is highlighted (selected)


it does work! :/ However then they have to switch. Can I fix this?
Last edit: 12 years 4 months ago by iwally.

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #157348 by Xavier
Hi,

You don't mentioned your HikaShop version as asked in the textarea before posting a message.
Thanks to give us this information. If it's not 2.3.1, thanks to download this version from our website and install it over your current version.

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #157388 by iwally
Hi Xavier, I am on version 2.3.1. prntscr.com/3mp1cm

You have the latest stable version of HikaShop Business: 2.3.1

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #157631 by iwally
Hi! I showed this to someone on IRC, and they told me that this has to do with the fact that you guys have put both the ristration as the login form in the same <form> tag. Therefor making this happen.

One form has a required email address field, and the other one does not. This causing the enter button unable to login when filling in username and password.

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #157762 by Eliot
Hi there,

I just checked on our end, on a demo website and it works fine. It's also normal that the two registration are in the same form, we do our check relatively to the fields completed.
Could you give us an access to the page so we can test it directly?
Also, could you try to install a clean version of Hikashop and tell us if you still have the issue?
Maybe you edited a view or some code which is causing the issue.

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago - 12 years 4 months ago #157840 by iwally
Hi Eliot,

I see that it works on the demo page yes,
- I've not modified any core files from the com_hikashop directory or what so ever, all I use are template overrides, from my template.
- I tried disabling the override, and it still resulted in that error.

Quick update, the login form works, just if you forget to fill in an username, it gives a wrong error in dutch. It says fill in e-mail!

All that doesn't work is the registration itself, that just refreshes after you fill everything in:

Access to the page:
beta.iwally.nl/index.php?option=com_hika...computers&Itemid=273

Go there, add that to cart (Plaats in winkelwagen), accept terms (Accepteer de voorwaarden voordat we verder gaan)
, click next (volgende)

Then u get here
beta.iwally.nl/index.php?option=com_hika...ep&step=1&Itemid=273

If you select the box, username and password and don't fill in a username, it tells you to fill in an emailaddress. (it does this on the demo page too btw, its a confusing error for people)


The file I changed in the template overrides, looks like this:

login_form.php
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.3.1 * @author hikashop.com * @copyright (C) 2010-2014 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\'); 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 } else { ?> <div class="userdata form-inline" style="float:left;"> <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">&nbsp;<?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, '',' document.hikashop_checkout_form.submit(); return false;','', 0, 1, 'btn btn-primary loginbox'); ?> </div> </div> </div> <?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'; } ?> <div class="userdata form-inline" style="float:left;"> <ul> <li> <a href="<?php echo JRoute::_( $remind ); ?>"> <?php echo JText::_('HIKA_FORGOT_YOUR_USERNAME'); ?></a> </li> </br> <li> <a href="<?php echo JRoute::_( $reset ); ?>"> <?php echo JText::_('HIKA_FORGOT_YOUR_PASSWORD'); ?></a> </li> </ul> </div> <?php } ?>

The original file:
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.3.1 * @author hikashop.com * @copyright (C) 2010-2014 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\'); 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, '',' document.hikashop_checkout_form.submit(); return false;','', 0, 1, 'btn btn-primary'); ?> </div> </div> </div> <?php } ?>
Last edit: 12 years 4 months ago by iwally.

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #158325 by iwally
Hi I'm still having issues, and I've not had any help for 3 days, I would like to have some assistance in case I really need to reinstall Hikashop to replicate this issue? Can somebody perhaps login and look for me?

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #159753 by iwally
I've still not been able to fix this, can somebody please assist?

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #159941 by villykou
I have the same problem with Enter instead of Login button (post #159860)
This post gave a hint so I have temporarily solved the problem showing a message with instructions.
I hope that there will be solution
I use hika 2.3.1 and Joomla 2.5.20

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #159960 by nicolas
Hi,

Add the code:
Code:
document.onkeypress = function hikashopKeyPressed(e){ var keyCode = (window.event) ? e.which : e.keyCode; if (keyCode == 13) { if (e.srcElement) elem = e.srcElement; else if (e.target) elem = e.target; if( elem.name == "username" || elem.name == "passwd" ){ var button = document.getElementById(\'login_view_action\'), currentForm = document.forms[\'hikashop_checkout_form\']; if(currentForm && button){ hikashopSubmitFormLog(\'hikashop_checkout_form\',button,currentForm); if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } }else{ // call hikashopSubmitFormRegister if the name of the field starts with data[register] or data[address] } } }
before the line:
Code:
function hikashopSubmitFormLog(form,button,currentForm)
in the file components/com_hikashop/views/user/view.html.php and that should avoid the email error message when trying to validate the empty login form (which should not be something users normally do anyway).

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #160092 by iwally
Dear nicolas, I've tried this, the error remains, when you don't type in an username. or password it still says, please fill in an username or password when you hit enter on the login part, even when you fill in an username and password, you really have to press login to make it work. Which is confusing.

Second and the most crucial problem is that, people are unable to register. Making it unable to checkout at all.

On the right, when you fill everything in correctly, the page just refreshes. As i explained in this thread.

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #160104 by nicolas
Reading your messages, I thought that the problem with the registration was solved actually which is why I didn't answer on that.
I checked your registration form issue and found your problem. You need to add that patch and it will work:
www.hikashop.com/forum/checkout/868353-u...checkout.html#156651

Regarding the login form not working when pressing the enter key, I checked your website but I don't see the code that I told you to add so it's normal that it still doesn't work. Please double check that you did the modification I told you in the correct file of the correct website.

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #160154 by iwally
Hi! Np! I added the patch and now it works fine, the error message is more clear, ;) However I have a request, when the error message comes up that the password field may not be empty, it does this in a a Joomla message way, can you make this in a popup window, like you do with the e-mailaddress?

For the rest, registration works now! Just amazing! Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #160156 by Jerome
Hi,

The login is managed by Joomla itself, that's why the message is in the Joomla message way ; it is Joomla which made it.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #160188 by iwally
Okay np! Thanks anyway, just 1 question.

If i update Hikashop later, does the javascript error, and the error message return? because i have edited the core files? Or will these changes get patched in the new update? Thanks

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #160280 by nicolas
Next version of HikaShop will include these modifications of course, so you won't have to add them again.

Please Log in or Create an account to join the conversation.

Time to create page: 0.468 seconds
Powered by Kunena Forum