I still need help with the code to check if a product is on special or on sale.
Here's what I have to check if a product is new and display "new" after the product name:
Code:
<?php
$datesql = "select products_date_added from " . TABLE_PRODUCTS . " where products_id=" . (int)$_GET['products_id'] . ";";
$date_display = $db->Execute($datesql);
$prod_add_date = $date_display->fields['products_date_added'];
$nib_days = time() - ((int)NEW_ITEM_BADGE_DAYS * 86400);
<?php if ((strtotime($prod_add_date) >= $nib_days)) { echo '<div class="productIcon new2">'.TITLE_TXT_NEW.'</div>'; } ?>
To check if a product is in a specific category and display "clearance" after the product name:
Code:
<?php $clearlink = zen_product_in_category($_GET['products_id'], 284);
if ($clearlink == 1) { echo '<div class="productIcon disc">'.TITLE_TXT_CLEARANCE.'</div>'; }?>
Bookmarks