Forums / Customization from the Admin / Excluding a Category from Group Pricing?

Excluding a Category from Group Pricing?

Locked

Views: 2,850

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
12 Sep 2008, 10:25 PM
#1
amp avatar

amp

New Zenner

Join Date:
Feb 2008
Posts:
12
Plugin Contributions:
0

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.

13 Sep 2008, 6:10 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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 ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

6 Feb 2009, 7:51 PM
#3
kgeoffrey avatar

kgeoffrey

New Zenner

Join Date:
Mar 2007
Posts:
22
Plugin Contributions:
0

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

 
    function get_order_total() {

Above the line

      return $order_total;

I put

 
      $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!

16 Feb 2009, 6:15 PM
#4
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: Excluding a Category from Group Pricing?

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

function get_order_total() {
>  
> Above the line
>  
> ```php
      return $order_total;

I put

  $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?
19 Sep 2009, 6:46 PM
#5
thenax avatar

thenax

New Zenner

Join Date:
Jun 2009
Posts:
67
Plugin Contributions:
0

Re: Excluding a Category from Group Pricing?

i have the same problem. does anyone have the solution?