Originally Posted by
lat9
Thanks, I'll look into that later this week.
I've taken that look and still don't understand how the dual-pricing ever worked with EO (v4.3.5 or whatever). Looking at the 2.1.7a version, its changes to the /admin/includes/functions/functions_prices.php look "off" to me, specifically zen_get_products_special_price which is used by EO:
Code:
//get specials price or sale price
function zen_get_products_special_price($product_id, $specials_price_only=false) {
global $db;
$product = $db->Execute("select products_price, products_model, products_priced_by_attribute from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
if ($product->RecordCount() > 0) {
// $product_price = $product->fields['products_price'];
$product_price = zen_get_products_base_price($product_id);
} else {
return false;
}
// Dual Pricing start
if ($product->RecordCount() > 0) {
// $product_price = $product->fields['products_price'];
$product_price = zen_get_products_base_price_w($product_id);
} else {
return false;
}
// Dual Pricing end
$specials = $db->Execute("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status='1'");
if ($specials->RecordCount() > 0) {
// if ($product->fields['products_priced_by_attribute'] == 1) {
$special_price = $specials->fields['specials_new_products_price'];
} else {
$special_price = false;
}
If the specified product exists, that section of code will never execute, since its condition is satisfied by the if/else clause the precedes it.
Bookmarks