Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Show Categories Only With Products


Guest

Recommended Posts

Gidday,

 

I have set up our OSC to show Manufactruers to display only if they have products entered as per

 

// BOF: WebMakers.com Added: Show Manufacturers with products only

 

// $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");

 

$manufacturers_query = tep_db_query("select distinct m.manufacturers_id, m.manufacturers_name from " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS . " p where m.manufacturers_id=p.manufacturers_id order by manufacturers_name");

 

// EOF: WebMakers.com Added: Show Manufacturers with products only

 

from http://www.oscommerce.com/forums/index.php?showtopic=23586 .

 

I am wanting to do the same for Categories. Ie, if a Cat doesnt have any products entered it doesnt display.

 

Any ideas?

 

Ta.

 

Taro :D

Link to comment
Share on other sites

WendyJames. thanks for the reply.

 

I tried 2x and had no luck. Read through the authors notes etc but a no go.

 

This script seems a lot of work compared to the manufactures limiting script.

 

Thanks again. much appreciated,

 

SHJ

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...