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,
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.
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.
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,
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,
Who is online
Users browsing this forum: No registered users and 2 guests