WOW. this worked like a charm Ajeh! Thanks for this.
No need for elaborate modle installation.
One question, can we add multible categories like so?
Code:
// bof: Login for Price
$chk_login_for_price = false;
$chk_category_sql = "SELECT master_categories_id FROM " . TABLE_PRODUCTS . " WHERE products_id = '" . (int)$products_id . "'";
$chk_category = $db->Execute($chk_category_sql);
if ($_SESSION['customer_id'] ==0 && in_array((int)$chk_category->fields['master_categories_id'], array(123, 145, 1187)) ) {
return TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE;
}
// eof: Login for Price
Bookmarks