This needs to be done carefully ... and well tested ...
Edit the function:
/includes/functions/functions_prices.php
You need to change two of the functions ... so make sure you have a backup of this file before attempting this to test it ...
Change the function zen_get_products_quantity_min_units_display to read:
PHP Code:
////
// Return a products quantity minimum and units display
function zen_get_products_quantity_min_units_display($product_id, $include_break = true, $shopping_cart_msg = false) {
$check_min = zen_get_products_quantity_order_min($product_id);
$check_units = zen_get_products_quantity_order_units($product_id);
$the_min_units='';
if ($check_min != 1 or $check_units != 1) {
if ($check_min != 1) {
$the_min_units .= PRODUCTS_QUANTITY_MIN_TEXT_LISTING . ' ' . $check_min;
}
if ($check_units != 1) {
$the_min_units .= ($the_min_units ? ' ' : '' ) . PRODUCTS_QUANTITY_UNIT_TEXT_LISTING . ' ' . $check_units;
}
$chk_mix = zen_get_products_quantity_mixed($product_id);
if (($check_min > 0 or $check_units > 0) and !$chk_mix) {
if ($include_break == true) {
$the_min_units .= '<br />' . ($shopping_cart_msg == false ? TEXT_PRODUCTS_MIX_OFF : TEXT_PRODUCTS_MIX_OFF_SHOPPING_CART);
} else {
$the_min_units .= ' ' . ($shopping_cart_msg == false ? TEXT_PRODUCTS_MIX_OFF : TEXT_PRODUCTS_MIX_OFF_SHOPPING_CART);
}
} else {
// only show if attributes exist
if ($chk_mix != 'none') {
if ($include_break == true) {
$the_min_units .= '<br />' . ($shopping_cart_msg == false ? TEXT_PRODUCTS_MIX_ON : TEXT_PRODUCTS_MIX_ON_SHOPPING_CART);
} else {
$the_min_units .= ' ' . ($shopping_cart_msg == false ? TEXT_PRODUCTS_MIX_ON : TEXT_PRODUCTS_MIX_ON_SHOPPING_CART);
}
}
}
}
// quantity max
$check_max = zen_get_products_quantity_order_max($product_id);
if ($check_max != 0) {
if ($include_break == true) {
$the_min_units .= ($the_min_units != '' ? '<br />' : '') . PRODUCTS_QUANTITY_MAX_TEXT_LISTING . ' ' . $check_max;
} else {
$the_min_units .= ($the_min_units != '' ? ' ' : '') . PRODUCTS_QUANTITY_MAX_TEXT_LISTING . ' ' . $check_max;
}
}
return $the_min_units;
}
Change the function zen_get_products_quantity_mixed to read:
PHP Code:
////
// Return a product mixed setting
// TABLES: products
function zen_get_products_quantity_mixed($product_id) {
global $db;
// don't check for mixed if not attributes
if (zen_has_product_attributes($product_id) == true) {
$the_products_quantity_mixed = $db->Execute("select products_id, products_quantity_mixed from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
if ($the_products_quantity_mixed->fields['products_quantity_mixed'] == '1') {
$look_up = true;
} else {
$look_up = false;
}
} else {
$look_up = 'none';
}
return $look_up;
}
Be sure to back up the function first before attempting this ...