Guest Posted June 3, 2005 Share Posted June 3, 2005 Hi everyone. I'd like to add some text to the contact us page that goes along the lines of: ---- Start Text ---- You can contact us by email ([email protected]) or by telephone at 123-456-7890. You are more than welcome to use the forum below which will also send us an email - if doing so please make sure you supply a valid email address for us to respond to. ---- End Text ---- Now I have a general idea of how to do it. I have to define the text in includes\languages\english\contact_us.php and then actually reference it in root/contact_us.php I'm not sure how to do it. I also only want that text displayed on the first page. If someone decides to use the contact form I don't want the above showing up, just the normal 'Many thanks for your enquiry' line. Any idea how this is done? Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2005 Share Posted June 3, 2005 download your files and edit with a php editor, placing your text in there. i suggest reading the knowledge base prior to doing anything, lots explained in there. Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2005 Share Posted June 3, 2005 OK maybe I should have mentioned that I'm more than accustomed to editing my php files - thats no problem. My problem at the moment is that I don't know how to construct the PHP to reference the new text. IE just like 'Text_sucess' is defined to appear upon completion of the form, I need to instruct 'Text_main' for example. Its just that I'm not a PHP expert in the slightest :/ Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2005 Share Posted June 3, 2005 text_main should also be a definition. use an html editor to layout the paragraph with fonts, colors, etc, making it look exactly as you want. then copy the html and paste in between the '' define('TEXT_MAIN', 'html code goes here'); Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2005 Share Posted June 3, 2005 Absolutely - I've got that far. In includes\languages\english\contact_us.php I've got: define('TEXT_MAIN', 'yada yada yada'); I just need to know what to put in \contact_us.php to get it to appear :) Thanks for your help! :) Link to comment Share on other sites More sharing options...
Wendy James Posted June 3, 2005 Share Posted June 3, 2005 1. You can create a new define and then call it on the page, where ever you want it to show up. 2. Just put the text directly on the contact _us.php Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep. Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2005 Share Posted June 3, 2005 Ok, going with option one, HOW do I call it on the page? Link to comment Share on other sites More sharing options...
Wendy James Posted June 3, 2005 Share Posted June 3, 2005 <?php echo TEXT_INFORMATION; ?> TEXT_INFORMATION being whatever you "named" the text you want to have show up on the contact_us.php file in your languages folder, which going by your previous posts it would be TEXT_MAIN Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep. Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2005 Share Posted June 3, 2005 Ah thats brilliant, thanks wendy :) I'll give that a test now. Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2005 Share Posted June 3, 2005 I'd like to put the text after the page heading (the big gray "Contact Us") but before the beginning of the table with 'Full Name', 'Email Address' etc fields. Any idea where I should put the code in order to do this? I attach my code for reference. Again, many thanks for everyone's help. <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_contact_us.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('contact') > 0) { ?> <tr> <td><?php echo $messageStack->output('contact'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) { ?> <tr> <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . '', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { ?> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_NAME; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('name'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_EMAIL; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('email'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_ENQUIRY; ?></td> </tr> <tr> <td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } ?> </table></form></td> <!-- body_text_eof //--> Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2005 Share Posted June 3, 2005 I've done it! Its in the correct place now. I had to put it just after the reference to the Heading Title and table_background_contact_us.gif. However, to get it to appear in the right font I had to write it like this: <td class="main"><?php echo TEXT_INFORMATION; ?></td> Problem is that it appears as "TEXT_INFORMATION" on the page! :blush: Obviously, the remedy is not to reference the other contact_us.php file in languages but to just type out the text in this file - just thought it was interesting! I can get the text to appear as it should (but in the wrong style/font) with I type it without <td class="main"> etc. Link to comment Share on other sites More sharing options...
Wendy James Posted June 3, 2005 Share Posted June 3, 2005 You know, if it would make it easier for you, there are a couple of contributions that allow you to edit and add pages via the admin area. Including the text on the front page, contact us, shipping and so on. They also work with the WYSIWYG editers. Might be worth installing one of them if you will be editing or adding pages to your store. I always install one, even if the pages will only be edited or added once. If you are interested just do a search in the contributions area for additional pages. Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep. Link to comment Share on other sites More sharing options...
Guest Posted June 6, 2005 Share Posted June 6, 2005 Thanks wendy, thats useful. I'll give that a look. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.