Page 4 of 8
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Wed Oct 12, 2011 11:13 pm
by newpt
Hi,
Thanks for the quick reply.
I wanted to create for now a field called "nick" (Nickname), so I created in the database
Code: Select all
ALTER TABLE `customer` ADD `nick` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ;
I also did the same for the 'cedu'.
After that I edited the New_Field_Registration_Form_1.1.xml and add:
Code: Select all
<!--###CATALOG=>VIEW FILES###-->
<!--standar register-->
<file name="catalog/view/theme/default/template/account/register.tpl">
<operation><search position="before"><![CDATA[
<td><span class="required">*</span> <?php echo $entry_firstname; ?></td>
]]></search><add><![CDATA[
<tr>
<td><span class="required">*</span> <?php echo $entry_cedu; ?></td>
<td><input type="text" name="cedu" value="<?php echo $cedu; ?>" />
<?php if ($error_cedu) { ?>
<span class="error"><?php echo $error_cedu; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_nick; ?></td>
<td><input type="text" name="nick" value="<?php echo $nick; ?>" />
<?php if ($error_nick) { ?>
<span class="error"><?php echo $error_nick; ?></span>
<?php } ?></td>
</tr>
]]></add></operation></file>
and the result was this:
Probably I am missing some code, correct?
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Thu Oct 13, 2011 12:37 am
by marvmen21
Hi, if you just wanted to add that field, the only thing you had to do was to add cedu to the database, and then just change the name from cedula to nickname in the language parts. That would add the field just before
name, if you want a different possition change the code here
For example, this would add the field before fax
Code: Select all
<file name="catalog/view/theme/default/template/account/register.tpl">
<operation><search position="before"><![CDATA[
[b]<td><?php echo $entry_fax; ?[/b]></td>
]]></search><add>
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Thu Oct 13, 2011 5:49 pm
by newpt
Hi,
me again
I successfully changed the name in the language parts, but I can't insert special chars like 'não' .
Thanks
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Fri Oct 14, 2011 7:55 am
by worldzfree
hello i created the database entry using the sql statement (i had to change the statement because my customer database is called "occustomer" instead of "customer"). i then did a find/replace in the xml to update the field to the name i want to use ("category") and uploaded it. when i go to test out registration the field is displayed in the registration field as "entry_category" instead of "category." when i enter the data and try to hit submit it doesn't accept whatever i put in the "entry_category" field. is this related to me using custom database prefixes?
-thanks
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Fri Oct 14, 2011 9:27 am
by marvmen21
Yep, you should check in the parts where the xml is modifying model files and update them with your custom table name. And check the language parts, too. Remember that if you're using another language then you need to change the paths.
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Fri Oct 14, 2011 9:29 am
by marvmen21
newpt wrote:Hi,
me again
I successfully changed the name in the language parts, but I can't insert special chars like 'não' .
Thanks
Why can't you? What happens when you try? I have no problem adding accent marks (tildes) to my language files, and they show ok in the frontpage.
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Fri Oct 14, 2011 3:00 pm
by robbiecs
Hello,
this extension is able for the version 1.4.9.1??
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Fri Oct 14, 2011 8:29 pm
by marvmen21
robbiecs wrote:Hello,
this extension is able for the version 1.4.9.1??
The first version was for 1.4.x, or you could check ckonig version. However, you will have to check through the xml to make sure it's working. Test it, and then check both your vqmod logs and your site logs to see if you are getting any error.
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Fri Oct 14, 2011 9:34 pm
by newpt
marvmen21 wrote:newpt wrote:Hi,
me again
I successfully changed the name in the language parts, but I can't insert special chars like 'não' .
Thanks
Why can't you? What happens when you try? I have no problem adding accent marks (tildes) to my language files, and they show ok in the frontpage.
When I insert the accent marks and then test, the field doesn't show up on the frontend.
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Sat Oct 15, 2011 3:04 am
by worldzfree
marvmen21 wrote:Yep, you should check in the parts where the xml is modifying model files and update them with your custom table name. And check the language parts, too. Remember that if you're using another language then you need to change the paths.
i actually tried on a new clean install of opencart and created the "cedu" entry and uploaded your xml unaltered and still see "entry_cedu" on the registration page. what else needs to be modified? i followed all of your instructions. btw, i am using the 1.0.4. file from the first post. there are three to choose from but i "think" that is the latest.
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Sat Oct 15, 2011 5:10 am
by marvmen21
worldzfree wrote:marvmen21 wrote:Yep, you should check in the parts where the xml is modifying model files and update them with your custom table name. And check the language parts, too. Remember that if you're using another language then you need to change the paths.
i actually tried on a new clean install of opencart and created the "cedu" entry and uploaded your xml unaltered and still see "entry_cedu" on the registration page. what else needs to be modified? i followed all of your instructions. btw, i am using the 1.0.4. file from the first post. there are three to choose from but i "think" that is the latest.
My store default language is spanish, so I guess I forgot to change that back to english.
Look for any reference to spanish and change them to english. For example,
Code: Select all
<file name="catalog/language/spanish/account/register.php">
And the last version is attached some posts above. I couldn't attach another file to the first post cuz the limit is three. The last version adds the field to the affiliate registration, edit, and to the affiliate info page in the backend.
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Mon Oct 17, 2011 8:43 pm
by robbiecs
marvmen21 wrote:robbiecs wrote:Hello,
this extension is able for the version 1.4.9.1??
The first version was for 1.4.x, or you could check ckonig version. However, you will have to check through the xml to make sure it's working. Test it, and then check both your vqmod logs and your site logs to see if you are getting any error.
HI marvmen21
I have tra with this "new_field_to_registration_form.xml" but it make errore on my vesion... can you help me?
thanks
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Tue Nov 08, 2011 12:53 am
by mr-bm
This is great! I have been looking for something like this.
I am having trouble getting the "cedu" field to show up on any of the forms. I created cedu in the database and uploaded the vqMod file for OC 1.5.x to the xml folder (using vqmod version 2.0) but nothing shows up.
Am I missing something?
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Tue Nov 08, 2011 3:28 am
by marvmen21
did you download the latest version? 1.1
http://forum.opencart.com/download/file.php?id=7642
Are you using the default template? Default language? If not, check the paths to the template and language files are correct.
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Thu Nov 10, 2011 5:02 am
by mr-bm
Hi marvmen,
I managed to get it to work and it great!
I want to add the new field to the printable order invoice in the admin. Is there a way to do that?
-Mike
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Thu Nov 10, 2011 10:12 am
by marvmen21
Yeah, sure it's possible. You would have to edit the appropriate files, you could use any of the others fields as an example, and then duplicate the code to add yours.
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Mon Nov 14, 2011 10:59 pm
by knotty85
This is great marvmen21.
I would also like to add a 'title' field with a drop down with the usual Mr/Mrs/Dr etc.
Any idea on the best way to go about this - using your vqmod as a basis possibly?
Thanks,
Knotty
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Thu Dec 01, 2011 10:08 pm
by i2020vision
Great extension but I'm having trouble moving it from (checkout) register.tpl to shipping.tpl (trying to turn it into a store picker for store pickup). I try to move it before/after "comments" but then the continue button doesn't work after the registration section of the checkout.
Any ideas?
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Sat Dec 03, 2011 9:59 am
by marvmen21
This will continue to be a free vqmod; However, if you need personalized support and want to contribute a little to opencart, please buy it here for just 10 bucks:
http://www.opencart.com/index.php?route ... on_id=4186
Best Regards,
marvmen21
Re: [vQmod] Add new field to Registration Form,Frontend&Back
Posted: Sat Dec 03, 2011 8:18 pm
by Amy078
Hi!
Thank you for this great mod. I want to add an extra field to my registration form but I don't want the field to be required. I managed to remove the validation from the registration page so a customer can register without entering anything into the new field. However if I log in as a Administrator and go to edit a customer, save changes I get a validation error for that new field (it's empty most of the times anyway). I just cant figure it out how to fix it. Could you please give me some directions how to do it? What part of the code needs to be edited to remove the validation of the new field in the admin area (customer edit page)?
Thanks.