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 701 to 720 of 847
31 Oct 2012, 3:34 PM
#701
shopville avatar

shopville

Zen Follower

Join Date:
Aug 2012
Posts:
331
Plugin Contributions:
0

Quantity Discounts for 1.3

Thanks everyone! the problem was that the item was set to be priced by attributes and therefore didn't calculate the discount.

I did however install the contribution but couldn't figure setting the discount to a specific item.

31 Oct 2012, 3:41 PM
#702
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

The Quantity Discounts contribution is not designed to apply a discount to a single item; it's designed to apply a discount to all items. If you want a quantity discount on a single item, you should use the built-in facility for doing this.

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.

20 Mar 2013, 4:04 PM
#703
dave224 avatar

dave224

Zen Follower

Join Date:
Jun 2012
Posts:
481
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I have an issue with quantity discounts and group discounts. I want to subtract the quantity discount from the order subtotal, compute the group discount on the result and subtract it from the subtotal. Then I want to add the shipping cost and compute tax on the result. When the tax is zero, everything is calculated properly, but when the tax is non-zero, the amount used to compute the group discount is wrong. It is too low by an amount equal to the tax on the quantity discount. The quantity discount amount itself is correct. I have the include tax control set to false and the recalculate tax control set to Standard for both quantity discount and group discount. Quantity discounts has a lower sort order than group discounts.

If I set the quantity discount control for tax recalculate to None, the quantity discount amount and group discount amounts are correct but the tax on the order is wrong, being too high. Any suggestions for setting the controls or is this a bug?

I'm using Zen Cart 1.5.1. Thanks in advance!

Dave

20 Mar 2013, 5:14 PM
#705
dave224 avatar

dave224

Zen Follower

Join Date:
Jun 2012
Posts:
481
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Works great! Thanks for the quick response.

Dave

5 May 2013, 2:15 AM
#706
makatak88 avatar

makatak88

New Zenner

Join Date:
Feb 2010
Posts:
26
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Hello. This is probably a really stupid and basic question. And I have read the documentation and...well and least some of the posts. I have 2 products of Jeans. Jeans A and Jeans B. both are RRP $59.95. I want to be able to provide a discount of $9.95 if the customer buys four of either Jeans A or Jeans B or a combination of both eg: 2 of Jeans A and 2 of Jeans B. Is this Mod capable of doing this- I understood it could? I have installed the module no problems. But for the life of me cannot work out how to apply the module to these products!? Surely the discount does not apply to every product in the store.?

5 May 2013, 10:20 AM
#707
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

Actually, the discount does apply to every item in the store. :)

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.

6 May 2013, 10:34 AM
#708
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

If you downloaded Quantity Discounts in the last 3 weeks, please make this small change to ./includes/modules/order_total/ot_quantity_discount.php - at the bottom of the file in the function setup() change

       $this->add_extra_level_discount(500, 55);

to

      // $this->add_extra_level_discount(500, 55);

i.e. comment the line out - this was only intended as example code. Thanks to Tim Lester for spotting this.

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.

13 Jun 2013, 3:07 AM
#709
jetx avatar

jetx

Zen Follower

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

Re: Quantity Discounts for 1.3

Is it possible to exclude all categories except for specific categories (without listing every category to be excluded)?

13 Jun 2013, 3:44 AM
#710
jetx avatar

jetx

Zen Follower

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

Re: Quantity Discounts for 1.3

^^^

It's ok, I figured this out.

13 Jun 2013, 4:52 AM
#711
jetx avatar

jetx

Zen Follower

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

Re: Quantity Discounts for 1.3

Another question. Is there a way to only show the discount table for products in the categories not excluded? Due to the high number of products in the two categories I need this particular mod for I would prefer to use this mod, if possible, over the zencart discount feature.

13 Jun 2013, 5:02 AM
#712
jetx avatar

jetx

Zen Follower

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

Re: Quantity Discounts for 1.3

Alright, found the answer to that question as well.. can't be done it appears, it will either show on tpl_product_info_display or it won't.

30 Jun 2013, 9:22 PM
#713
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Quantity Discounts for 1.3

Could we run two copies of the script to produce two different scenarios?
First one uses a category and pricing structure of buy 2 get one free (and that scaled for the 5 discounts)
Second one to use a load your cart with 8 items get 20% off your order (then scale for the 5 discounts)

10 Jul 2013, 3:04 AM
#714
dimsumgurl avatar

dimsumgurl

Zen Follower

Join Date:
Dec 2009
Location:
Canada
Posts:
160
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Hello! I am unble to find the answer to my question so I will post it here:

As of now

   // Add categories with special discounting policies to this list.
   // Note that 99999, 99998 and 99997 are just given as examples.
   // Note that the Discounting Units you specified in Admin
   // (percentage, currency, currency/item) are also used here.
   function apply_special_category_discount($category, $count, &$disc_amount) {
      switch ($category) {
         
         case 66:
            if ($count > 1) {
               $disc_amount = 30; 
            }
            break;

What do I have to do to get the next level of discount within the same category? I'd like to have (buy 2, get 30% off, buy 3 get 50% off)

EXAMPLE

case 66:
if ($count > 2) {
$disc_amount = 50;
}
break;

10 Jul 2013, 10:10 AM
#715
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

switch ($category) {
         case 66:
            if ($count >= 3) {
               $disc_amount = 50; 
            } else if ($count == 2) { 
               $disc_amount = 30; 
            } 
            break;

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.

10 Jul 2013, 12:48 PM
#716
asdfwen avatar

asdfwen

New Zenner

Join Date:
May 2012
Posts:
30
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I installed your module. I noticed the discount will be shown in checkout page. can the discount be shown on cart page? I mean the discount will be reduced at cart page rather than at checkout page. If so, how? Thanks for your reply!

18 Jul 2013, 7:01 PM
#717
pudzpud avatar

pudzpud

Zen Follower

Join Date:
May 2009
Posts:
156
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Brilliant Module, just have a few questions (had loads but found out most answers in this thread - thanks).

Can I remove the quantity discount box from categories where I offer no discount (currently it shows the box and heading on everything, even when no discounts set-up).

How do I change the text at checkout from Quantity Discount to something else? (searched on here and tried developers tool kit search but cannot find where the text is coming from - is not a link on my checkout if that makes any difference).

I'm using 1.3.9h

Thanks

18 Jul 2013, 9:47 PM
#718
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

Question 2: change includes/languages/english/modules/order_total/ot_quantity_discount.php

Question 1: See note #3 after the marketing text examples.
http://www.thatsoftwareguy.com/zencart_quantity_discounts.html#marketing

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.

6 Aug 2013, 9:22 AM
#719
snk060 avatar

snk060

New Zenner

Join Date:
Aug 2013
Posts:
56
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Thank you

6 Oct 2013, 9:03 PM
#720
mikecnz avatar

mikecnz

New Zenner

Join Date:
Mar 2009
Location:
New Zealand
Posts:
76
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Hi,

I am using the Swipe HQ payment module, I also have quantity discounts installed. For some reason on the order confirmation e-mail the discount gets taken of the total twice - it doesn't do this anywhere else, just on the confirmation e-mail and only when using the swipeHQ payment module.

Below is the code I believe to be responsible for sending the order confirmation e-mail from the swipehq module:

//send emails
if (!empty($_REQUEST['user_data'])) {
$order_id = $_REQUEST['user_data'];
if (!empty($SESSION['swipehq_order' . $order_id])) {
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
require_once('includes/languages/english/checkout_process.php');

require_once(DIR_WS_CLASSES . 'order.php');
require_once(DIR_WS_CLASSES . 'payment.php');
$payment_class = new payment($_SESSION['payment']);
$order = unserialize($SESSION['swipehq_order' . $order_id]);

require_once(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;
$order_totals = $order_total_modules->process();
$order->send_order_email($order_id, 2);

$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_SEND_ORDER_EMAIL');
}

}

For some reason this is causing zencart to take the discount of the total twice (but only on the order confirmation e-mail).

Below is an example of what the confirmation e-mail looks like:

Sub-Total: $135.60
Fastways Courier
(Delivery to 2110 - Please allow 2-3 working days for delivery once payment has been confirmed1 box(es) 1.16kg(s)): $4.50
Quantity Discount: -$6.78
GST: $16.52
Total: $126.54 (This should be $133.32, but instead of the correct discount of 6.78 being applied, 13.56 is being taken of the total)

I have e-mailed SwipeHQ re this, but they say it is due to the mods I have installed and can't help.

I believe it is the code below that is causing the problem, but can't figure out what I could change to get the confirmation e-mail sent with the correct total.

require_once(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;
$order_totals = $order_total_modules->process();

Any help would be very appreciated.

Thanks,

Mike.