- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
How to link the template banners to a specific category/product
November 15, 2010
Any osCommerce template can contain banners in the header and side columns. The template’s programmer often links them to a category, new products, specials listing and so on.
You may want to link them to your own category or to your own featured products. It’s not difficult to do. First you need to locate where this banner is coded. That is to locate a specific file. If the banner is located in the header most likely this banner can be found in the /includes/header.php file. If the banner is located in one of the side columns look for it in the /inludes/column_left.php or /inludes/column_right.php files.
If you have difficulties in locating the place where the banner is coded here are some tips for you:
– in your browser right-click (Ctrl-click on Mac) the image of the banner and select Properties (in Safari you can use “Open Image in New Window” instead).
– See the name of this image (e.g. banner1.gif)
– Use the search functionality of your file manager or search tools like .
– Having located the file, you can now search for the line where this image is sitting. Very often it’s Ctrl+F key stroke in any text editor.
You may see a line of code like this:
What you do after that is replacing the parameter for the tep_href_link() function for your own.
1. Linking to a category
Your code should look like this
Use your own value of cPath. You can get this value while you are browsing the category you are going to link to. Just take a look at the address bar of your browser and you’ll see the cPath value the current category has got.
2. Linking to a product
Your code should look like this
Use your own value of products_id. You can get this value while you are browsing the product page you are going to link to. Take a look at the address bar of your browser and you’ll see the products_id value of the current product.
3. Linking to the New Products, Specials is even easier
It’s enough to use a code like this