VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Virtuemart 1.1 Development (Archiv) => Quality & Testing VirtueMart 1.1.x => Topic started by: ultracandido on November 18, 2010, 17:41:15 PM

Title: Required fields in registration form
Post by: ultracandido on November 18, 2010, 17:41:15 PM
Description:
When one of the following fields is the former of the registration form, the JS validator shows an alert telling us that some of the required fields are not filled in, even if registration type is optional:
fields are:
* username
* email
* password
* password2


VirtueMart Version:
1.1.5

Joomla/Mambo Version:
Joomla 1.5.20

Steps to replicate:
In the administrator, go to "Manage user field" and modify the order of the fields and put the password field at the top of the list.
In the frontend, place an order, check it out, and in the registration form set the "register and account" checkbox unchecked. Fields usename, password and retype password should now disappear. Fill in all the required fields and submit the form. You will get the error.

Proposed fix(es):
There is weird compositon of the $field_list variable (line 641 administrator/components/com_virtuemart/classes/ps_userfield.php) using the implode function so on the next few lines the str_replace function fail to replace the string 'password' (with the starting ') because it isn't in the string.


Bugtracker task #:


System info:
UBUNTU 9.10 LAMP server

cheers
Title: Re: Required fields in registration form
Post by: zanardi on November 18, 2010, 21:16:44 PM
Thank you for the info, if anyone else can confirm this behaviour i will surely insert it in the list of bugs for VM 1.1.7 (VM 1.1.6 is so close to release that it's impossible to ad new fixes).
Title: Re: Required fields in registration form
Post by: ultracandido on November 19, 2010, 12:32:21 PM
The patch is really simple, i can post it if you trust me...   :P
Title: Re: Required fields in registration form
Post by: zanardi on November 19, 2010, 14:36:22 PM
Ok, send the patch here on the forum and i will open a tracker item with it.
Title: Re: Required fields in registration form
Post by: LarsLB on December 30, 2010, 21:13:17 PM
would love the patch ..
I experience the same thing ..

I hate a digital store ..
really only need people to fill in their email address ..
but even when Register Account is unchecked, the form returns as not completed

lb.