Problem with registration during checkout

  • Posts: 27
  • Thank you received: 0
10 years 8 months ago #170533

-- url of the page with the problem -- : private
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.1
-- PHP version -- : 5.4.4

Hello,

during checkout I have a problem that users can register without setting a password (this is not intended).

Steps to recreate:

1. add a product to the cart and go to checkout
2. on the page where users can register: register a new user but use an already registered email
3. error message appears: email already registered
4. change the email in the field to a not registered email, leave the password field(s) empty, and click on register
5. Depending on checkout steps configuration there will be different pages displayed now and most of the time with the error message like "registering with an empty password is not allowed". However, the user is registered already without having a password and although the message is displayed at the top of the page the forms for login and registration are not available anymore. The user can proceed by clicking on a button at the bottom (i.e. "buy").

My Joomla registration is set to not require any registration confirmation.

How can this be fixed?

Regards,
Andreas

Last edit: 10 years 8 months ago by innoads.

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

  • Posts: 26242
  • Thank you received: 4036
  • MODERATOR
10 years 8 months ago #170550

Hi,

A registration confirmation is different than creating a account without any password.
Joomla does not allow the creation of an account without password, it's not related to HikaShop, but to Joomla.
So you have to enter a password for your user during the registration.
HikaShop have feature to generate a password for you, but it's a feature in the commercial edition (the "simplified registration").

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 27
  • Thank you received: 0
10 years 8 months ago #170645

Hi Jerome,

thanks for your reply.

Yes, Joomla does usually not allow registering an account without a password. What I tried to describe with the step by step description is that with hikashop it happens and it is not intended. I do not want that users can register without password, but it is possible.

The error message that "registering without a password is not allowed" comes after page reload in the message area and at this time the user is already registered. On you demo shop the error message opens in a popup which blocks the page reload (and registration) I suppose.

How could this be fixed?

Last edit: 10 years 8 months ago by innoads.

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

  • Posts: 83890
  • Thank you received: 13579
  • MODERATOR
10 years 8 months ago #170722

Hi,

The blocking popup happens with some validation javascript when the registration form is submitted.
If you don't get it, it would mean that there is either some kind of javascript error on your website which prevented the initialization of the javascript check for it, or that the view has been customized in a way that the javascript check doesn't find the password field.
We would need to look at the page in order to analyze further the problem.

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

  • Posts: 27
  • Thank you received: 0
10 years 8 months ago #173312

Hi,

I see, so for a solution I must find out if the cause is a javascript error or a customized view that does not allow the javascript check to find the password field.

I have attached the view user>registration_bootstrap in the 1st file. Could you point me to the lines that might cause the issue, please?

I have attached the link to the site in the 2nd file.

Attachments:
Last edit: 10 years 8 months ago by Jerome.

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

  • Posts: 26242
  • Thank you received: 4036
  • MODERATOR
10 years 8 months ago #173344

Hi,

Regarding your code

echo $this->cartClass->displayButton($registerButtonName,'register',$this->params,'',' document.'.$this->form_name.'.submit(); return false;','id="hikashop_register_form_button"', 0, 1, 'btn btn-primary'); //hikashopSubmitForm(\''.$this->form_name.'\');
You have modified the javascript for the button in order to submit the form and not call the "hikashopSubmitForm" function which make the fields checks.
So the form is submitted without any JS check.

Regards,

PS : I removed your second file and place your website link in our ticket system.


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: innoads

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

  • Posts: 27
  • Thank you received: 0
10 years 8 months ago #173605

Hi,

thanks for looking into the code!

The javascript was not modified by me, but probably by the template provider.

Is there a way to add the "hikashopSubmitForm" function back to that code? Maybe as easy as removing the // before the function?

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

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #173680

Hi,

Yes you can remove the "//" in the override of your "user / registration" or "user / registration_bootstrap" view.

The following user(s) said Thank You: innoads

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

  • Posts: 27
  • Thank you received: 0
10 years 7 months ago #173709

Hi,

thanks for the info. When I simply remove those "//" the texteditor shows that the following code is not valid anymore and if I open the checkout page it looks completely different (white background and css stripped).

Is there anything else to consider when removing the "//"?

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

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #173715

Hi,

Thanks to use this code:

echo $this->cartClass->displayButton($registerButtonName,'register',$this->params,'',' hikashopSubmitForm(\''.$this->form_name.'\'); return false;','id="hikashop_register_form_button"', 0, 1, 'btn btn-primary');
Instead of:
echo $this->cartClass->displayButton($registerButtonName,'register',$this->params,'',' document.'.$this->form_name.'.submit(); return false;','id="hikashop_register_form_button"', 0, 1, 'btn btn-primary'); //hikashopSubmitForm(\''.$this->form_name.'\');

The following user(s) said Thank You: innoads

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

  • Posts: 27
  • Thank you received: 0
10 years 7 months ago #173843

Hi,

the code you suggested solved the issue, thanks a lot!

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

Time to create page: 0.093 seconds
Powered by Kunena Forum