To add simple text to contact us php page (part of my template)

Dear fellow forum members,

I have paid close to $200 for a template to find out that “by default” I cannot add a simple line of text to an existing contact_us.php which at this point only has an email contact form.

I’ve reached out to template manufacturer and they ask for more money just to modify that little part!

I am sure with a little guidance, I can do this myself, I’ve been working with HTML for years, however, I am only a beginner to PHP.

The page I am concerned about is: http://glamorousjewelers.com/contact_us.php

I would like to add some simple html to the page, above the contact form, but the template company is saying there is no way to do that, which I do not think is true.

Please help me understand where to begin and which modifications to do to the file structure to make my contact_us page have a little more content than a simple contact form.

Any help or assistance would be greatly appreciated.

Thank you all in advance,

Kind Regards,

Aleksey
www.glamorousjewelers.com
[email protected]

Can you post the code to the “contact_us.php” and tell us what you want the HTML to say.

You are very kind, Topcoder.
I truly appreciate your assistance.
Any input on this matter would help me tremendously.

I would like to simply add a sentence: We are located at 236 Mamaroneck Ave, Mamaroneck, New York 10543. We are open daily 10AM - 6PM. Our office phone is (914) 630-7660.

[php]<?php
/*
$Id$

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright © 2010 osCommerce

Released under the GNU General Public License
*/

require(‘includes/application_top.php’);

require(DIR_WS_LANGUAGES . $language . ‘/’ . FILENAME_CONTACT_US);
$current_page = FILENAME_CONTACT_US;

if (isset($HTTP_GET_VARS[‘action’]) && ($HTTP_GET_VARS[‘action’] == ‘send’) && isset($HTTP_POST_VARS[‘formid’]) && ($HTTP_POST_VARS[‘formid’] == $sessiontoken)) {
$error = false;

$name = tep_db_prepare_input($HTTP_POST_VARS['name']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

if (!tep_validate_email($email_address)) {
  $error = true;

  $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
}

$actionRecorder = new actionRecorder('ar_contact_us', (tep_session_is_registered('customer_id') ? $customer_id : null), $name);
if (!$actionRecorder->canPerform()) {
  $error = true;

  $actionRecorder->record(false);

  $messageStack->add('contact', sprintf(ERROR_ACTION_RECORDER, (defined('MODULE_ACTION_RECORDER_CONTACT_US_EMAIL_MINUTES') ? (int)MODULE_ACTION_RECORDER_CONTACT_US_EMAIL_MINUTES : 15)));
}

if ($error == false) {
  tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);

  $actionRecorder->record();

  tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));
}

}

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US));

require(DIR_WS_INCLUDES . ‘template_top.php’);
?>

<?php echo tep_draw_content_top();?> <?php echo tep_draw_title_top();?>

<?php echo HEADING_TITLE; ?>

<?php echo tep_draw_title_bottom();?> <?php if ($messageStack->size('contact') > 0) { echo $messageStack->output('contact'); } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) { ?>
<?php echo TEXT_SUCCESS; ?>
  <div class="buttonSet">
    <span class="fl_right"><?php echo tep_draw_button_top()?><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?><?php echo tep_draw_button_bottom()?></span>
  </div>
<?php } else { ?> <?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send'), 'post', '', true); ?>
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="fieldKey"><div class="crosspiece95"></div><?php echo ENTRY_NAME; ?></td>
            <td class="fieldValue" width="100%"><?php echo tep_draw_input_field('name', '', 'class="input"'); ?></td>
          </tr>
          <tr>
            <td class="fieldKey"><?php echo ENTRY_EMAIL; ?></td>
            <td class="fieldValue"><?php echo tep_draw_input_field('email', '', 'class="input"'); ?></td>
          </tr>
          <tr>
            <td class="fieldKey" valign="top"><?php echo ENTRY_ENQUIRY; ?></td>
            <td class="fieldValue"><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>
          </tr>
          
        </table>

  <div class="buttonSet">
    <span class="fl_right"><?php echo tep_draw_button_top()?><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?><?php echo tep_draw_button_bottom()?></span>
  </div>
<?php } ?> <?php echo tep_draw_content_bottom();?> <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

[/php]

I have two contact_us.php files that are part of the template. One located in root (public_html) the other in /languages/ folder.
I believe I have to do a “define(‘TEXT_INFORMATION’, ‘PUT YOUR INFORMATION HERE.’);” in contact_us.php in languages folder, and call for that text information from contact_us.php in the root folder.

However I am struggling to come up with the call script. No matter what I tried, I could not pull up the information I defined in the file in languages folder.

Any assistance would be a tremendous help.

Just in case, here is the PHP to contact_us.php located in /languages folder, where the defines are:

[php]<?php
/*
$Id$

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright © 2002 osCommerce

Released under the GNU General Public License
*/

define(‘HEADING_TITLE’, ‘Contact Us’);
define(‘NAVBAR_TITLE’, ‘Contact Us’);
define(‘TEXT_SUCCESS’, ‘Your enquiry has been successfully sent to the Store Owner.’);
define(‘EMAIL_SUBJECT’, 'Enquiry from ’ . STORE_NAME);

define(‘ENTRY_NAME’, ‘Full Name:’);
define(‘ENTRY_EMAIL’, ‘E-Mail Address:’);
define(‘ENTRY_ENQUIRY’, ‘Enquiry:’);

define(‘ERROR_ACTION_RECORDER’, ‘Error: An enquiry has already been sent. Please try again in %s minutes.’);
?>[/php]

;Db ump

[member=72947]lyoooha[/member]

Sorry for the late reply. Sometimes, I forget!

Anyway…

Under:

[php]


[/php]

Add:

[php]

[/php]

If you want to move it around, color it, or change the font size, etc we can do that…

We are located at 236 Mamaroneck Ave, Mamaroneck, New York 10543. We are open daily 10AM - 6PM. Our office phone is (914) 630-7660.

Topcoder Thank you very much for your help.
With your assistance I was able to add the needed text to my contact page.
Once again, your help is really appreciated.
You are the best.

Take care and see you in the community@@@!!!

Sponsor our Newsletter | Privacy Policy | Terms of Service