Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Editing footer by page


AndrewM

Recommended Posts

Posted

Hi there...

Sorry...yes, similar to the concept of having meta tag info relate to the particular page the customer is viewing as in the contribution above.

 

I want to have info displayed in the footer relevant to the particular product that the customer is viewing.

 

I want this to be editable through the admin area, specifically on the screen where the product is added.

 

AndrewM

Posted

There is a simple thing that you can do that might help further your goal. If you have just a few footer pages that you want to switch between, you can switch them based on a PHP variable called $PHP_SELF that stores the value of the page you're on.

 

For example, you could rename footer.php to footer1.php, and create a new one (similar to footer1.php, probably) named footer2.php. Then, you'd create a new footer.php with something like this:

<?php
 if ($PHP_SELF == "product_info.php") {
    require(DIR_WS_INCLUDES . 'footer1.php');
    }
    else {
       require(DIR_WS_INCLUDES . 'footer2.php');
    }
?>    

 

That would use footer1 for product_info.php and footer2.php for everything else.

 

There are many more variables that you have to work with - - look at the server info page in the admin section, under Tools.

 

If you can clarify exactly what your needs are, maybe we can figure out a way to get it going for you.

 

-jared

 

Edit: forgot to close the code block properly. -jc

Posted

Let us know how it goes - - I'm curious to see how you implement it.

 

-jared

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...