LostInPHP Posted June 2, 2003 Posted June 2, 2003 I'm trying to convert my contact page into a About Us / Contact page by adding a little bit of text above the contact form. I added the text and saved the page, but the text isn't showing up. I used define('TEXT_INFORMATION', 'My Text Here'); I get nothing but the comment box... do i need to change something else? Help me I'm lost in PHP and I don't have a map!
Daemonj Posted June 2, 2003 Posted June 2, 2003 I'm trying to convert my contact page into a About Us / Contact page by adding a little bit of text above the contact form. I added the text and saved the page, but the text isn't showing up. I used define('TEXT_INFORMATION', 'My Text Here'); I get nothing but the comment box... do i need to change something else? Hopefully you placed that define statement in the catalog/includes/languages/[language]/contact_us.php file. Then in your catalog/contact_us.php page, you should have a <?php echo TEXT_INFORMATION ?> entry where you want the text to be. "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein
LostInPHP Posted June 2, 2003 Author Posted June 2, 2003 *banging head against keyboard* hehe :) I can't get the text to show up.... I did ecit the text in the languages/contact_us.php, but I'm not sure where to put the <?php echo TEXT_INFORMATION ?> on the other contact_us.php page. Sorry to be a pain :oops: Help me I'm lost in PHP and I don't have a map!
risonav Posted June 2, 2003 Posted June 2, 2003 This is where I put it on my page: <!-- 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 class="main"><?php echo TEXT_INFORMATION; ?></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><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo tep_image(HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td> </tr> <tr> <td align="right"><br><a href="<?php echo tep_href_link(FILENAME_DEFAULT); ?>"><?php echo tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></a></td> </tr> </table></td> </tr> Does that help? -Jen www.airplanecamping.com Jen
Daemonj Posted June 2, 2003 Posted June 2, 2003 If you have not made any modifications to your catalog/contact_us.php page and it is fairly close to mine, the approx line 71 should be: <?php } else { ?> <tr> <td><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><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> if that is the case, and you want your text to appear above the fields then make it like: <?php } else { ?> <tr> <td><?php echo TEXT_INFORMATION; ?></td> </tr> <tr> <td><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><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> and that should do what you want. "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein
Daemonj Posted June 2, 2003 Posted June 2, 2003 What you have looks like it should work. Is your text not appearing or an error message or what? "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein
Guest Posted June 2, 2003 Posted June 2, 2003 I am a newbie, so take this lightly, but I think I understand what your trying to do, and I did this to my cart, I changed the name of the link to Email us, and I installed the wrapper contribution, which allows you to make your own page that is "wrapped" with the os commerce cart, so it looks the same as the rest of your cart pages. I called mine new page Contact_Info.php by just modifying I think my shipping_php, and renaming it. I had to define the name and change some lines in the info box for it to show up. I think this would be a great contribution, I have seen lots of post about this, and I would make a contibution of what and how I made mine work, but I am a newbie, and dont want to spead dis info.... Doug come to my page to see what I have done with my contact info page. http://www.prospectorstore.com
LostInPHP Posted June 3, 2003 Author Posted June 3, 2003 Sorry it took me so long to get back to you... I had a whole neighborhood of kids stop here after school and I wasn't able to get this fixed until this morning. Gotta love having the biggest yard in the neighborhood :) I'm all set... now I have to edit the text down a bit... I've got a full novel in there and it just looks too big, but the text is there and working fine... line 71 was what I was looking for! Thanks Terri Help me I'm lost in PHP and I don't have a map!
Daemonj Posted June 3, 2003 Posted June 3, 2003 Sorry it took me so long to get back to you... I had a whole neighborhood of kids stop here after school and I wasn't able to get this fixed until this morning. Gotta love having the biggest yard in the neighborhood :) Enjoy it while you can. Our yard was definitely not the biggest but for some reason all of my friends were always at my house. It got to the point where my mom had my dad make a small pantry cabinet to store the snacks and drinks for just us kids. :lol: We even had cups with our names on them because we would set them down and forget which cup was ours. Naturally we would go get another cup and there would be 26 cups in the sink at the end of the day. :lol: I'm all set... now I have to edit the text down a bit... I've got a full novel in there and it just looks too big, but the text is there and working fine... line 71 was what I was looking for!Thanks Terri Glad to have been able to help. :) "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein
Recommended Posts
Archived
This topic is now archived and is closed to further replies.