Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to have area after column_right that only appears on default page?


Guest

Recommended Posts

Hello,

 

I'm searching for a way to add code to index.php so that a table appears after column_right but only on the default page.

There is an 'if' 'then' statement before column_right that gets text_main, etc. to only show on default page. I can't add table here because it is too wide to fit between columns. Right now, I'm calling the table to appear with no conditions, and it appears on my product pages as well as the default page. Anyone know how to add an 'if' 'then' statement to fit this situation?

Any help is always greatly appreciated!

 

NS

Link to comment
Share on other sites

Thanks Jack for your reply!

 

I used the code you were kind enough to offer as follows:

 

<?php

if (basename($PHP_SELF) == FILENAME_DEFAULT) {

include(DIR_WS_MODULES . 'main.php');

}

?>

 

The result is great on my default page, but the table still appears on product_list pages. You can see it here: http://www.naturalsamba.com

 

Any idea how I can get it only appear on index.php and not category pages?

 

Again, thanks for your time!

 

Rick

Link to comment
Share on other sites

Thanks Jack for your reply!

 

I used the code you were kind enough to offer as follows:

 

<?php

if (basename($PHP_SELF) == FILENAME_DEFAULT) {

include(DIR_WS_MODULES . 'main.php');

}

?>

 

The result is great on my default page, but the table still appears on product_list pages. You can see it here: http://www.naturalsamba.com

 

Any idea how I can get it only appear on index.php and not category pages?

 

Again, thanks for your time!

 

Rick

 

I could be wrong, but it looks to me like you were supposed to replace FILENAME_DEFAULT with the name of the page you want this to appear on, so in your case with INDEX.

Jeremy

Link to comment
Share on other sites

I could be wrong, but it looks to me like you were supposed to replace FILENAME_DEFAULT with the name of the page you want this to appear on, so in your case with INDEX.

Jeremy

 

 

<?php

if ((basename($PHP_SELF) == FILENAME_DEFAULT) and (!isset($_GET['cPath']))) {

include(DIR_WS_MODULES . 'main.php');

}

?>

Treasurer MFC

Link to comment
Share on other sites

This code:

 

if (basename($PHP_SELF) == FILENAME_DEFAULT) {

your code goes here

}

 

For a standard osc settup this code will let the box only show on the pages controlled by the index.php file

 

ie. front page , category and sub-category pages.

 

If you have modified your shop to use your domain name as default instead of index.php as the default , for info on how to do this see the tread by javaroaster , then this code will let the box be shown only on the front page.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...