Hello Zen Cart community!
I am working with Zen Cart 1.38a on a project that requires 2 contact forms. The one that comes bundled with Zen Cart suffices for the basic contact form, but the other contact form needs to collect more information, specifically, the street address/city/state/zip.
Currently I have it working like so
- I created an EZPage and changed the Internal Link URL to go to index.php?main_page=contact_us&request_catalog
- I modified /includes/templates/CUSTOM/templates/tpl_contact_us_default.php with this code:
PHP Code:<?php
// ask for address information if catalog is requested
if (isset($_GET['request_catalog'])) {
?>
<label class="inputLabel" for="streetaddress"><?php echo ENTRY_STREET_ADDRESS; ?></label>
<?php echo zen_draw_input_field('streetaddress', $streetaddress, ' size="40" id="streetaddress"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
<br class="clearBoth" />
<label class="inputLabel" for="city"><?php echo ENTRY_CITY; ?></label>
<?php echo zen_draw_input_field('city', $city, ' size="40" id="city"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
<br class="clearBoth" />
<label class="inputLabel" for="state"><?php echo ENTRY_STATE; ?></label>
<?php echo zen_draw_input_field('state', $state, ' size="40" id="state"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
<br class="clearBoth" />
<label class="inputLabel" for="postcode"><?php echo ENTRY_POST_CODE; ?></label>
<?php echo zen_draw_input_field('postcode', $postcode, ' size="40" id="postcode"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
<br class="clearBoth" />
<?php
}
?>
I know its a hack, but I couldnt figure out how to add an additional contact form. The 2 forms show up, great, but im still getting the contact_us email template which doesnt include the street address information. Simply modifying the contact us form to always ask for this information will not meet the requirements of this project. If the information doesnt need to be collected, it shouldnt be asked for, so 2 contact forms are needed.
Im looking for any of the following:
- The file that generates the body of the email template so I can add some more "isset, add" hacks
- A way to create a new template for this 2nd contact form and have the system use this new template
- The correct way to do this, because I feel like im hacking it too much
I appreciate any and all assistance anyone can give me!
![]()



