Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is there a way to hide the manufacturer's box?


longhorn1999

Recommended Posts

Hi everyone,

 

In RC2.2a, is there a way to hide the manufacturer's box only when a certain manufacturer's product listing page is shown?

 

 

currently in includes/column_left.php:

  if ((USE_CACHE == 'true') && empty($SID)) {
   echo tep_cache_manufacturers_box();
 } else {
   include(DIR_WS_BOXES . 'manufacturers.php');
 }

 

I need to exclude the box for a particular manufacturer (#30) to satisfy a particular supplier's requirement. Is there any conditional statement that allows for this?

 

Thanks

Link to comment
Share on other sites

I've tried several variants like:

 

  if ((USE_CACHE == 'true') && $manufacturer_id !== '30' && empty($SID)) {
   echo tep_cache_manufacturers_box();
 } else {
   include(DIR_WS_BOXES . 'manufacturers.php');
 }

 

but this doesn't work of course, as I'm not sure what variables to use or what the proper syntax is.

 

Any ideas?

Link to comment
Share on other sites

Try this:

 if ($manufacturer_id !== '30') {
   if ((USE_CACHE == 'true') && empty($SID)) {
     echo tep_cache_manufacturers_box();
   } else {
     include(DIR_WS_BOXES . 'manufacturers.php');
   }
 }

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

That code assumes that $manufacturer_id is set. Is it?

 

Regards

Jim

 

There is a manufacturer that I set in the admin that has the ID number 30, but actually I'm not sure where in the code this specifically would be done.

Link to comment
Share on other sites

Then you need to test the value to see if it's set. Add this just above the code I posted.

print 'Mfr. ID: ' . $manufacturer_id;

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hi Jim,

 

It doesn't look like it's set actually.

 

Just above the left column appears "Mfr. ID:", but no ID.

 

 

I'm not sure at all how to set it. My includes/modules/product_listing.php refers to $manufacturer_id multiple times, but even here, I'm not sure where it's initially set.

Link to comment
Share on other sites

You can't use that variable if it's not set. You are talking about a manufacturer's page, so the ID has to exist somewhere. Look at the URL string: Does it contain manufacturers_id=30 or something similar? if it does, use $_GET['manufacturers_id'] as your variable.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Actually I'm using Ultimate SEO Urls 5, so for this manufacturer, the page is www.mysite.com/some-manufacturer-m-30.html.

 

The actual product pages can show this ID, e.g., www.mysite.com/some-product-category1-p-55.html?manufacturers_id=30.

 

How would I use this GET in a conditional statement for column_left.php?

Link to comment
Share on other sites

If it were me...I wouldn't go that far back in the code. I'd just put it towards the top of the manufacturers box, or manufacturers_info box, whichever your trying to deal with.

Link to comment
Share on other sites

I hadn't even thought to look at includes/boxes/manufacturers.php. What exactly should I do there? I'm just trying to make this box disappear for a particular manufacturer page, so I thought that column_left.php would be the logical place to make a change.

Link to comment
Share on other sites

$_GET['manufacturers_id'] should work then. Put it where you put $manufacturer_id before.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...