Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Remove certain boxes on each side?


haley

Recommended Posts

I want to remove the manufacturers box on the left side and the languages, currencies, and reviews from the right side. I would also like to put the quick find on the right column. Does anyone have a way to do this? Editting them out of the php doesnt work.

Link to comment
Share on other sites

Yes it does work... column_left.php and column_right.php are the files you need to edit.... you can comment the code like this and PHP will ignore it:

 

 /* if ( (USE_CACHE == 'true') && !defined('SID')) {

  echo tep_cache_manufacturers_box();

 } else {

   include(DIR_WS_BOXES . 'manufacturers.php');

 } */



 require(DIR_WS_BOXES . 'whats_new.php');

 

In the above, the manufacturers box will not show... To make a box appear in the opposite column, simply cut and paste its code to the relevant file.

Link to comment
Share on other sites

Editting them out of the php doesnt work.

 

Sure about that?

Try taking a look at the includes/column* files.

 

You should see some require lines which you can comment out.

 

Pretty simple. :)

//Maz

Link to comment
Share on other sites

Thanks very much. I think I drank too much soda today and freaked out or something. I kept trying to cut out certain parts and it was going haywire. I must have been doing it wrong before. Thanks much!

Link to comment
Share on other sites

How do I get this out?

} else {

include(DIR_WS_BOXES . 'product_notifications.php');

}

} else {

include(DIR_WS_BOXES . 'product_notifications.php');

Everytime I try to comment it out or cut it out I mess it up.

I want the product notifcation gone.

I got grey hair with osCommerce.

Link to comment
Share on other sites

you need to make sure you close the brackets properly. What I mean is every { you see needs to have exactly one } at the end of it to close it. You are probably removing too few brackets. Try removing

} else {

       include(DIR_WS_BOXES . 'product_notifications.php');

     }

   } else {

     include(DIR_WS_BOXES . 'product_notifications.php');

   }

 

This is taken from loaded 5, I'm not sure if it's the same as regular osc snapshot, but if your going to be troubleshooting php at all, checking for proper bracket closure is an important thing to learn anyway.

 

Good luck!

Link to comment
Share on other sites

Firstly I am curious as to why it is there twice... I checked my own files and sure enough....hmmm....

 

Anyhows... this one can be tricky as you must leave a curly bracket... like so:

 

        include(DIR_WS_BOXES . 'best_sellers.php');



     } /* else {

       include(DIR_WS_BOXES . 'product_notifications.php');

     }

   } else {

     include(DIR_WS_BOXES . 'product_notifications.php');*/

   }

 } else {

   include(DIR_WS_BOXES . 'best_sellers.php');

 }

Link to comment
Share on other sites

oi, I must be tired. I think your right Johnson, I only glanced at the bottom section and ignored the top if statements in that particular chunk. :oops:

 

There are two else statements because they both conditional to the two if statements in the following code...

 

if (session_is_registered('customer_id')) {

     $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "' and global_product_notifications = '1'");

     $check = tep_db_fetch_array($check_query);

     if ($check['count'] > 0) {

       include(DIR_WS_BOXES . 'best_sellers.php');

     }

 

I think it makes it so it only shows product notifications if either the customer isn't logged in or the customer is logged in and has product notifications on...but as I said, I'm still pretty tired ;)

Link to comment
Share on other sites

I think it makes it so it only shows product notifications if either the customer isn't logged in or the customer is logged in and has product notifications on...but as I said, I'm still pretty tired ;)

 

Yes... I has another look and realised..... now, don't you need sleep or sumfink? :shock:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...