Hi everyone,
Joomla! 3.9.18
VirtueMart 3.8.0 10319.
I need to register users by entering first_name, mail, password and password confirmation as mandatory data.
I use "System - VP One Page Checkout", with this plugin new users regularly register with first_name, email, password and password confirmation, but when they register using the joomla / virtuemart form, it gives me an error as it lacks the "name".
In addition, I cannot enter the acceptance of the Privacy, in the joomla / virtuemart registration form.
I hope I was clear.
How can I solve ??? Thanks in advance for the help
Talk directly to the VP planet plugin developers, I believe they have a query ticket system
This is not the support forum for their paid products
Hello, I apologize, I have been unclear in explaining my problem.
For the needs of my shop I need to register the user by entering only first_name, email, password. How can I proceed to avoid errors and proceed with registration without entering the name and username.
I thank you in advance for your help
This is a question for Joomla.. the Joomla registration form has nothing to do with VM..
first_name has nothing to do with Joomla's Username - there are plugins available to use email as username in the Joomla registration -- Richey Web do one
https://extensions.joomla.org/extension/authentication-email/
You can copy name using javascript and hide the fields
Or simply use email + password and copy email in all fields excluded password.
GJC Web Design, Studio 42
thanks for your contribution, both solutions I had already examined, I wanted to continue on the second by copying the email entered by the user on all the necessary fields. But I got lost.
Could you help me write the code ??
You nedd to hide using CSS rules and add a javascript to copy on change from email field to other fields.
I have see the code in the forum for some months.
Guys I think I did, tell me how it seems to you as a solution:
I edited a few lines of the following php file .../components/com_virtuemart/views/user/tmpl/edit_address_userfields.php
To make the "name" field disappear I replaced from line 103 to 112
ORIGINAL CODE
<tr title="<?php echo strip_tags($descr) ?>">
<td class="key" >
<label class="<?php echo $field['name'] ?>" for="<?php echo $field['name'] ?>_field">
<?php echo $field['title'] . ($field['required'] ? ' <span class="asterisk">*</span>' : '') ?>
</label>
</td>
<td>
<?php echo $field['formcode'] ?>
</td>
</tr>
NEW CODE
<tr title="<?php echo strip_tags($descr) ?>" <?php if ($field['name']=="name") {echo 'style=display:none;';};?> >
<td class="key" >
<label class="<?php echo $field['name'] ?>" for="<?php echo $field['name'] ?>_field">
<?php echo $field['title'] . ($field['required'] ? ' *' : '') ?>
</label>
</td>
<td>
<?php echo $field['formcode'] ?>
</td>
</tr>
At the end I inserted (line 127) a JS that allows me to derive the "name" field from the field that the user compiles "first_name"
<script type="text/javascript">
var $j = jQuery.noConflict(); //avoid conflict with other libraries
$j('#first_name_field').change(function () {
var reg_user = $j('#first_name_field').val(); //set first_name value inside variable
$j('#name_field').val(reg_user); //assign variable value to name
});
</script>
To work I have enabled, from the Virtuemart user fields, the "name" field
...I forgot !!! Compared to my initial needs, now I have entered the username visible and mandatory, as it facilitates user management in other parts of the site
How do you think the solution adopted?
It's easier to add an ID to the main container :
<tr title="<?php echo strip_tags($descr) ?>" id="<?php echo $field['name'] ?>_container">
Then add in the CSS file
#name_container,#XXX_container{
display:none;
}
XXX is another container to hide for eg.