Ok, first thing is to get the second email address on the Contact Us page. As the page display is handled in the template we need to edit the template file...
/includes/templates/theme210/templates/tpl_contact_us_default.php
In there, about line 68, you will see the following bit of html...
<label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL; ?></label>
<?php echo zen_draw_input_field('email', ($error ? $_POST['email'] : $email), ' size="40" id="email-address"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
<br class="clearBoth" />
Copy those three lines and paste them just below it so that you get a second copy of the email entry code.
Now it's simply a job of adding '2' to all the field names used, making it look like this...
<!-- CELTIC - 14-APR-2011 - added second email field -->
<label class="inputLabel" for="email-address2"><?php echo ENTRY_EMAIL; ?></label>
<?php echo zen_draw_input_field('email2', ($error ? $_POST['email2'] : $email), ' size="40" id="email-address2"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . 're-enter email</span>'; ?>
<br class="clearBoth" />
<!-- CELTIC - end of second email field -->
In the edited code above, you'll see that I've done a few things:
-
I've put an html comment before and after the bit of code that I've added. This is good practice and makes it easy for you to find it again in future and to know why you made the changes in the first place. Just change 'CELTIC' to something that you will use consistently to mark your changes and you'll always know what to search for in future.
-
I've put the number '2' after all the email field identifiers to ensure zencart doesn't get confused trying to post the email address twice.
-
I added a little bit of ENGLISH text into the quotes just after ENTRY_REQUIRED_SYMBOL to indicate why there are two email fields. This is a rather clumsy solution but it gets the job done. You will of course have to put your own Italian instruction in there. Not a problem at the moment, but if you were to offer your website in more than 1 language, you would have to do this a bit differently.
Save that and test it and you should have a second email box on the page. When you try and submit it (leave the name field empty) you'll see that it remembers what you put into the second email address field. It also confirms that zencart is using your 'override' copy of the file instead of the 'core' one; if the second box doesn't appear it's probably 'cos we have the override file in the wrong place.
That's all that needs doing in that file.