Excluding a Category from Group Pricing?
Hi,
I want to use group pricing, however, there is one category I would like to exclude from this. I noticed that gift certificates are automatically unaffected by the group pricing and so I presume there must be a way to set this for another category but I can't find it.
Can anyone help?
Thanks.
Re: Excluding a Category from Group Pricing
This is not built into Zen Cart to exclude anything from the Group Discounts, other than the Gift Certificates ...
You could customize the code for this by doing the calculation for all products in that Category and deducting it in the same manner that the Gift Certificates are deducted from the Order Totals module for the Group Discounts ot_group_pricing.php ...
Re: Excluding a Category from Group Pricing
The following appears to be working for me in version 1.3.0.1 -- I just wrote this code today:
Edit /includes/modules/order_total/ot_group_pricing.php
In the function
PHP Code:
function get_order_total() {
Above the line
PHP Code:
return $order_total;
I put
PHP Code:
$excluded_category_qty = $_SESSION['cart']->in_cart_check('master_categories_id','2');
if (($_SESSION['cart']->in_cart_check('master_categories_id','2') > 0)) $order_total = $order_total - $excluded_category_qty;
Where '2' is the master category I wanted to exclude from group pricing.
I hope that helps!
Re: Excluding a Category from Group Pricing
Quote:
Originally Posted by
kgeoffrey
The following appears to be working for me in version 1.3.0.1 -- I just wrote this code today:
Edit /includes/modules/order_total/ot_group_pricing.php
In the function
PHP Code:
function get_order_total() {
Above the line
PHP Code:
return $order_total;
I put
PHP Code:
$excluded_category_qty = $_SESSION['cart']->in_cart_check('master_categories_id','2');
if (($_SESSION['cart']->in_cart_check('master_categories_id','2') > 0)) $order_total = $order_total - $excluded_category_qty;
Where '2' is the master category I wanted to exclude from group pricing.
I hope that helps!
I tried this but get the following error:
Fatal error: Unsupported operand types in /home/dev/public_html/includes/modules/order_total/ot_group_pricing.php on line 68
Any idea why?
Re: Excluding a Category from Group Pricing?
i have the same problem. does anyone have the solution?