Re: Quantity Discounts for 1.3
I'm running into an issue where The Quantity Discounts is not calculating my taxes properly.
Basically I in my order total table I have a subtotal (class ot_subtotal) and a shipping (ot_shipping).
I have 2 seperate tax groups for these.
When I have a quantity discount, when It calculates the tax it is doing the following:
1) (subtotal - Quantity Discount) * product_tax_rate
2) (shipping - Quantity Discount) * shipping_tax_rate
As you can see this causes a problem as it is discounting the quantity discount twice for (only for the calculating of tax).
While this doesn't seem like much, each transaction I'm not charging approx $1 of tax that I have to pay to the government...
Anyways any help would be appreciated. I haven't yet went into the quantity discount code to look at things as I would rather not have to :)
Re: Quantity Discounts for 1.3
Your only option at this point is to set recalculate tax to none so the customer is responsible for the original level of taxes.
Re: Quantity Discounts for 1.3
Hi all!
I am looking for a mod that does exactly what this one does! - almost! A few questions then, yes?
1. If I add a category to the exclude_category() function, does that exclude it from the order product count or does it exclude that category from getting the discount?
2. Tough one I think:
I have set it up on my test machine and set Discount 1:
Code:
Discount Basis
Total Items in Cart
Counting Method
items
Discount Level 1
12
Discount Amount 1
10
I am wondering if I can modify it to do what I need, here is my situation:
My store sells items individually or sometimes by the case (a case always = 12 individual items).
If a customer buys a case of Item1 and a single Item 2, I need this to equal 13 items, not 2 items, and trigger the 10% discount on Item 2 only. My case items are mostly in their own categories, btw.
Thanks in advance for any guidance!
Re: Quantity Discounts for 1.3
1. both
2. response by PM.
Re: Quantity Discounts for 1.3
Quote:
Originally Posted by
swguy
1. both
2. response by PM.
Thanks! While I did manage to modify the mod to do what I described in my earlier post, it seems I misunderstood my client. Turns out the mod does just what they need 'right out of the box'!
Oh well! :P
Re: Quantity Discounts for 1.3
I have little problem with the Quantity Discounts Mod.
I want to setup discount by dollar spend, it works fine on USD but not on other currency.
for example, order sub-total with US$20 will get 5% discount, but discount do not apply for order sub-total with GBP£19
how to make the Quantity Discounts Mod support multi-currency?
thanks
Re: Quantity Discounts for 1.3
There's nothing built in to do this; you'd have to write code.
Re: Quantity Discounts for 1.3
There's a small bug in calculating taxes:
in [FONT="Courier New"]ot_quantity_discount::calculate_deductions()[/FONT] you calculate individual tax group tax deductions, and the total tax deduction.
PHP Code:
$od_amount[$key] = $tod_amount = round((($od_amount['total'] * $tax_rate)) /100, 2) ;
$od_amount['tax'] += $tod_amount;
However, in [FONT="Courier New"]ot_quantity_discount[/FONT] you only update the tax groups, and not the total tax. This causes problems if further order total modules calculate further discount, because they need the base price with [FONT="Courier New"]$order->info['total'] - $order->info['tax'][/FONT], but the latter isn't correct anymore.
The fix is simple:
Add this line:
PHP Code:
$order->info['tax'] = $order->info['tax'] - $od_amount['tax'];
Just around this line:
PHP Code:
$order->info['total'] = $order->info['total'] - $od_amount['total'];
Re: Quantity Discounts for 1.3
Interesting - thank you for posting. Is this still required if the sort order of tax is after Quantity Discounts? What are your other tax settings?
Re: Quantity Discounts for 1.3
I set up the Exlude categories: Here is the code:
class ot_quantity_discount {
var $title, $output;
var $explanation;
// Add categories you wish to exclude to this list.
// Go to Admin->Catalog->Categories/Products and look
// at the left hand side of the list to determine
// category id. Note that 99999 and 99998 are just given
// as examples.
function exclude_category($category) {
switch($category) {
case 5:
case 106:
case 351:
case 119:
case 357:
case 256:
case 255:
return true;
}
return false;
But it is still discounting all items from category 5. Any thoughts?!?!?
Thanks!
Melanie