thisheart Posted August 16, 2005 Posted August 16, 2005 What is the proper way to link to another php file. For example. On my index page I would like a link to my 'about us' file. Do I link directly to about_us.php? Or do I have to worry about the '?cPath=24&products_id=44&osCsid=a6a81e34c5915671c9428c0f35f2a51d' ect? Thanks
RobertBlas Posted August 16, 2005 Posted August 16, 2005 Yes, you have to worry about it because otherwise the session info will be lost (especially the client does not use cookies and/or you are using a shared certificate). If you create a link in your catalog/index.php or better yet in includes/header.php, includes/column_right.php or includes/column_left.php to about_us.php do it like this ... <a href="<?php echo tep_href_link("about_us.php", '', 'NONSSL'); ?>">About Us</a> What I did for my non-osc pages was make a copy of index.php (e.g. to about_us.php) and then added my conent in the main section. that way your customers can click back to any where on the store. also search on "breadcrumbs" and you will see how to edit you bread crumbs so they are accurate. hope that helps, Good luck!
thisheart Posted August 18, 2005 Author Posted August 18, 2005 Yes, you have to worry about it because otherwise the session info will be lost (especially the client does not use cookies and/or you are using a shared certificate). If you create a link in your catalog/index.php or better yet in includes/header.php, includes/column_right.php or includes/column_left.php to about_us.php do it like this ... <a href="<?php echo tep_href_link("about_us.php", '', 'NONSSL'); ?>">About Us</a> What I did for my non-osc pages was make a copy of index.php (e.g. to about_us.php) and then added my conent in the main section. that way your customers can click back to any where on the store. also search on "breadcrumbs" and you will see how to edit you bread crumbs so they are accurate. hope that helps, Good luck! <{POST_SNAPBACK}> That is great for the links in the mentioned php files.. but what about links in the html areas. For example the /languages/english/index.php
Jack_mcs Posted August 18, 2005 Posted August 18, 2005 It's about the same: <a title="Some Text" href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '"> Some Text</a> 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
thisheart Posted August 18, 2005 Author Posted August 18, 2005 It's about the same:<a title="Some Text" href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '"> Some Text</a> Jack <{POST_SNAPBACK}> Thanks, What about adding a roll over image? When I add the code to the index section on the language index.php, it wrecks the code.
thisheart Posted August 18, 2005 Author Posted August 18, 2005 I want the 'quick links' to be rollover images linking to the product: http://medicclothing.com/osCommerce/
thisheart Posted August 18, 2005 Author Posted August 18, 2005 Worked out how to link an image to a product <a href="'. tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=productnumber') . '"><img src="image"></a>
shaunklink Posted August 25, 2005 Posted August 25, 2005 what about directory structure? for instance, my products pages (external to osc) are located at /products/productname/index.php I used the contrib that passes sessions to external pages, but what about these pages showing up on who's online?
Guest Posted September 7, 2005 Posted September 7, 2005 When you create a new page within osCommerce you should do two things: 1. Include the osCommerce copyright notice if you are using osCommerce code, classes and functions (you will be if you use the next step). 2. Add the following to the top of your new file and use the tep_href_link function for links within the file (except links to external sites etc.): ?require('includes/application_top.php'); These new files (pages) should be placed within your main osCommerce directory. That is all that is needed for any new page you wish to add to osCommerce :D If you wish your page to have header, footer and left and right columns, then use a page such as conditions.php as the basis. Matti
Recommended Posts
Archived
This topic is now archived and is closed to further replies.