HappyMom:
Hello,
Someone posted the thread/question below:
*My discount prices with this mod work fine. However, what isn't working is that for anyone assigned to a group (I just have one group assigned right now - Group A), the Specials I've set are not working properly.
The Specials are not products that are affected by group pricing - they are separate products.
For those customers in Group A, the correct price shows up until they go to check out, at which point the price reverts back to the original price, rather than the sale price.*
And I understand that this is how the group pricing was designed to work, but I actually want my Group A/B/ect to receive the sale discount on products for which they are not getting any special Group A/B/etc discount.
For instance:
Product 1:
Regular Price: 10.00
Sale Price: 8.00
Group A price: 5.00
In this case, my Group A customers gets the $5.00 Price. This is OK. No Change required here.
Product 2:
Regular Price: 20.00
Sale Price: 10.00
Group A Price - Does not exist -> revert to regular price In this case, I want my Group A customers to get the $10.00 Sale Price.
What files should I change? or where do I start?
Any help would be greatly appreciated it.
Thanks!
Just in case some has a simiilar problem and want their group (A,B,etc) customers to get the sale prices of products that are not marked with a group price:
I made the following changes and they worked for me. There is a still a small glitch with the overal total (the sale price adds OK, but the group A,B,etc price add the original price instead of the group price) The totals get added correctly on the next shopping cart page, so I am not too worry about it.
Zen Cart version: 3.7
The file name is:
catalog/includes/classes/
shopping_cart.php
There is 3 places where you need to come out the
if (!$customers_group) clause.
In line 652:
// if(!$customers_group) {
//
$special_price = zen_get_products_special_price($prid);
if ($special_price and $product->fields['products_priced_by_attribute'] == 0) {
$products_price = $special_price;
} else {
$special_price = 0;
}
// }
in line 676:
// if(!$customers_group) {
if ($product->fields['products_priced_by_attribute'] == '1' and zen_has_product_attributes($product->fields['products_id'], 'false')) {
// reset for priced by attributes
if ($special_price) {
$products_price = $special_price;
} else {
$products_price = $product->fields['products_price'];
}
} else {
// discount qty pricing
if ($product->fields['products_discount_type'] != '0') {
$products_price = zen_get_products_discount_price_qty($product->fields['products_id'], $qty);
}
// }
line 1135
// if(!$customers_group) {
if ($special_price and $products->fields['products_priced_by_attribute'] == 0) {
$products_price = $special_price;
} else {
$special_price = 0;
}
// }
That's it.
-Norma