Is it possible do not allow quantity discount for whole?
Yes.
Turn the display switches off...
includes/modules/attributes.php
line 235 - 238
change this:
if ($products_options->fields['attributes_qty_prices'] != '' or $products_options->fields['attributes_qty_prices_onetime'] != '') {
$show_attributes_qty_prices_description = 'true';
$show_attributes_qty_prices_icon = 'true';
}
to this:
if ($products_options->fields['attributes_qty_prices'] != '' or $products_options->fields['attributes_qty_prices_onetime'] != '') {
// bof Twitch Wholesale + Attributes TURN OFF quantity discounts
if ($_SESSION['customers_wholesale']=='1') {
$show_attributes_qty_prices_description = 'false';
$show_attributes_qty_prices_icon = 'false';
} else {
$show_attributes_qty_prices_description = 'true';
$show_attributes_qty_prices_icon = 'true';
}
// eof Twitch Wholesale + Attributes TURN OFF quantity discounts
}
Hide the quantity discounts from wholesale pricing calculation in the cart...
includes/functions/functions_prices.php
line 1066 - 1083
change this:
////
// return attributes_qty_prices or attributes_qty_prices_onetime based on qty
function zen_get_attributes_qty_prices_onetime($string, $qty) {
$attribute_qty = preg_split("/[:,]/" , $string);
$new_price = 0;
$size = sizeof($attribute_qty);
// if an empty string is passed then $attributes_qty will consist of a 1 element array
if ($size > 1) {
for ($i=0, $n=$size; $i<$n; $i+=2) {
$new_price = $attribute_qty[$i+1];
if ($qty <= $attribute_qty[$i]) {
$new_price = $attribute_qty[$i+1];
break;
}
}
}
return $new_price;
}
to this:
////
// return attributes_qty_prices or attributes_qty_prices_onetime based on qty
function zen_get_attributes_qty_prices_onetime($string, $qty) {
// bof Twitch Wholesale + Attributes TURN OFF quantity discounts
if ($_SESSION['customers_wholesale']=='1') {
$new_price = 0;
return $new_price;
} else {
//
$attribute_qty = preg_split("/[:,]/" , $string);
$new_price = 0;
$size = sizeof($attribute_qty);
// if an empty string is passed then $attributes_qty will consist of a 1 element array
if ($size > 1) {
for ($i=0, $n=$size; $i<$n; $i+=2) {
$new_price = $attribute_qty[$i+1];
if ($qty <= $attribute_qty[$i]) {
$new_price = $attribute_qty[$i+1];
break;
}
}
}
} // eof Twitch Wholesale + Attributes TURN OFF quantity discounts
return $new_price;
}
Ps: is it possible that twitch wholesale addons have modify special end date calendar, so it don't work for me into chrome and firefox browser, but only into IE?
No. The calendar is not modified.
Bookmarks