Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add 2 different boxes on main page and other pages


MikeMike

Recommended Posts

I want to add my-box.php on the main page left column and my-box2.php on all other pages.

 

I guess it could be done like

 

 

if (on main page) {

include(DIR_WS_BOXES . my-box.php');

} else {

include(DIR_WS_BOXES . my-box2.php');

}

 

but what do I replace "on main page" with?

 

 

Regards

Mike

Link to comment
Share on other sites

Thanks, but it didn't really work.

 

This is what I did:

 

if (basename($PHP_SELF) == FILENAME_DEFAULT){
include(DIR_WS_BOXES . 'my-box.php');
} else {
include(DIR_WS_BOXES . 'my-box2.php');
}

and it shows my-box.php on all pages.

 

Any other suggestions?

 

Regards

Mike

Link to comment
Share on other sites

No, that's the correct code. What pages are you trying to view? The index page is used to show your home page as well as the categories and products pages. Try go to the Contact Us page and see if it switches.

 

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

Link to comment
Share on other sites

Ok it worked that way, but what I ment was to show my-box.php only on the first page you see when you enter the shop, not on any of the category pages even though they all comes from index.php.

 

Regards

Mike

Link to comment
Share on other sites

Excellent, thanks a lot, one last thing, can I input a CSV into phplist as my current mailing list is in another program.

 

Gary

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...