Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add additional info to newest Contact_us


jswan

Recommended Posts

Hi:

 

I am trying to add other information to the contact_us.php page that is in the English folder. I have tried the two fixes I could find in the contributions area (by Phil and Tom). However, when I installed them, they both returned a page with this:

 

Fatal error: Cannot redeclare _sess_open() (previously declared in /home/virtual1/public_html/test/catalog/includes/functions/sessions.php:18)

in /home/virtual1/public_html/test/catalog/includes/functions/sessions.php

on line 18

 

Is this a result to continuing updates? My snapshot is 20021120, and those were based on snapshots from July and August.

 

Anyway, I've been really please do far. It has taken me a while to get up to speed, but things have worked pretty well. So, is there some way to do this? I have also tried to include a new "define" line for text. That doesn't work either. No errors, just doesn't show up no matter where I put it.

 

Any help would be greatly appreciated.

 

thanks,

 

Jason

Link to comment
Share on other sites

If anyone is interested in this topic, here is how I finally figured it out. Apparently it was a simple enough solution that it didn't get any experienced replies. But, it took me a while. I was looking for some kind of php code, but it is straight forward html.

 

What we need to do is enclose the contents of the table cell that contains the form element within another table cell in a row that contains two cells. In other words, we are going to modify the row that contains the form element so that it contains a table with one row and two cells. The form element can be put in either of the two cells, and your contact info can be put in the other. If this doesn't make sense, look at the code that follows.

 

Open catalog/contact_us.php.

 

Insert a new <td> (table data, or cell) tag in the row (identified by a <tr> tag) that contains the <form> element. Make sure it comes before the <td> tag that contains the form.

 

You now have a new cell in the row, but if you just add your info to the new cell, then the form element won't line up with the page title row above. So, in the new cell, add a <table> tag. Then, modify the code so that the <td> tag that contains the form element is one of the cells in the new table. You can then add another new <td> tag, either before or after the form <td>. Putting it before the form will list your information on the left. After will list the information on the right.

 

Make sure to close the tags properly and in the correct locations. If not, it will mess up the whole layout of the page.

 

Here is the code that I used in the body_text portion of the file. Hope this helps. If anyone needs help understanding what I did, feel free to email me: [email protected].

 

<!-- body_text //-->

   <td width="100%" valign="top"><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 ($HTTP_GET_VARS['action'] == 'success') {

?>

     <tr>

       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">

         <tr>

           <td class="main"><?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 align="right"><br><a href="<?php echo tep_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>"><?php echo tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></a></td>

         </tr>

       </table></td>

     </tr>

<?php

 } else {

?>

     <tr>

<!-- Creates a new table within this row that contains contact info and the form //-->

    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">

   <tr>

     <td class="fancyText" valign="top">

                 <p><b>Do you have questions or comments?</b><br>

                   Use the form to the right to contact us directly, or contact 

                   us by one of the following ways:</p>

                 <ul>

       <li><p><b>By Mail</b><br>

                   VirtuallyUnique.com<br>

                   368 East 900 North<br>

                   Logan, UT 84321</p></li>

                   <li><p><b>By Phone</b><br>

                   (435) 787-8382<br>

                   Fax - (435) 753-7709</p></li>

                   <li><p><b>By Email</b><br>

                   <a href="mailto:[email protected]">[email protected]</a></p></li>

     </ul>	

               </td>

           <td><form action="<?php echo tep_href_link(FILENAME_CONTACT_US, 'action=send', 'NONSSL'); ?>" method="post"><table border="0" width="100%" cellspacing="0" cellpadding="2">

             <tr>

               <td class="main"><?php echo ENTRY_NAME; ?><br><?php echo tep_draw_input_field('name', ($error ? $HTTP_POST_VARS['name'] : $first_name)); ?></td>

             </tr>

             <tr>

               <td class="main"><?php echo ENTRY_EMAIL; ?><br><?php echo tep_draw_input_field('email', ($error ? $HTTP_POST_VARS['email'] : $email_address)); if ($error) echo ENTRY_EMAIL_ADDRESS_CHECK_ERROR; ?></td>

             </tr>

             <tr>

               <td class="main"><?php echo ENTRY_ENQUIRY; ?></td>

             </tr>

             <tr>

               <td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15, $HTTP_POST_VARS['enquiry']); ?></td>

             </tr>

             <tr>

               <td class="main" align="right"><br><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>

             </tr>

             </table></form>

	 </td>

         </tr></table>

 </td>

  </tr>

<?php

 }

?>

   </table></td>

<!-- body_text_eof //-->

Link to comment
Share on other sites

Hi,

 

There is already a php file that allows adding to the Contact Us page via a program such as Dreamweaver. I have used it myself

 

It can be found in the Contribution area somewhere which also has many other additions saving you much work yourself.

 

You might ask here..

 

http://www.oscommerce.com/forums/viewforum.php?f=7

 

or maybe look at http://www.oscdox.com

 

Good luck

Link to comment
Share on other sites

Thanks for the reply, Dave. There are three contributions listed in the Other section that deal with Contact_us.php . For some reason the first two both returned a fatal error when I installed them, even before modifying them, as you can see from my initial post. But I wasn't clever enough to figure out how to fix them since there appeared to be another file involved (sessions.php). The third I didn't try because it generated the info from the database, and listed it above the form, and I didn't want that. Since no one responded to my post, this seemed to be a simpler way (after spending a lot of time trying to find a fix someone else had already done, and trying to contact people who know what they are doing with osCommerce) to make the change since all I needed was static content. Besides, it was a good learning experience, and the html fix that I did is a bit cleaner and doesn't change much from the original contact_us.php file.

 

However, I have used some really cool things that I found in the Contributions section. I suppose it is always good form to check there first.

 

Thanks again.

 

Jason

Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...