Re: Quantity Discounts for 1.3
here is my current linkpoint settings
Linkpoint/YourPay Merchant Login
Troubleshooting/Setup FAQ
Enable Linkpoint Module
True
Linkpoint/YourPay Merchant ID
829**
LinkPoint Transaction Mode Response
LIVE: Production
Authorization Type
Immediate Charge/Capture
Set Order Status
Processing [2]
PREAUTH Order Status
Pending [1]
Refund/Void Order Status
Pending [1]
Sort order of display.
0
Payment Zone (restrict to)
--none--
Fraud Alerts
Yes
Enable Database Storage
True
Debug Mode
Failure Alerts Only
Re: Quantity Discounts for 1.3
Re: Quantity Discounts for 1.3
Thanks that worked!!
http://www.zen-cart.com/forum/showpo...&postcount=382
##############################___
Re: Quantity Discounts for 1.3
Hello:
I have hit a wall with my website. I have installed the quantity discount addon and it works perfectly. The user exits are a great feature. My problem is I need to be able to use the user exits for only a select group of members. Is it possible to merge both group pricing and quantity discounts so that only people in group a get the quantity discount. I have seen this asked before but never an answer to the problem. I know there is going to have to be some programming here but do not know where to start. Any help is much appreciated.
Josh
Re: Quantity Discounts for 1.3
Quantity Discount Levels For Separate Categories:
SWGuy: I have seen this question posted 4 times in this thread, (and it is a long one) with no real answer.
ZC version 1.3.8 - your Quantity Discounts module 1.10 installed and working.
The Admin/Order Totals/Quantity Discounts is installed, no tax or tax calculations, discount units by percentage, Discount basis by category, counting method = Items.
There are no standard Zen Cart discount structures applied in the whole shop. The only other mods are Purchase Order (a payment mod encountered only after Order Totals) and Columns.
The discount structure applied in the Admin/Order Totals/Quantity Discounts module is: 5 to 10 items=5% discount, 10+ is 10%. The rest are blank. This works OK, and discounts are excluded on the "Excluded Categories" in the modules/order_totals/ot_quantity_discount file.
The basic problem is that the user exit for categories with separate discount policies will NOT override the default discount listed in the Admin section.
Here is the code from that section of ot_quantity_discount.php
// 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 29:
if ($count > 10) {
$disc_amount = 5;
}
break;
case 99997:
$disc_amount = 75;
break;
}
}
Here's the deal: If I order 9 of the units in Category 29, I should get no discount. But I get the standard 5% as entered in Admin. I will eventually expand this to have different discount rates on about 5 other categories, and order and install most of your commercial mods, but I have to get this working first.
Yes, this the correct parent category for the products listed under it. I am also required to make the discount for the same category go to 10% if 25 items are purchased. I tried it various ways, but syntax errors on my end crashed the page when trying to add the next level into this code section. Let's keep it simple and get a single one working first........
Any advice would be appreciated.
Re: Quantity Discounts for 1.3
You have not coded the behavior you want explicitly. Instead of:
Code:
case 29:
if ($count > 10) {
$disc_amount = 5;
}
it sounds like you want
Code:
case 29:
if ($count <= 10) {
$disc_amount = 0;
} else if ($count > 10) {
$disc_amount = 5;
}
Re: Quantity Discounts for 1.3
Thanks for the fast response. I am trapped over the weekend in Toronto in a hotel with nothing to do, but you should take more time off.......
That part almost works. I tried the "else if" statements before bugging you, but had the brackets in the wrong place. (I guess that's why you make those big bucks....) I am an HTML wizard, but PHP isn't as forgiving.
Anyway, that works, except for when I enter 10 items exactly. 9 items shows no discounts at all, and 11 gives me 5%, but 10 exactly gives me the default 10% in the Admin setup.
function apply_special_category_discount($category, $count, &$disc_amount) {
switch($category) {
case 29:
case 30:
if ($count <= 9) {
$disc_amount = 0;
} else if ($count > 10) {
$disc_amount = 5;
}
I need to also have the ability to change the discount to 10% if the items exceed 25. I have searched high and low on your pages and the forums while attempting to make it happen, and crashed the PHP repeatedly in my attempts.
You get enough of the whiners wanting freebies, but lastly, the override of the category discount in this page does not seem to add up the totals between the two (or more) listed categories to determine the discount level. The default settings in the Admin section of your mod work perfectly in the categories that don't need the override........
Is this a syntax error on my part, or is this something you could do for me on a commercial basis?
Thanks again, and try to get out more.......:smile:
Re: Quantity Discounts for 1.3
Re: Quantity Discounts for 1.3
Hi,
I've noticed an error in the amount of tax displayed in the transaction as follows:
I am in the UK with tax rate of 15% applied to goods and shipping. For the purposes of this example i am using a product at £10 with a discount rate of 10% and free shipping.
The checkout totals should be:
Sub-Total: £100.00
Free shipping (Free shipping): £0.00
Quantity Discount: -£10.00
Included VAT @ 15%: £11.74
Total: £90.00
However, they are displaying as follows:
With Include Tax: True, Recalculate tax: None:
Sub-Total: £100.00
Free shipping (Free shipping): £0.00
Quantity Discount: -£10.00
Included VAT @ 15%: £13.04 (the tax on £100 - incorrect)
Total: £90.00
With Include Tax: False, Recalculate tax: None:
Sub-Total: £100.00
Free shipping (Free shipping): £0.00
Quantity Discount: -£8.70
Included VAT @ 15%: £13.04 (the tax on £100 - incorrect)
Total: £91.30
With Include Tax: True, Recalculate tax: Standard:
Sub-Total: £100.00
Free shipping (Free shipping): £0.00
Quantity Discount: -£10.00
Included VAT @ 15%: £11.54 (the tax on £88.50 - correct)
Total: £88.50
With Include Tax: False, Recalculate tax: Standard:
Sub-Total: £100.00
Free shipping (Free shipping): £0.00
Quantity Discount: -£8.70
Included VAT @ 15%: £11.73 (the tax on £89.99 - correct)
Total: £89.99
Therefore, none of the combinations allow the checkout totals to display correctly. The discount should include the tax and the tax should be calculated based on 15% of the total, not 15% of the subtotal.
Any help on this issue would be much appreciated.
Re: Quantity Discounts for 1.3
It appears to me that this is a ZC issue rather than a module issue. Bug report posted here:
http://www.zen-cart.com/forum/showthread.php?p=713637