I haven't tested this but should point you in the right direction for a bit more elegant solution.
Open include/func/func.product.php
FIND:
Code:
$product['categoryid'] = $categoryid;
AFTER ADD:
Code:
// SD - Check if product is in new category
$product['is_new'] = (func_query_first_cell("SELECT categoryid FROM $sql_tbl[products_categories]
WHERE productid='" . intval($product['productid']) . "'
AND categoryid='384'") > 0 ? 'Y' : 'N');
// / SD - Check if product is in new category
Open include/search.php
FIND:
Code:
$products[$k]['taxed_price'] = $v['taxed_price'] = $v['price'];
AFTER ADD:
Code:
// SD - Check if product is in new category
$products[$k]['is_new'] = (func_query_first_cell("SELECT categoryid FROM $sql_tbl[products_categories]
WHERE productid='" . intval($v['productid']) . "'
AND categoryid='384'") > 0 ? 'Y' : 'N');
// / SD - Check if product is in new category
Then in your templates on your product listings or your product details page you can use:
Code:
{if $product.is_new eq 'Y'}Show Icon{/if}