Post by Heilong » Wed Nov 05, 2008 5:46 pm

Hi everyone,

I'd like to know how to add mandatory fields when the customer register under opencart. I need to add some required informations when the user register, and also on the company name field already existed, to make this field mandatory.

Thanks,

New member

Posts

Joined
Mon Sep 01, 2008 5:57 pm

Post by Qphoria » Wed Nov 05, 2008 9:50 pm

1. add new field to database under the table you want data stored
2. edit the catalog/controller/account_create.php and add the new field. copy an existing one like first name to get the syntax. first name is also required so clone all places you find first name references, including the error handler validation() function
3. edit catalog/template/default/content/account_create.tpl and add the same new field reference that you added in controller.
4. edit catalog/language/english/controller/account_create.php and add the new field name there. once again clone the first name field for the base syntax.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Heilong » Tue Nov 11, 2008 10:00 am

Thanks for these informations.

Actually, I found this topichttp://forum.opencart.com/index.php/topic,516.0.html helps me to begin.

Now I need to know how to add a field for address in the contact form, on that form datas are sent directly by email.

Thanks,

New member

Posts

Joined
Mon Sep 01, 2008 5:57 pm
Who is online

Users browsing this forum: No registered users and 2 guests