resolved!
4 episodes of project runway later... i figured it out... just a few lines, which i knew it would be but... where? was the question.
it's not a very flexible fix - it makes it so that all quantity discounts are wholesale only as opposed to the ideal of having it be an admin setting.
restrictions -
-must be used with the module for Wholesale/Dual Pricing (link in above post)
-no "discount quantity" pricing will be allowed for retail customers. never.
file: includes/functions/functions_prices.php
around line 1473
function zen_get_products_discount_price_qty($product_id, $check_qty, $check_amount=0)
under the switch ($products_query->fields['products_discount_type'])
in case '2': (which is the quantity discount option)
at the very end add in:
Code:
$customers_id = $_SESSION['customer_id'];
$customer_check = $db->Execute("select * from " . TABLE_CUSTOMERS . " where customers_id = '$customers_id'");
if ($customer_check->fields['customers_whole'] != "1")
$discounted_price = $display_price;
so the entire case '2' looks like this:
Code:
// actual price
case '2':
if ($products_query->fields['products_discount_type_from'] == '0') {
$discounted_price = $products_discounts_query->fields['discount_price'];
} else {
$discounted_price = $products_discounts_query->fields['discount_price'];
}
$customers_id = $_SESSION['customer_id'];
$customer_check = $db->Execute("select * from " . TABLE_CUSTOMERS . " where customers_id = '$customers_id'");
if ($customer_check->fields['customers_whole'] != "1")
$discounted_price = $display_price;
break;
// amount offprice
case '3': ....
Bookmarks