getmethod Posted August 26, 2007 Share Posted August 26, 2007 When I created new pages, I did the following. I copied header.php (because the links were changing). Instead of the categories, I wanted to display customer service topics (about us, returns, etc.). I named the page header_information.php. I used the same coding structure for the links in header_information.php. For example: <span class=ch1></span><a href=<?=tep_href_link('about_us.php')?> class=ch4>Returns & Replacements</a> I then copied the privacy page and named it customer_service.php. I made modifications including pointing to the new header page for customer service - header_information.php. The sessions seem to remain entact as I click from one Customer Service section to another as well as back to the catalog. Does this sound alright or am I setting myself up for problems in the future? Link to comment Share on other sites More sharing options...
h_aboulela Posted September 28, 2007 Share Posted September 28, 2007 Burt, You just made my day!!! Thank u so much for you easy, well explained steps for adding a new page! God bless you! Thanks A LOT! :) Your way is good, but better (IMO):Download the following files: catalog/conditions.php catalog/includes/languages/english/conditions.php Save them (on your Hard Drive as): catalog/template.php catalog/includes/languages/english/template.php When you want a new page: Open catalog/template.php (on your HD) and change the following: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONDITIONS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL')); To: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEW_PAGE); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEW_PAGE, '', 'NONSSL')); where NEW_PAGE is the name of your new page. eg if you wanted a page called "about_us.php" the code would be: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ABOUT_US); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ABOUT_US, '', 'NONSSL')); Save and Upload both: catalog/template.php catalog/includes/languages/english/template.php to their respective places on the live server, and then rename them BOTH to whatever, in the example: about_us.php Set CHMOD 777 on your newly created and renamed: catalog/includes/languages/english/about_us.php Download, and open up application_top.php and add the following: // New page about_us.php define('FILENAME_ABOUT_US', 'about_us.php'); Save and upload includes/application_top.php Now go Admin > Tools > Define Languages > about_us.php Done. It sounds complicated but once you get the hang of it, it takes no longer than 2 minutes. It maintains the proper Osc structure. Link to comment Share on other sites More sharing options...
h_aboulela Posted September 28, 2007 Share Posted September 28, 2007 OOOops! I'm having one small problem! I followed "Burt's" steps to add a new page and successfully added about.php everything works fine except that everytime i go to my new page "about.php", then I go to the "shopping cart page", i find it empty, even if I had some products in it!! Does anyone has a solution for this problem? Thanks, Link to comment Share on other sites More sharing options...
spectreman Posted October 8, 2007 Share Posted October 8, 2007 Hello. I have a site built using the original STS contribution (version 1.0.4). I assume because of the significant changes to STS since then, that this contribution will not work. Could someone, however, describe how to add additional pages (e.g. an "About Us" page) to an STS v1 site? I was going to add new pages as regular (non-oscommerce) pages, but need to have the Shopping Cart link on them. Thanks! Link to comment Share on other sites More sharing options...
edmond1815 Posted March 2, 2008 Share Posted March 2, 2008 Hello everybody, I want to do that: i want to create on left side another box, wich name wil be "Photo gallery" Inside that box i want to put links like in categories or information box, like : "exhibition 2007", exhibition 2006", etc. When somebody click that links, in main (center or product listing) from site, i want to show some pictures. Where can i modify, create, etc to do that. Please some help, i really need that to my online store. I don't need to be in admin section, i will edit manual, every page, with name of the picture, no problem. I need a simple and clean way, advice. Thank you, in advanced Edmond Link to comment Share on other sites More sharing options...
Draeisme Posted March 2, 2008 Share Posted March 2, 2008 Thanks for the post burt, it works like a charm. Link to comment Share on other sites More sharing options...
rickard_l Posted March 8, 2008 Share Posted March 8, 2008 There's a new page mod out there too, that was helpful in getting my own custom pages done. Where is that mod and what is it name, where can i find it etc.? Link to comment Share on other sites More sharing options...
rickard_l Posted March 8, 2008 Share Posted March 8, 2008 I tried doing that and changed the name in the required line in 15 in for instance the Privacy.php I get this error, although I have uploaded bouth new information.php (one in includes/lan.../english/... and so on the other under the root.) but I get this error message everytime... Warning: main(includes/languages/english/FILENAME_INFORMATION) [function.main]: failed to open stream: No such file or directory in /home/rickardl/public_html/osc/information.php on line 15 Warning: main(includes/languages/english/FILENAME_INFORMATION) [function.main]: failed to open stream: No such file or directory in /home/rickardl/public_html/osc/information.php on line 15 Warning: main(includes/languages/english/FILENAME_INFORMATION) [function.main]: failed to open stream: No such file or directory in /home/rickardl/public_html/osc/information.php on line 15 Fatal error: main() [function.require]: Failed opening required 'includes/languages/english/FILENAME_INFORMATION' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/rickardl/public_html/osc/information.php on line 15 what should i do, any tip? Anyone... PLease :blink: Link to comment Share on other sites More sharing options...
rickard_l Posted March 8, 2008 Share Posted March 8, 2008 I tried doing that and changed the name in the required line in 15 in for instance the Privacy.php I get this error, although I have uploaded bouth new information.php (one in includes/lan.../english/... and so on the other under the root.) but I get this error message everytime... Warning: main(includes/languages/english/FILENAME_INFORMATION) [function.main]: failed to open stream: No such file or directory in /home/rickardl/public_html/osc/information.php on line 15 Warning: main(includes/languages/english/FILENAME_INFORMATION) [function.main]: failed to open stream: No such file or directory in /home/rickardl/public_html/osc/information.php on line 15 Warning: main(includes/languages/english/FILENAME_INFORMATION) [function.main]: failed to open stream: No such file or directory in /home/rickardl/public_html/osc/information.php on line 15 Fatal error: main() [function.require]: Failed opening required 'includes/languages/english/FILENAME_INFORMATION' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/rickardl/public_html/osc/information.php on line 15 what should i do, any tip? Anyone... PLease :blink: Nevermind, I got it, forgott the line under the application_top.php :thumbsup: Link to comment Share on other sites More sharing options...
ckmj Posted March 30, 2008 Share Posted March 30, 2008 There's a new page mod out there too, that was helpful in getting my own custom pages done.One thing to remember! : Dont forget to add in any new code from previous modules that you've installed. Example: I have Linda's header tag controller, as well as the Thema option - both mods require you add another piece of php code. I've taken and saved a generic page with the new code in it. Once i'm done modding it, i just save them as something else and upload to /catalog and /catalog/includes/languages/english. I can't seen to find the new page mod, any sugestions? Thank you in advance Charles Link to comment Share on other sites More sharing options...
RC Heli Pilot Posted April 12, 2008 Share Posted April 12, 2008 I've followed the instructions as best i could,... :- I would like to make an Example / Photo Gallery Page for pictures of the work that i've done and one day i hope to be able to add a page #2 and page #3 and so on. Just on that first page they show Many,... Many Examples and More Examples for the people who have asked questions and then there are better written Examples with shorter code. I'm just going to tell you know,... I'm Confused! :( :'( So far i've created a new folder just to keep everything separate and organized and i've downloaded the following files: /shop/conditions.php /shop/includes/languages/english/conditions.php /shop/includes/application_top.php /shop/includes/languages/english.php I've renamed "/shop/conditions.php" to "/shop/gallery.php" On line 15 & 17 I've renamed CODE require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONDITIONS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONDITIONS)); To: CODE require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_GALLERY); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_GALLERY)); I then renamed /shop/includes/languages/english/conditions.php file to /shop/includes/languages/english/gallery.php But,... Post #2 in that thread never says what to do with the file /shop/includes/languages/english/gallery.php file. So, I changed lines 13 & 14 from: define('NAVBAR_TITLE', 'Conditions of Use'); define('HEADING_TITLE', 'Conditions of Use'); To define('NAVBAR_TITLE', 'Welcome to our Photo Gallery'); define('HEADING_TITLE', 'Welcome to our Photo Gallery'); Is that Correct? Now for the file /shop/includes/application_top.php Where is the best place to add this code: // New page gallery.php define('FILENAME_GALLERY', 'gallery.php'); The instructions say just to add it to the file, save it and upload it but i know from experence that you "Just" can't "Add It" anywhere inside the file so,... Wheres the best place to insert this code in to that file? Now for the /shop/includes/languages/english.php file. Do i find this code starting on line 122 // information box text in includes/boxes/information.php define('BOX_HEADING_INFORMATION', 'Information'); define('BOX_INFORMATION_PRIVACY', 'Privacy Notice'); define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use'); define('BOX_INFORMATION_SHIPPING', 'Shipping & Exchanges'); As you can see i've changed Shipping & Returns to Shipping & Exchanges. But anyway,... Is this the code to write to have it in the "Information Box" below: define('BOX_INFORMATION_GALLERY', 'Photo Gallery'); Directly under this code on line 122 // information box text in includes/boxes/information.php define('BOX_HEADING_INFORMATION', 'Information'); define('BOX_INFORMATION_PRIVACY', 'Privacy Notice'); define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use'); define('BOX_INFORMATION_SHIPPING', 'Shipping & Exchanges'); define('BOX_INFORMATION_CONTACT', 'Contact Us'); define('BOX_INFORMATION_GALLERY', 'Photo Gallery'); I have follow the code instructions and i Cannot Get Photo Gallery link to be displayed under or in the Information Box. Any Suggestions as to why it's not showing up in that box? If i type the name is directly like DOMAINNAME.COM/shop/gallery.php the page shows up and looks fine. Just a couple more questions please,... What is the code to have the Photo Gallery Link in it's own Box directly under the Information Box and have the Box named "Other Interest"? Once i get this firat main page created, How do i go about adding a 2nd or 3rd or 4th page and so on? 1 Last Question please,... Is there a Better way of going about and doing this instead of the way i've described above? I wished they would have added some sort of option to be able to just add pages like this from the Admin, How could they not think that people wouldnt want to be adding more pages to their site,... :- I really hope i havent confused you and i really appreciate your help in helping me solving this. Thanks RCHP. Link to comment Share on other sites More sharing options...
RC Heli Pilot Posted April 12, 2008 Share Posted April 12, 2008 I figured out why it wasnt showing up in the Information Box. I needed to add the command to the information.php file. $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_GALLERY . '</a><br>' . '<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>'); Now that i've gotten it to show up i just need my other questions answered please. Link to comment Share on other sites More sharing options...
m4verick Posted May 13, 2008 Share Posted May 13, 2008 Thanks burt, This one work perfect for me! I have use v2.2 RC1 Your way is good, but better (IMO):Download the following files: catalog/conditions.php catalog/includes/languages/english/conditions.php Save them (on your Hard Drive as): catalog/template.php catalog/includes/languages/english/template.php When you want a new page: Open catalog/template.php (on your HD) and change the following: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONDITIONS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL')); To: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEW_PAGE); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEW_PAGE, '', 'NONSSL')); where NEW_PAGE is the name of your new page. eg if you wanted a page called "about_us.php" the code would be: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ABOUT_US); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ABOUT_US, '', 'NONSSL')); Save and Upload both: catalog/template.php catalog/includes/languages/english/template.php to their respective places on the live server, and then rename them BOTH to whatever, in the example: about_us.php Set CHMOD 777 on your newly created and renamed: catalog/includes/languages/english/about_us.php Download, and open up application_top.php and add the following: // New page about_us.php define('FILENAME_ABOUT_US', 'about_us.php'); Save and upload includes/application_top.php Now go Admin > Tools > Define Languages > about_us.php Done. It sounds complicated but once you get the hang of it, it takes no longer than 2 minutes. It maintains the proper Osc structure. Link to comment Share on other sites More sharing options...
burt Posted May 13, 2008 Share Posted May 13, 2008 Something written 5 years ago still works today. Dunno if that's a good thing or a bad thing! Link to comment Share on other sites More sharing options...
cms08 Posted June 12, 2008 Share Posted June 12, 2008 Thanks burt,This one work perfect for me! I have use v2.2 RC1 This installation method did not work for me. I got there error Fatal error: Call to a member function add_current_page() on a non-object in /home/thebest4/public_html/mysite/includes/application_top.php on line 312 I did everything in the instruction. Could things like writing in caps or not, or the placement of the code on the pages make a difference? It looks to my like I need to add something one more place, but where? Link to comment Share on other sites More sharing options...
cms08 Posted June 12, 2008 Share Posted June 12, 2008 This installation method did not work for me. I got there error Fatal error: Call to a member function add_current_page() on a non-object in /home/thebest4/public_html/mysite/includes/application_top.php on line 312 I did everything in the instruction. Could things like writing in caps or not, or the placement of the code on the pages make a difference? It looks to my like I need to add something one more place, but where? The cause of the error is that rc2 does not use the NONSSL')); in $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ABOUT_US, '', 'NONSSL')); You also need to include the file in english.php something like define('FILENAME_ASSET_RECOVERY', 'asset_recovery.php'); Link to comment Share on other sites More sharing options...
Guest Posted October 11, 2008 Share Posted October 11, 2008 Hi, I realy thought I knew what i was doing with Oscommerce installed sts and get the error above the explantion given is confusing i defined as said in english.php But still get the error Fatal error: Call to a member function add_current_page() on a non-object in /var/www/vhosts/domainnamehidden.com/httpdocs/includes/application_top.php on line 312 Can someone explain this error fresh install of RC2 then added sts Mike Link to comment Share on other sites More sharing options...
germ Posted October 11, 2008 Share Posted October 11, 2008 See the links in my posts here: Click Me If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Guest Posted December 2, 2008 Share Posted December 2, 2008 I have gone through this and when I try to access the pages I made I get the shipping.php page for each of them. I checked and made sure I uploaded them and also that i put them in filenames.php. here is one of the pages, still coming up with shipping: http://whitecloudcigarettes.com/catalog/affordable.php What am I missing? Thanks in advance! Link to comment Share on other sites More sharing options...
Guest Posted December 2, 2008 Share Posted December 2, 2008 okay... i figured that out. I had the application_top stuff still set to shipping.php. My next question.. How do I add these pages to my menu? I am frustrated a bit but I know once I get it, it will not be hard the next time. Link to comment Share on other sites More sharing options...
crecepts2009 Posted October 21, 2009 Share Posted October 21, 2009 Your way is good, but better (IMO): Download the following files: catalog/conditions.php catalog/includes/languages/english/conditions.php Save them (on your Hard Drive as): catalog/template.php catalog/includes/languages/english/template.php When you want a new page: Open catalog/template.php (on your HD) and change the following: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONDITIONS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL')); To: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEW_PAGE); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEW_PAGE, '', 'NONSSL')); where NEW_PAGE is the name of your new page. eg if you wanted a page called "about_us.php" the code would be: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ABOUT_US); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ABOUT_US, '', 'NONSSL')); Save and Upload both: catalog/template.php catalog/includes/languages/english/template.php to their respective places on the live server, and then rename them BOTH to whatever, in the example: about_us.php Set CHMOD 777 on your newly created and renamed: catalog/includes/languages/english/about_us.php Download, and open up application_top.php and add the following: // New page about_us.php define('FILENAME_ABOUT_US', 'about_us.php'); Save and upload includes/application_top.php Now go Admin > Tools > Define Languages > about_us.php Done. It sounds complicated but once you get the hang of it, it takes no longer than 2 minutes. It maintains the proper Osc structure. i have followed these steps but didnt get new page check this error http://shop4meds.co.uk/wholesale.php Link to comment Share on other sites More sharing options...
crecepts2009 Posted October 21, 2009 Share Posted October 21, 2009 and what does you mean bye "Now go Admin > Tools > Define Languages > about_us.php" Link to comment Share on other sites More sharing options...
Jan Zonjee Posted October 21, 2009 Share Posted October 21, 2009 Would have deleted the last post, but I cannot. Moderator? :D Hasn't got the time to read all the posts on this forum. Do you? :'( Link to comment Share on other sites More sharing options...
zpupster Posted September 18, 2010 Share Posted September 18, 2010 hello, i have added a few pages already to my site, but this next one is giving me a lot of problems. i want to add a page that is only available when a person is logged in. i looked at the index.php page where it says hello guest-- but if oyu are logged in--- it changes to see new products. somthing like that, but i am not sure where that code is -- for non logins it will say you need to be logged in to see this page and link to login but if there logged in show the page as inteneded. any suggestions????? thanks craig Link to comment Share on other sites More sharing options...
germ Posted September 18, 2010 Share Posted September 18, 2010 The generic test for "is logged in? then action" goes like this: <?php if ( !tep_session_is_registered('customer_id') ) { // code for NON-LOGGED-IN goes here } else { // code for LOGGED-IN goes here } ?> If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.