Jump to content



Latest News: (loading..)

- - - - -

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


This topic has been archived. This means that you cannot reply to this topic.
13 replies to this topic

#-19   longhorn1999

longhorn1999
  • Members
  • 334 posts

Posted 29 June 2011 - 02:09 AM

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

#-18   longhorn1999

longhorn1999
  • Members
  • 334 posts

Posted 01 July 2011 - 02:09 AM

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?

#-17 ONLINE   kymation

kymation

    Believers

  • Community Sponsor
  • 6,694 posts

Posted 01 July 2011 - 02:47 AM

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
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#-16   longhorn1999

longhorn1999
  • Members
  • 334 posts

Posted 01 July 2011 - 05:59 AM

Thanks Jim.  That code looked to me like it would work but still no luck.  I tried resetting the cache as well, but that doesn't help.

#-15 ONLINE   kymation

kymation

    Believers

  • Community Sponsor
  • 6,694 posts

Posted 01 July 2011 - 04:34 PM

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

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#-14   longhorn1999

longhorn1999
  • Members
  • 334 posts

Posted 02 July 2011 - 02:53 AM

View Postkymation, on 01 July 2011 - 04:34 PM, said:

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.

#-13 ONLINE   kymation

kymation

    Believers

  • Community Sponsor
  • 6,694 posts

Posted 02 July 2011 - 03:16 AM

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
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#-12   longhorn1999

longhorn1999
  • Members
  • 334 posts

Posted 02 July 2011 - 03:48 AM

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.

#-11 ONLINE   kymation

kymation

    Believers

  • Community Sponsor
  • 6,694 posts

Posted 02 July 2011 - 03:55 AM

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
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#-10   longhorn1999

longhorn1999
  • Members
  • 334 posts

Posted 02 July 2011 - 03:59 AM

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?

Edited by longhorn1999, 02 July 2011 - 04:00 AM.


#-9   SLiCK_303

SLiCK_303
  • Members
  • 76 posts

Posted 02 July 2011 - 04:03 AM

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.

#-8   longhorn1999

longhorn1999
  • Members
  • 334 posts

Posted 02 July 2011 - 04:08 AM

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.

#-7 ONLINE   kymation

kymation

    Believers

  • Community Sponsor
  • 6,694 posts

Posted 02 July 2011 - 05:11 AM

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

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#-6   longhorn1999

longhorn1999
  • Members
  • 334 posts

Posted 02 July 2011 - 06:33 AM

Thanks Jim!  That did the trick.