GsmCorner Posted July 26, 2003 Posted July 26, 2003 hello. just wondered if its easy to add a page to my oscommerce online shop i want a normal page (not for products) :roll: Tom
Rumble Posted July 26, 2003 Posted July 26, 2003 Hi! Yes you can do this i'll run you through it 1) open up catalog/conditions.php 2) save it as another file renaming it (must be unique) under the in the same folder as the conditions.php. In this example we will use newpage.php. 3)Now in newpage.php find all instances of conditions or CONDITIONS and rename them newpage or NEWPAGE respectively. 4) Open up catalog/includes/application_top.php and find the list of file definition and insert the following line. define('FILENAME_NEWPAGE', 'newpage.php'); 5) Open the conditions.php language file located in catalog/includes/languages/english/conditions.php 6) Save this in the same language folder as newpage.php 7) Again change all instances conditions or CONDITIONS and rename them newpage or NEWPAGE respectively. 8) Change the following lines to whatever your new page will need in it define('NAVBAR_TITLE', 'Conditions of Use'); define('HEADING_TITLE', 'Conditions of Use'); define('TEXT_INFORMATION', 'Put here your Conditions of Use information.'); for example define('NAVBAR_TITLE', 'New Page'); define('HEADING_TITLE', 'The New Page'); define('TEXT_INFORMATION', 'This is a new page see whats so new about it.'); 9) The TEXT_INFORMATION bit is the main body of your page! Goodluck and back up before you try!! Reddy to Rumble Thank you osCommerce and all who Contribute to her!
Rumble Posted July 26, 2003 Posted July 26, 2003 Sorry point 6 was a little misleading it should read 6) Save this as newpage.php in the same language folder as conditions.php. Also main page should have a corresponding language file eg catalog/newpage.php and its language file catalog/includes/languages/english/newpage.php Reddy to Rumble Thank you osCommerce and all who Contribute to her!
GsmCorner Posted July 27, 2003 Author Posted July 27, 2003 hello, thanks for the reply... i've done that now but i dont see my page on the Information bit ? what have i done wrong ? :( Tom
Rumble Posted July 27, 2003 Posted July 27, 2003 ok you need to open catalog/includes/boxes/information.php Then change this line '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); to '<a href="' . tep_href_link(FILENAME_NEWPAGE) . '">' . BOX_INFORMATION_NEWPAGE . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); Next in catalog/includes/languages/english.php find define('BOX_INFORMATION_CONTACT', 'Contact Us'); and below that line place this one define('BOX_INFORMATION_NEWPAGE', 'New Page'); And that should do it!! Reddy to Rumble Thank you osCommerce and all who Contribute to her!
GsmCorner Posted July 27, 2003 Author Posted July 27, 2003 ok you need to open catalog/includes/boxes/information.php Then change this line '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); to '<a href="' . tep_href_link(FILENAME_NEWPAGE) . '">' . BOX_INFORMATION_NEWPAGE . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); hello, thanks for the reply. i did that bit but i dont know if i've done it right. do i delete > <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); and then replace it with the second code you gave me ? thats what i did anyway and it didn't seem to work :( Tom
GsmCorner Posted July 27, 2003 Author Posted July 27, 2003 Parse error: parse error, unexpected ')' in /var/www/html/shop/catalog/includes/boxes/information.php on line 30 comes up with that error when i go on the online shop after
Rumble Posted July 27, 2003 Posted July 27, 2003 Hi paste all of your information.php code in here Reddy to Rumble Thank you osCommerce and all who Contribute to her!
GsmCorner Posted July 27, 2003 Author Posted July 27, 2003 <?php /* $Id: information.php,v 1.1.1.1 2002/11/28 23:22:25 wilt Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2001 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_INFORMATION ); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a><br>' . '<a href="' . tep_href_link(FILENAME_GV_REDEEM, '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>');//ICW ORDER TOTAL CREDIT CLASS/GV new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> there you go :)
Rumble Posted July 27, 2003 Posted July 27, 2003 try this <?php /* $Id: information.php,v 1.1.1.1 2002/11/28 23:22:25 wilt Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2001 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_INFORMATION); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a><br>' . '<a href="' . tep_href_link(FILENAME_GV_REDEEM, '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>'); //ICW ORDER TOTAL CREDIT CLASS GV new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> Reddy to Rumble Thank you osCommerce and all who Contribute to her!
GsmCorner Posted July 27, 2003 Author Posted July 27, 2003 hi, do i still need to put this in '<a href="' . tep_href_link(FILENAME_NEWPAGE) . '">' . BOX_INFORMATION_NEWPAGE . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); or do i need to put it in ? Tom
Rumble Posted July 27, 2003 Posted July 27, 2003 I've added it for you here <?php /* $Id: information.php,v 1.1.1.1 2002/11/28 23:22:25 wilt Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2001 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_INFORMATION); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a><br>' . '<a href="' . tep_href_link(FILENAME_NEWPAGE, '', 'NONSSL') . '">' . BOX_INFORMATION_NEWPAGE . '</a><br>' . '<a href="' . tep_href_link(FILENAME_GV_REDEEM, '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>'); //ICW ORDER TOTAL CREDIT CLASS GV new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> Reddy to Rumble Thank you osCommerce and all who Contribute to her!
GsmCorner Posted July 27, 2003 Author Posted July 27, 2003 hi, thanks that worked, but... when i click on the new page, it hows up as The page cannot be found. what bit have i gone wrong on ? :( Tom
Rumble Posted July 27, 2003 Posted July 27, 2003 whats ur URL? Reddy to Rumble Thank you osCommerce and all who Contribute to her!
Rumble Posted July 27, 2003 Posted July 27, 2003 Sorry you're using MS2!! Paste this in catalog/includes/filenames.php define('FILENAME_NEWPAGE', 'newpage.php'); Reddy to Rumble Thank you osCommerce and all who Contribute to her!
Rumble Posted July 27, 2003 Posted July 27, 2003 ok application_top?? Reddy to Rumble Thank you osCommerce and all who Contribute to her!
GsmCorner Posted July 27, 2003 Author Posted July 27, 2003 great ! it worked 8) seems to working perfect now ! all down to you ;) Thanks for all your help Tom
Guest Posted July 28, 2003 Posted July 28, 2003 Wow, I just wanted to commend Rumble for his persitence in helping out in this thread. I was just reading through the threads as I have not been here for a while and I came accross this one. Rumble, you are surely an asset to this community and a real help. As a whole, I have also noticed that it seems this whole forum has become alot more useful and friendlier than it was just 3 months ago. :D :D :D :D :D
Rumble Posted July 28, 2003 Posted July 28, 2003 Thanks Carlo, the way i see it oscommerce does me a big favour so I guess this is my way of returning something back! Also its lets me learn more about the system and php (i've come across php since jan 2003) But thanks again you put a nice big smile on my face! :D Reddy to Rumble Thank you osCommerce and all who Contribute to her!
Rumble Posted July 28, 2003 Posted July 28, 2003 Thanks Carlo, the way i see it oscommerce does me a big favour so I guess this is my way of returning something back! Also its lets me learn more about the system and php (i've come across php since jan 2003) But thanks again you put a nice big smile on my face! :D Reddy to Rumble Thank you osCommerce and all who Contribute to her!
Rumble Posted July 28, 2003 Posted July 28, 2003 :lol: i was so pleased it posted twice :!: :?: Reddy to Rumble Thank you osCommerce and all who Contribute to her!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.