There's an undefined constant (ATTRIBUTES_PRICE_FACTOR_FROM_SPECIAL), used in /includes/functions/functions_prices.php (ca. line 1024); it exists neither in language files nor in the database:
Code:
function zen_get_attributes_price_factor($price, $special, $factor, $offset) {
if (ATTRIBUTES_PRICE_FACTOR_FROM_SPECIAL =='1' and $special) {
// calculate from specials_new_products_price
$calculated_price = $special * ($factor - $offset);
} else {
// calculate from products_price
$calculated_price = $price * ($factor - $offset);
}
// return '$price ' . $price . ' $special ' . $special . ' $factor ' . $factor . ' $offset ' . $offset;
return $calculated_price;
}
In the same file, there's also an uninitialized value in zen_get_attributes_price_final_onetime (line 1122); suggest changing
Code:
////
// attributes final price onetime
function zen_get_attributes_price_final_onetime($attribute, $qty= 1, $pre_selected_onetime) {
global $db;
global $cart;
if ($pre_selected_onetime == '' or $attribute != $pre_selected_onetime->fields["products_attributes_id"]) {
$pre_selected_onetime = $db->Execute("select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_attributes_id= '" . (int)$attribute . "'");
} else {
// use existing select
}
// one time charges
// onetime charge
$attributes_price_final_onetime += $pre_selected_onetime->fields["attributes_price_onetime"];
// price factor
$display_normal_price = zen_get_products_actual_price($pre_selected_onetime->fields["products_id"]);
$display_special_price = zen_get_products_special_price($pre_selected_onetime->fields["products_id"]);
to
Code:
////
// attributes final price onetime
function zen_get_attributes_price_final_onetime($attribute, $qty= 1, $pre_selected_onetime) {
global $db;
global $cart;
if ($pre_selected_onetime == '' or $attribute != $pre_selected_onetime->fields["products_attributes_id"]) {
$pre_selected_onetime = $db->Execute("select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_attributes_id= '" . (int)$attribute . "'");
} else {
// use existing select
}
// one time charges
// onetime charge
$attributes_price_final_onetime = $pre_selected_onetime->fields["attributes_price_onetime"];
// price factor
$display_normal_price = zen_get_products_actual_price($pre_selected_onetime->fields["products_id"]);
$display_special_price = zen_get_products_special_price($pre_selected_onetime->fields["products_id"]);
Bookmarks