Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

New products, not use certain categories?


Recommended Posts

Hello, i have a 18+ category on my website.


However these products obviously show in the whats new info box and the new products for june etc.


Is there anyway to not use a certain category for this?





Link to comment
Share on other sites

i remember i dealt with similar situation before (but not for 18+ products). assumine you have some basic php skills, heres how it could be done:

1. find out the category id you do want to show, lets say 18;

2. modify the new_proucts.php module (includes/modules):

add this code in the while loop just after the $counter ++:

$cat_id = tep_get_product_categories_id($new_products['products_id']);

then add if condition to the $new_prods_content so that it looks like this:

	  if ($cat_id != 18) {
 		$new_prods_content .= '<td width="33%" align="center" valign="bottom"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br />' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</td>';
  $col ++;

the aforementioned code is from v2.3.1. not sure if theres the function tep_get_product_categories_id in place already. if not you would have to create it first.

hope the tip above help you get moving.


commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites


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

  • Create New...