Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Control Boxes That Show On Index.php


dforce

Recommended Posts

Posted

Hello

 

I am using 2.2rca and need to know how to control the boxes on the left column.

 

Basically i have a couple of boxes that i do not want to show on the index.php but only when the url contains a Cpath..

 

example.

 

if ((basename($PHP_SELF) != FILENAME_ABP_AWARDS)) {

include(DIR_WS_BOXES . 'abp_awards.php');

}else {

}

 

this makes it so that the abp_awards box wont show when i am on that page which works perfect.

 

However i also dont want this box to show when the index.php also contains a category like so index.php?cPath=22

 

How do i do this as i have tried allsorts and can not seem to figure this out.

 

Thank You

Posted

Here is something that might work.

 

Take a look at includes/application_top.php around line 449 ( close to the end ). This is where cPath is defined. you could slip in a var like

$dont_show_box = 1;

either under $cPath = ''; or after $current_category_id = 0;

 

cPath is always defined but maybe null or empty.

 

Then in includes/column_left.php you could do something likes this:

 

<code>

if($dont_show_box = 1) {

require(DIR_WS_BOXES . 'your_box');

}

</code>

How do you know when you know what you want to do for the rest of your life?

Archived

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

×
×
  • Create New...