Re: DUAL Pricing v2

Originally Posted by
edingtoncollection
under: //get specials price or sale price
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
$special_price = false;
} else {
if ($specials->RecordCount() > 0) {
$special_price = $specials->fields['specials_new_products_price'];
} else {
$special_price = false;
}
}
and under: // return special price only
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
return false;
} else {
if ($specials_price_only==true) {
if (zen_not_null($special_price)) {
return $special_price;
} else {
return false;
}
} else {
$product_to_categories = $db->Execute("select master_categories_id from " . TABLE_PRODUCTS . " where products_id = '" . $product_id . "'");
$category = $product_to_categories->fields['master_categories_id'];
$sale = $db->Execute("select sale_specials_condition, sale_deduction_value, sale_deduction_type from " . TABLE_SALEMAKER_SALES . " where sale_categories_all like '%," . $category . ",%' and sale_status = '1' and (sale_date_start <= now() or sale_date_start = '0001-01-01') and (sale_date_end >= now() or sale_date_end = '0001-01-01') and (sale_pricerange_from <= '" . $product_price . "' or sale_pricerange_from = '0') and (sale_pricerange_to >= '" . $product_price . "' or sale_pricerange_to = '0')");
if ($sale->RecordCount() < 1) {
return $special_price;
}
}
The above logic is from edingtoncollection and tells the system to ignore the sales price when logged in. I am trying to do the opposite. I want it to ignore the sales price when NOT logged in and to apply the sales price when logged in. I am still struggling to make this happen. I thought it would have been as simple as changing != '0' to ='0' but that did not work. Can someone offer some assitance?
ZC 1.5.5
Add ons: - Column/Grid 1.3.8 - Dual pricing 1.7 - ImageHandler3
Bookmarks