If this is your first visit, check our documentation. To post, register or login.
Forums / Addon Order Total Modules / Quantity Discounts for 1.3

Quantity Discounts for 1.3

Started by swguy on 13 Aug 2006, 10:22 AM · Views: 226,694

Results 221 to 240 of 847
23 Dec 2007, 11:06 PM
#221
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,758
Plugin Contributions:
56

Quantity Discounts for 1.3

If you're getting a blank page, that means there's a syntax error in your php file. If you look at your server log, it will guide you to the line that needs to be fixed.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

24 Dec 2007, 12:54 AM
#222
attroll avatar

attroll

Zen Follower

Join Date:
Dec 2007
Posts:
103
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Hmm, I just put the code back in and tried it and got the blank page again. I then went to my cPanel and Error Log and it does not display any errors relating to my shopping cart.

This means I am back to ground zero. Do you have any other ideas?

28 Dec 2007, 7:29 AM
#223
attroll avatar

attroll

Zen Follower

Join Date:
Dec 2007
Posts:
103
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

swguy

If I send you the admin login and the ftp info to my zen cart will you look at this for me?

29 Dec 2007, 5:39 PM
#224
veronika7747 avatar

veronika7747

Zen Follower

Join Date:
Nov 2007
Posts:
270
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I have eliminated categories O.K., but I am trying to set the following without a success so far:
A: If 3 different items from one category - discount $xx
B: If 5 different items from one category - discount $yy
C: If 10 of the same items from one category - discount $zz

However right now I am getting discounts for A & B even if they are of the same item. (I did not do C: as yet).

[CODE][ function apply_special_category_discount($category, $count, &$disc_amount) {
switch($category) {
case 4:
if ($count > 300) {
$disc_amount = 150;
}
break;
case 4:
if ($count > 500) {
$disc_amount = 200;
}
break;
}
}/CODE]

What do I have to add??
Tx

29 Dec 2007, 6:02 PM
#225
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,758
Plugin Contributions:
56

Re: Quantity Discounts for 1.3

Extending my contributions is a fee based service that I provide. I support the basic purpose of each contribution on the forum; I really can't take the time to debug user written modifications.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

29 Dec 2007, 6:14 PM
#226
veronika7747 avatar

veronika7747

Zen Follower

Join Date:
Nov 2007
Posts:
270
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

swguy:

Extending my contributions is a fee based service that I provide. I support the basic purpose of each contribution on the forum; I really can't take the time to debug user written modifications.

I am sorry, was this message for my inquiry?? If yes, I thought I was suppose to modify that file...

TX

29 Dec 2007, 7:58 PM
#227
attroll avatar

attroll

Zen Follower

Join Date:
Dec 2007
Posts:
103
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Veronika7747:

I am sorry, was this message for my inquiry?? If yes, I thought I was suppose to modify that file...

TX
I think his reply was intended for me.

29 Dec 2007, 8:14 PM
#228
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,758
Plugin Contributions:
56

Re: Quantity Discounts for 1.3

Both of you are correct.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

29 Dec 2007, 8:30 PM
#229
veronika7747 avatar

veronika7747

Zen Follower

Join Date:
Nov 2007
Posts:
270
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

swguy:

Both of you are correct.

O.K.
For any user of this add-on, should I be able to achive the following:

I have eliminated categories O.K., but I am trying to set the following without a success so far:
A: If 3 different items from one category - discount $xx
B: If 5 different items from one category - discount $yy
C: If 10 of the same items from one category - discount $zz

However right now I am getting discounts for A & B even if they are of the same item. (I did not do C: as yet).

If this is not the right add-on to do this, could you let me know?
Tx

30 Dec 2007, 2:44 AM
#230
attroll avatar

attroll

Zen Follower

Join Date:
Dec 2007
Posts:
103
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I figured out what I was doing wrong. Yahoo!.

Let me explain what I was doing wrong so those in the future will not do the same thing and mayb the documentation can be updated to make it more clearer. The documentation is right but I guess I had a brain phart.

The documentation says this:

How do you create that last discount?

Quantity Discounts 1.4 has the answer. In the file includes/modules/order_total/ot_quantity_discount.php, there is a function called setup(). From there, you may add a call to a function to add additional discounting levels and discounts in the following manner:

    function  setup() {
       // Add extra levels and discounts here in this manner: 
       // "Buy more than 100 items, get 50 (% or $, as per admin) off" 
       $this->add_extra_level_discount(100, 50); 
    }

Place your code right above the closing php statement here

?>
30 Dec 2007, 2:54 AM
#231
attroll avatar

attroll

Zen Follower

Join Date:
Dec 2007
Posts:
103
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Is there a way to place something like "Quantity Discounts Marketing Example 2 Output" that gets displayed in the product in the top level category that the product falls under?

30 Dec 2007, 5:20 PM
#232
veronika7747 avatar

veronika7747

Zen Follower

Join Date:
Nov 2007
Posts:
270
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Veronika7747:

O.K.
For any user of this add-on, should I be able to achive the following:

I have eliminated categories O.K., but I am trying to set the following without a success so far:
A: If 3 different items from one category - discount $xx
B: If 5 different items from one category - discount $yy
C: If 10 of the same items from one category - discount $zz

However right now I am getting discounts for A & B even if they are of the same item. (I did not do C: as yet).

> If this is not the right add-on to do this, could you let me know?
> Tx

Well for those who might be interested.. I did as follows:
For C: copied all these products to a special category and set "price manager discount? - the one that comes with zencart.
For A & B - used quantity discount 1. 3 and let it be O.K. for 3 (5) of the same item. If I figure out how to set it for 3(5) discount **only of different items **I'll let you know.
Happy New Year to you all!
1 Jan 2008, 8:22 AM
#233
attroll avatar

attroll

Zen Follower

Join Date:
Dec 2007
Posts:
103
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I have included the following code below in my "ot_quality_discount.php" template. The 65 represents the category that I want to use my quality discount in.

In the instructions it gives the explain of the code to insert in the "ot_quality_discount.php". The sample uses category 11. I just substituted the 11 for 65.

The problem is that the discounts also are workign in category 67. This should not be happening according to the instructions.

Let me clarify that category 67 is not a subcategory under 65.

How can I correct this?

Here is the code I am using in my "ot_quality_discount.php".

       // Add this code to make category 65 have discounts set up in
       // the quality discounts section
    function exclude_category($category) {
        switch($category) {
           case 65:
                return false;
        }
        return true;
    }
4 Jan 2008, 8:03 AM
#234
attroll avatar

attroll

Zen Follower

Join Date:
Dec 2007
Posts:
103
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Here are how my categories are set up. They are all top level categories.
ID Category / Products
65 Books
67 Test category

I read through the documentation again and I ran the query to see if my master categories are set to 0 and the query came back good. I even went into my Admin -> Tools -> Store Manager, and click on "Reset ALL Products Master Categories ID"

But all my categories are getting the discounts I have setup.

At first I added this thinking I had was suppose to in order to make sure category 65 got the discounts but I found that without doing this it got the discounts and so do all the categories.

    function exclude_category($category) {
        switch($category) {
           case 66:
                return false;
        }
        return true;
    }

So I them removed the above code and add this code below to try and exempt category 67 from the discounts but category 67 still gets the discounts with this code in there.

    function exclude_category($category) {
        switch($category) {
           case 67:
                return true;
        }
        return false;
    }

Am I putting it in the wrong place in the code or something? Here is how I am placing these codes. I am placing them right below the function setup() code like below. In the very bottom of the file.

    function  setup() {
       // Add extra levels and discounts here in this manner: 
       // "Buy more than 100 items, get 50 (% or $, as per admin) off" 
       // $this->add_extra_level_discount(100, 50);
    }
  }
    function exclude_category($category) {
        switch($category) {
           case 66:
                return false;
        }
        return true;
    }
4 Feb 2008, 4:07 AM
#235
tnjon avatar

tnjon

New Zenner

Join Date:
Apr 2006
Posts:
67
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I've got
category Fragrance_
sub-16oz_
a-f
g-l
m-r
s-z
are they away to buy 10 items out of all these areas to get $10 off?

Right now I have to buy 10 out of each area to get $10.00 off.

4 Feb 2008, 6:24 AM
#236
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,758
Plugin Contributions:
56

Re: Quantity Discounts for 1.3

response by PM.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

5 Feb 2008, 5:13 AM
#237
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Hi Scott - Thanks for this great add-on. Before I go through the steps to install this, I just wanted to be clear on one thing: Does this module have to be visible store-wide, as in your example:

Store Quantity Discount Policy
Buy 10 or more of any item, get 15% off
Buy 20 or more of any item, get 20% off
Buy 30 or more of any item, get 30% off
Or can it just be utilized on a more product specific basis. For a number of reasons I wouldn't be able to have a true store-wide discount policy.

Thanks - Tim

5 Feb 2008, 7:04 AM
#238
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,758
Plugin Contributions:
56

Re: Quantity Discounts for 1.3

There are two user exits called exclude_category() and exclude_product(). You can use these to leave categories or products out. You will then need to adjust your display of the store discounting policy (if you've modified tpl_product_info_display to show the table indicated).

Now if almost everything in your store is excluded, you may want to simply use the native Zen Cart Quantity Discounting mechanism; it is designed to be applied product by product.

Good luck,
Scott

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

5 Feb 2008, 7:07 PM
#239
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

swguy:

There are two user exits called exclude_category() and exclude_product(). You can use these to leave categories or products out. You will then need to adjust your display of the store discounting policy (if you've modified tpl_product_info_display to show the table indicated).

Now if almost everything in your store is excluded, you may want to simply use the native Zen Cart Quantity Discounting mechanism; it is designed to be applied product by product.

Good luck,
Scott

Thanks for the quick reply, Scott. You are speaking of the Group Discount module in admin/order total modules, correct? Honestly I hadn't noticed it before. I've installed it but don't know how to go about using it. :huh: I've serached the forum and there are a number of mods floating around (Group Discount, Group Pricing etc) but I don't see this particular mod in the downloads section. Can you point me in the direction of a readme for it?

Also, I have your Better Together mod installed. Can I also use the Group Discount add-on at the same time?

Thanks again for your assistance - Tim

5 Feb 2008, 8:12 PM
#240
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,758
Plugin Contributions:
56

Re: Quantity Discounts for 1.3

MeltDown:

Thanks for the quick reply, Scott. You are speaking of the Group Discount module in admin/order total modules, correct? Honestly I hadn't noticed it before. I've installed it but don't know how to go about using it. :huh: I've serached the forum and there are a number of mods floating around (Group Discount, Group Pricing etc) but I don't see this particular mod in the downloads section. Can you point me in the direction of a readme for it?

Also, I have your Better Together mod installed. Can I also use the Group Discount add-on at the same time?

Thanks again for your assistance - Tim

This has nothing to do with Group Discounts. The native Quantity Discount facility is something different. It's described in the manual.

Yes, you can use Better Together and/or Quantity Discounts and/or Group Discounts together.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.