Guest Posted June 22, 2004 Posted June 22, 2004 is there an easy way to insert another? i want the page to keep the same layout as it has now (standard osc setup). i wish to add a link to this page under contact us. how do i add a page and how do i add another link to the box that dispalys contact us etc etc thanks for you r help
Altec Posted June 22, 2004 Posted June 22, 2004 First of all open /catalog/includes/languages/english.php look for section called:- // information box text in includes/boxes/information.php add this to it replacing TEXTHERE and text here with what you want:- define('BOX_INFORMATION_TEXTHERE', 'text here'); Second open file /catalog/includes/boxes/information.php look for the following section:- $info_box_contents[] = array('text' => '<img src="images/pointer_blue.gif"><a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<img src="images/pointer_blue.gif"><a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<img src="images/pointer_blue.gif"><a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<img src="images/pointer_blue.gif"><a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); replace with the following code but change the words TEXTHERE with what you changed to in the english.php file. Keep same case as examples:- $info_box_contents[] = array('text' => '<img src="images/pointer_blue.gif"><a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<img src="images/pointer_blue.gif"><a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<img src="images/pointer_blue.gif"><a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<img src="images/pointer_blue.gif"><a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' . '<img src="images/pointer_blue.gif"><a href="' . tep_href_link(FILENAME_TEXTHERE) . '">' . BOX_INFORMATION_TEXTHERE . '</a>'); Third and final open up /catalog/contact_us.php and save as the name you used to replace TEXTHERE example texthere.php to create the other file then edit the contents of this file in the table areas, be careful not to lose any required information, if you have something like dreamweaver you will find this easy to replace info section. Good luck this will do as you need Its not a computer its a life management system!
oz16oz2 Posted August 9, 2004 Posted August 9, 2004 I've followed these instructions, but the links only point to /FILENAME_TEXTHERE and not to the actual URL. Is there something missing from these instructions? I've gone over it three times, and I don't think I've missed anything. Anyone know? OZ
Altec Posted August 9, 2004 Posted August 9, 2004 did you want this to point to another site or a new page in your site? as this is for setting up a new page in your site, as long as you have the new file in the same location as the contact us page and all the info points to that it will work, have tried this myself and it works fine. File location is important as oscommerce works from global configurations. Hope this helps Its not a computer its a life management system!
oz16oz2 Posted August 9, 2004 Posted August 9, 2004 It's a new page on my site. Exactly as your instructions say. The only difference is that I've used the "privacy.php" page as my template, because my "contact_us.php" has been modified with a contribution. Also, the new pages are added 2nd and 3rd, rather than at the end: from includes/languages/english.php:define('BOX_HEADING_INFORMATION', 'Information'); define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns'); define('BOX_INFORMATION_FRAUD', 'Fraud Prevention'); define('BOX_INFORMATION_SECURITY', 'Security Information'); define('BOX_INFORMATION_PRIVACY', 'Privacy Notice'); define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use'); define('BOX_INFORMATION_CONTACT', 'Contact Us'); from includes/boxes/information.php: $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_FRAUD) . '">' . BOX_INFORMATION_FRAUD . '</a><br>' . '<a href="' . tep_href_link(FILENAME_SECURITY) . '">' . BOX_INFORMATION_SECURITY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<b><a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a></b>'); and in the default directory (which would otherwise be /catalog): fraud.php security.php (by saving the privacy.php file as the two new names) When I go into the store, the items are there in the info box, but the links point to /FILENAME_FRAUD and /FILENAME_SECURITY, so I'm wondering if there's a step missing that tells osC that the variable FILENAME_FRAUD points to fraud.php...? Any thoughts? OZ
oz16oz2 Posted August 9, 2004 Posted August 9, 2004 Oh, the only other thing it could be is that my installation is to the root directory, not to the /catalog directory. But I've still maintained the directory structure, so unless globals have the /catalog references hardwired, I can't see how it could be a problem. OZ
mugitty Posted August 10, 2004 Posted August 10, 2004 I believe that you need to also add the new file names to catalog/filenames.php: define('FILENAME_FRAUD', 'fraud.php'); define('FILENAME_SECURITY', 'security.php'); ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent!
oz16oz2 Posted August 10, 2004 Posted August 10, 2004 That did it. THANKS HEAPS!!! But for future lurkers, the file is actually at: /catalog/includes/filenames.php Cheers. OZ
Guest Posted November 15, 2004 Posted November 15, 2004 When I go into the store, the items are there in the info box,but the links point to /FILENAME_FRAUD and /FILENAME_SECURITY, so I'm wondering if there's a step missing that tells osC that the variable FILENAME_FRAUD points to fraud.php...? I'm having the same problem, i think! Everything is there in the info box and the page is there and I can click on it, it's just the actual name that is the problem, see below:- Information Shipping & Returns Privacy Notice Conditions of Use Contact Us BOX_INFORMATION_LINKS I just want the last line to be, Links I have followed everything in this thread, even the last bit from mugitty. Any ideas?
Altec Posted November 15, 2004 Posted November 15, 2004 I'm having the same problem, i think!Everything is there in the info box and the page is there and I can click on it, it's just the actual name that is the problem, see below:- I just want the last line to be, Links I have followed everything in this thread, even the last bit from mugitty. Any ideas? <{POST_SNAPBACK}> can you post your code it looks like a typo in your definition of that link name Its not a computer its a life management system!
Guest Posted November 16, 2004 Posted November 16, 2004 This is from /includes/filenames.php define('FILENAME_TELL_A_FRIEND', 'tell_a_friend.php'); define('FILENAME_UPCOMING_PRODUCTS', 'upcoming_products.php'); define('FILENAME_LINKS', 'links.php'); ?> This is from /includes/boxes/information.php $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' . '<a href="' . tep_href_link(FILENAME_LINKS) . '">' . BOX_INFORMATION_LINKS . '</a>'); new infoBox($info_box_contents); This from /includes/languages/english.php // information box text in includes/boxes/information.phpdefine('BOX_HEADING_INFORMATION', 'Information'); define('BOX_INFORMATION_PRIVACY', 'Privacy Notice'); define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use'); define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns'); define('BOX_INFORMATION_CONTACT', 'Contact Us'); define('BOX_INFROMATION_LINKS', 'Links');
Altec Posted November 16, 2004 Posted November 16, 2004 english.php this is your problem define('BOX_INFROMATION_LINKS', 'Links'); the word INFORMATION is spelt INFROMATION Its not a computer its a life management system!
Guest Posted November 16, 2004 Posted November 16, 2004 Thanks, that's it sorted. I guess i better stop drinking all this beer while typing at the same time lol
Jack_mcs Posted November 16, 2004 Posted November 16, 2004 For future reference, take a look at the PageMaker app in my signature. It will save you the bother. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Recommended Posts
Archived
This topic is now archived and is closed to further replies.