Lobster101 Posted May 26, 2010 Posted May 26, 2010 hi there everyone. i need to add my contact details (address, phone number, email, fax) on the "contact us" form bit of my website and i really can't figure out how to. i have searched for this in other threads but can't seem to find anything.. I'm still a bit of a newbie, so some clear instructions would be very much appreciated :) Please help!! Thank you.
♥mdtaylorlrim Posted May 26, 2010 Posted May 26, 2010 hi there everyone. i need to add my contact details (address, phone number, email, fax) on the "contact us" form bit of my website and i really can't figure out how to. i have searched for this in other threads but can't seem to find anything.. I'm still a bit of a newbie, so some clear instructions would be very much appreciated :) Please help!! Thank you. There are two ways. One, to conform to the multi-language conventions of osCommerce, and the other to just edit the /catalog/contact_us.php file to include the information you want. Which do you prefer? Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...?
rayjuan Posted May 26, 2010 Posted May 26, 2010 yes, i would certainly also like to find out how do i exactly add text in the contact us section could you explain on editting the contact_us.php file thanks!
blr044 Posted May 26, 2010 Posted May 26, 2010 yes, i would certainly also like to find out how do i exactly add text in the contact us section could you explain on editting the contact_us.php file thanks! Here are two contribution which might give you an idea. Contact Us Enhancement Ver 1.0 Super Contact us enhancement 1.0
Lobster101 Posted May 27, 2010 Author Posted May 27, 2010 There are two ways. One, to conform to the multi-language conventions of osCommerce, and the other to just edit the /catalog/contact_us.php file to include the information you want. Which do you prefer? I think i'd go with the one where i just edit the /catalog/contact_us.php file and include the information? I've tried this, but it started to go wrong and the page stopped displaying email form so i just left it alone. If you could give me some instructions on how to do it that would be much appreciated. thank you.
NodsDorf Posted May 27, 2010 Posted May 27, 2010 It is fairly easy. If you want something like this? Find this code: in catalog/contact_us.php <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> ABOVE this add: <table align="left" border="0"> <tr> <td>My Shop Name</td> </tr> <tr> <td>401 Street Address</td> </tr> <tr> <td>City, State</td> </tr> <tr> <td>Zip, USA</td> </tr> <tr> <td> </td> </tr> Hope this helps. Don
Lobster101 Posted May 28, 2010 Author Posted May 28, 2010 Hi there, Don. Thanks for your response. I've tried the instructions provided, and for some very strange reason nothing is coming up... the contact us form doesn't look changed in the slightest?! odd. Any suggestions on what to do next? :( Thank you. Janet
Lobster101 Posted May 29, 2010 Author Posted May 29, 2010 Hi there, Don. Thanks for your response. I've tried the instructions provided, and for some very strange reason nothing is coming up... the contact us form doesn't look changed in the slightest?! odd. Any suggestions on what to do next? :( Thank you. Janet anyone...?
satish Posted May 30, 2010 Posted May 30, 2010 anyone...? You need to have some idea of PHP as You are going to modify PHP code. If You do not have then paste code here and You will get some reply. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Lobster101 Posted May 31, 2010 Author Posted May 31, 2010 Can you post your catalog/contact_us.php code? hiya, yes here it is...really hope someone can help... require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { $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)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <table border="0" width="769" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" style="padding-bottom:3px; "> <tr> <td align="center"> <!-- body //--> <table border="0" width="769" cellspacing="0" cellpadding="0"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top" style="padding:0px 4px; "><?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 $info_box_contents = array(); $info_box_contents[] = array('text' => HEADING_TITLE); new infoBoxHeading($info_box_contents, true, true, false);?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '1'); ?></td> </tr> <tr> <td height="430" class="infoBox1" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0" > <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '2'); ?></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 . 'table_background_man_on_board.gif', 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 align="left"><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', 25, 15); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '2'); ?></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></td></tr> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right1.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> </td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
NodsDorf Posted May 31, 2010 Posted May 31, 2010 Hi Janet, Your page looks close to mine, which is where I took my example from. You tried inserting: <table align="left" border="0"> <tr> <td>My Shop Name</td> </tr> <tr> <td>401 Street Address</td> </tr> <tr> <td>City, State</td> </tr> <tr> <td>Zip, USA</td> </tr> <tr> <td> </td> </tr> Here? } else { ?> <!--REPLACE THIS LINE WITH THE CODE --> <tr> <td align="left"><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> Let me know the results.
Lobster101 Posted June 1, 2010 Author Posted June 1, 2010 Hi there, Don. Thanks for your response. Unfortunately that didn't work either!!! :'( i have found another contact_us page in the languages folder... perhaps i need to change something on this one? Here it is.. <?php /* $Id: contact_us.php,v 1.7 2002/11/19 01:48:08 dgw_ Exp $ 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('TEXT_INFORMATION', 'Phone Number, Adress, Fax etc'); ?> </tr>
NodsDorf Posted June 1, 2010 Posted June 1, 2010 Hi there, Don. Thanks for your response. Unfortunately that didn't work either!!! i have found another contact_us page in the languages folder... perhaps i need to change something on this one? Here it is.. <?php /* $Id: contact_us.php,v 1.7 2002/11/19 01:48:08 dgw_ Exp $ 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'); This is the title of the page in my photo the gray letters. define('NAVBAR_TITLE', 'Contact Us'); This would be the name displayed in the breadcrumb. define('TEXT_SUCCESS', 'Your enquiry has been successfully sent to the Store Owner.'); Text sent after form submitted. define('EMAIL_SUBJECT', 'Enquiry from ' . STORE_NAME); This is part of the form define('ENTRY_NAME', 'Full Name:'); This is part of the form define('ENTRY_EMAIL', 'E-Mail Address:'); This is part of the form define('ENTRY_ENQUIRY', 'Enquiry:'); This is part of the form define('TEXT_INFORMATION', 'Phone Number, Adress, Fax etc'); This may help ?> Try changing define('TEXT_INFORMATION', 'Phone Number, Adress, Fax etc'); To define('TEXT_INFORMATION', 'My Web shop <br> 401 Whatever St <br> City, State <br> Zip, USA,<br> Phone number here if desired'); Then Find this code: </tr> <?php } else { ?> <tr> <td align="left"><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> Change to: </tr> <?php } else { ?> <?php echo TEXT_INFORMATION; ?> <tr> <td align="left"><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
Recommended Posts
Archived
This topic is now archived and is closed to further replies.