accidentally duplicated my post
Printable View
accidentally duplicated my post
Ok, please clarify
I have no linked products. The category I want to apply a discount to is category 27 (see diagram below)Men's Clothing (10)So I made the following edit to ot_quantity_discount.php
|
----> Stylish Shirts (27)
| -------> shirt A
| -------> shirt B
| -------> shirt C
|
----> Batik Shirts (16)
| -------> shirt A
| -------> shirt B
| -------> shirt C
is this the recommended method?Code:function apply_special_category_discount($category, $count, &$disc_amount) {
switch($category) {
case 27: // Discounts Stylish shirts
if ($count > 1) {
$disc_amount = 10;
}
if ($count > 4) {
$disc_amount = 20;
}
break;
case 99997:
$disc_amount = 0;
break;
}
}
Bespoke customizations are the kind of thing I do on a commercial basis. Email me your requirements for a quote.
All I need is a discount on one category.
I mod already does this, doesn't it.
Thanks for this module, its exactly what my client wanted. The discount is working properly, but on the Payment Information Page (Step Two of the Checkout), it just displays the product sub-total, the discount, and the total (including shipping) -- however, it doesn't actually show the shipping charge, so it looks weird. The numbers are right, it just seems wonky until you remember that there is a shipping fee that isn't displaying. Am I doing something wrong? Is there a setting that I missed? Any help would be greatly appreciated.
http://www.prairierosenaturals.ca/
You just need to turn on the shipping order total module under admin->modules->order total. Set the sort order so that it's unique and above the total.
There are four tax settings in Quantity Discounts (two options with two choices each). If you want more, you'll have to make the changes yourself or hire me or someone else to make them.
The checkout logic is changing completely in 2.0 and presumably there will be even more options at that point. But you should know that many, many UK businesses are using this software as is.
I have a configuration question. My client wants 3 specific categories to have tired quantity discounts. I was able to set this up in the apply_special_category_discount() function, with cases for each category id and and if/elseif structure to check the $count and determine the $disc_amount. This is working fine right off the bat. Problem is, of course, my client can't change this discount setup in admin and it's kinda weird to show the discounts in the product template since all the actual admin discount fields are still zero - after all, I coded all the discounts.
On top of that, nowhere in the cart is there a note about the discount. The discounted price shows accurately, but there's never any indication that there's a discount in play. It just shows a lower unit cost all the way through.
So I am wondering - does it make sense to duplicate the module (twice) so the three categories of discount can be set up and managed in admin? Can it be done? Am I missing an obvious method that everybody else already uses?
Thanks,
Frank
What I tell people to do in cases like this is simply get rid of the explanatory link and customize the marketing text on the product info page. You certainly *could* clone the module 2x but this wouldn't be the direction I would recommend.
I kinda figured, since I had it working, some Q&D solution on marketing text was the way to go.
As for checkout, I know you sell the Discount Preview module to show the discount in the cart, but isn't it supposed to tell you somewhere during checkout about the discount savings?
Thanks for the super fast response.
Frank
It does tell you on the payment page and the checkout confirmation page. I missed this question the first time I read your post. You should see a subtotal and then the discounts subtracted off that. If not, check the sort order of Quantity Discounts in Admin.
I understand what you said. What I said was, if you don't like the numbers you're getting, you will need to either change the software yourself or hire someone like me to do it for you. Tax changes are incredibly time consuming and tedious and I can't do them for free.
I have my product info hack in place and it's great. I have another question, this time about the Discount Preview module.
Since I have used the "exits" to spot specific categories to discount products based on the quantity, will the Discount Preview module still work properly? Using exits hasn't had any other ill effects, but I figure I should ask before I assume.
Thanks,
Frank
My commercial software is not supported on the Zen Cart forum; please send me questions by email.
OK, i appreciate you taking the time to develop this mod give support on this thread.
What i am saying is that your mod appears to not work properly. If you want to look into it and do something about it then feel free. It may be advisable to verify if this is correct, and then update the downloads section to state that it does not work properly.
Thank you!!!
My search has brought me here, I've read the README but I just need a confirmation that I need to install this module.
My client would like a 2 percentage discount tiers based Total Order Value (i.e. 10% off at $50, 20% at $100). However, some products (specials) are exempt from the discounts, i.e. items that already have product quantity discounts applied. This module does just this?
Built-in group pricing has no exemptions?
You can discount by dollars spent in tiers and you can exclude specific products or categories - but they have to be enumerated (12,13,15, etc.).
is there any extension mode that offer discounts to certain groups only?
See PM.
I need only to apply a currency discount level only to price group 'number one'. So I think it needs only an easy modification and not an additional complex mod.
Sub-Total not displaying correct.
When you make a purchase that qualifies for a discount the "Extended Price" is correct.
The next line "Quantity Discount" shows the correct discount amount in dollars.
The next line "Sub-Total" does not reflect the discount. Sub Total shows the above Extended price giving appearance quantity discount is not applied.
The Total Price. does show the correct amount.
It is important that the "Sub-Total" reflect the discount because when shipping internationally value of goods shipped customer may have to pay a tax on the value paid for the product which should be the Sub Total less discounts and shipping cost.
Could someone provide help in subtracting discount amount from extended price to = Sub-Total? see below example.
Products Model Tax Price (ex) Price (inc) Total (ex) Total (inc)
3 x EZorb Calcium Capsules 822392001225 $39.95 $39.95 $119.85 $119.85
Total Weight is 1 lbs. 11 oz.
Quantity Discount: -$8.39
Sub-Total: $119.85
Flat Rate (Best Way): $6.95
Total: $118.41
The subtotal is not a running value. You'd have to write code to get the display you're looking for; you can't just change the sort order.
Is there a way to change the products_id to products_weight or products_sort_order?
function apply_special_item_discount($id, $count, &$disc_amount) {
switch($id) {
case 1:
if ($count > 1) {
$disc_amount = 15;
}
break;
case 2:
$disc_amount = 20;
break;
}
}
Thanks in advance :-)
Could you point me in the direction of the chunk of code to be revised?
I'd really like to be able to have quantity discount by either weight or sort order
Response by PM.
Instead of applying a discount, we would like to apply a surcharge. We thought that by adding a negative percent, it would work. But alas, it doesn't. Is there a way to do this easily?
Thank you, jim
Hello
Is it possible to include the quantity discounts table for each product on the product listing?
Thanks
Andy
There's nothing built in to do this; you'd have to write code but it could be done.
Not sure what's meant by "put the tax above the discount". I'm also using the Local Sales Tax mod, along with your great discount mod (customized so it only works with one category). No matter how I set "include tax", it still charges the tax on the full amount, not the discounted amount. The tax calculation is correct, it's just not "seeing" the discounted price.
Thanks for your help!
Response by PM.
Hi,
Can I make quantitu or total amount discount like in the case of :
https://www.interprojekt.com.pl/wate...tor-p-420.html
No - must be one or the other.
I'm using your module so that I can offer a discount based on total number of items in cart and it works great. I just started using Google Checkout and it won't take the discount into consideration when calculating sales tax. Example
Original price $10.00
Discount 5.00
Total $5.00
Sales tax 6% is $.60 instead of $.30
Any ideas?
we use a michigan state tax for only orders in mi but your quantity discount puts the tax on every transaction, do you know how I can fix this?
Thank you very much for your time.
I'm running 1.38a using the quantity discount module as well as the discount preview mod. I have set up my discounts simply to be an absolute $ discount depending on the quantity ordered...with no limitations based on category, etc. This is working fine. Now, I wanted to temporarily offer a category specific coupon using the regular zen-cart discount coupon system...but I am running into a problem.
To simplify things, assume all of my products are $5.00 each. I offer a $1 quantity discount for each product with the purchase of 5 or more products.
Now I want to offer a 12% discount coupon only on one category. When I use that coupon and only choose products within that category, the system works fine. However, if I choose products both within and without that category it does not work properly.
Here is what happens. If I order 5 products all within the discounted category...the checkout shows something like this: Total $25...quantity discount $5...discount coupon....$2.40... (That is the correct amount, namely that it applies a 12% discount based on the $20 price reflected after first applying the quantity discount.)
However if I then add a 6th product which is not within the discounted category...I get the following: Total $30....quantity discount $6....discount coupon $2.28....(What has happened is that the discount coupon, instead of calculating based on a total of $20 is instead applying the discount to only $19. This apparently results from the coupon correctly applying the discount to the correct number of products (5)...but basing the $ amount of the discount by deducting all of the quantity discounts, not just the quantity discounts applicable to the products for which the coupon is intended.)
So I wondered if there is a workaround for this problem?
Thanks
Try changing the sort order of coupons so that it is before quantity discounts.
I just tried that but it does not solve the problem. In case I was unclear before I do want the discount to be taken on the price after the quantity discounts....but only as to those products which are included within the category where the coupon applies.
If I change the sort order as suggested then the 12% discount is applied to the Sub-Total price (i.e. the price before the quantity discount.)
So in the examples I gave before, with 5 items priced at $5 each the coupon then incorrectly becomes valued at $3 instead of $2.40(i.e 12% of $25 instead of 12% of $20).
The only good news is that when I then add a 6th item (which is not part of the coupon discount) then the coupon discount does not change....it remains at the (incorrect) amount of $3.
So I still am unable to correctly apply a discount coupon restricted to just one category when I have quantity discounts applied to all categories.
Quick reminder for new users and people who just want to learn more about Quantity Discounts: there is extensive documentation, examples, code fragments, frequently asked questions, etc. available on my home page. The link is in the readme file, or you can just go to my home page and click the Zen Cart link and search for Quantity Discounts.
I only update the readme file in the contribution when I update the software, but the documentation on my home page is updated constantly. Quantity Discounts is over three years old, so chances are, someone has had the same questions you're having and I've put answers on this page.
I'm positive someone has asked this before, if only because the link I followed to the mod explicitly said it, but unfortunately zen search won't find it using any strings I can think of that might have found it!
On the FAQ in your Better Together page, one of the questions is:and the answer wasQuote:
Can I do three for the price of two? Four for the price of three?
. So, went there, installed that, but I'm going crazy here - I can't see anything that will permit me to effectively have 'buy three items from x cat, get the third free'. Yes, I could code a 33% discount in there which would make the above example work, but what about where items in category x have different prices? Basically then, we're looking for 'buy three items, get the cheapest free'. I thought from the text on the QD page that such a thing is feasible - am I wrong?Quote:
No. But Quantity Discounts can do this sort of discounting.
I should change this wording because it's confusing. The real answer is, "you can do this with Quantity Discounts if you're willing to write code and use the user exits. "
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 :)
Your only option at this point is to set recalculate tax to none so the customer is responsible for the original level of taxes.
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:
I am wondering if I can modify it to do what I need, here is my situation:Code:Discount Basis
Total Items in Cart
Counting Method
items
Discount Level 1
12
Discount Amount 1
10
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!
1. both
2. response by PM.
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
There's nothing built in to do this; you'd have to write code.
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.
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.PHP Code:
$od_amount[$key] = $tod_amount = round((($od_amount['total'] * $tax_rate)) /100, 2) ;
$od_amount['tax'] += $tod_amount;
The fix is simple:
Add this line:
Just around this line:PHP Code:
$order->info['tax'] = $order->info['tax'] - $od_amount['tax'];
PHP Code:
$order->info['total'] = $order->info['total'] - $od_amount['total'];
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?
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
I wrote a page on how to debug problems like this.
http://www.thatsoftwareguy.com/zenca...ry_issues.html
Hello,
I'm wondering about installing the marketing portion.
Can i add the code to my ALREADY EXISTING product_info pages???
What is the purpose of creating a new page?? Do i need to do this??
Thanks!
The marketing text is designed to go on your product info page. You could put it on a separate page too if you want, or on your main page. It's up to you.
There is a separate page called a "Promotional page" which is completely optional. In the case of Quantity Discounts, it seems like overkill; it makes more sense for Better Together. But it's there for you to use if you'd like to.
Response by PM.
I have installed this mod and I think its great...however...I am having a bit of an issue with it discounting my gift certificates..is there a way I can have this mod not discount the gift certificates? BTW: I have my GC's configured correctly.
Thanks
There are two user exits called "exclude_category" and "exclude_product" that are designed to do just that. Examples are provided in the FAQ:
http://www.thatsoftwareguy.com/zenca...ounts.html#faq
Perfect! Thank you. Works excellent! :hug:
I have another question for you that I hope you can answer. I have a store that has wholesale pricing, however, I cannot use the wholesale mod due to store owner wanting to apply a percentage discount to total order instead of applying a wholesale price per item. Can I use your module to apply discounts to total order? (example: 45% off total order to certain wholesale level such as 1, 2, 3, 4, Each level offers a different discount on total order)
Would you have a module available to purchase if no freebie available to help me achieve this?
Thanks
Can I set up the discount range like this:
75.01-150.00 or does it need to be just one price in each discount?
If it needs one price in each discount area, how do I set up more than the default of 5 discount areas in admin?
Thanks
Glad you're all set. It's a good practice to post your solution so that others with the same question can benefit from your findings.
You are correct...
What I done was just add a single number such as 75.00 to a discount instead of 75.00-100.00 and then added the other single discount levels below the first one. Seems to total correctly...although I still need to test more...didn't have the extra time this morning to do so. If I have any issues with the way its set-up now, I'll post. If I don't, then that means all is well.
Pkat
Oh I see. Yes, the 5 "Level" fields are single values. If your discounting starts at $75.00, then Level 1 should be 0 with Amount 1 0, Level 2 75 with the Amount 2 being the discount for 75-150, Level 3, 150, with Amount 3 set to that discount level, etc.
Hi,
I have installed the promotional page mod but I don't seem to be able to find the page anywhere. I'm sorry but I'm new to this. Maybe someone can help me out? I believe I need to edit the page too?
I have updated discount rules on my Quantity Discount mode.
Thanks!
You need to add a link to the page in one of your sideboxes. I believe the instructions suggest using the Categories sidebox, but use whichever sidebox your site displays that looks good to you. You can go directly to the page using
YOURSITE.com/index.php?main_page=quantitydiscounts_promo
Thanks Scott. I've found it - actually it was there all along but it's on the same line as All Products which is why I didn't notice it. Any idea how to move it to the next line? I have placed <br> to link for All Products but still Quantity Discounts is appearing on the same line.
Posted via Mobile Device
Review step 3 in the README. You've done something wrong.
The gray haired blonde is back.
Here is what I hope to do. is have the SAME quantity discount percentage applied to ALL products in
Similar to what is here
but it needs to have "hard" increments (the pricing is based on shelf packs.)
And, that I need only do it ONCE rather than for EACH Product.
Is this the correct mod to be used for this purpose?
Thank you as always for your excellent support.
Peace of the Season
Wheat
http://www.ItsAllJustString.com
You can do this but you'll have to write some code - the idea of hard increments is not built in.
any way to accomplish something like this (i pasted it below)?
i have 3 categories, PLANS, DVDs, and T-shirts.
T-shirts category should have no quantity discounst.
Plans and dvds have different quantity discounts.
and there are many as you see, way more than 5.
------------------------------------------------------
Get any ONE series of the construction plans for only
$19.95
Get any TWO series of the construction plans for only
$34.95
Get any THREE series of the construction plans for only
$49.95
Get any FOUR series of the construction plans for only
$64.95
Get any FIVE series of the construction plans for only
$79.95
Get any SIX series of the construction plans for only
$94.95
Get any SEVEN series of the construction plans for only
$109.95
Get any EIGHT series of the construction plans for only
$124.95
Get any NINE series of the construction plans for only
$139.95
Get any TEN series of the construction plans for only
$154.95
Get any ELEVEN series of the construction plans for only
$169.95
Get any TWELVE series of the construction plans for only
$184.95
Get Any THIRTEEN series of the construction plans for only
$199.95
Get Any FOURTEEN series of the construction plans for only
$214.95
Get Any FIFTEEN series of the construction plans for only
$229.95
Get Any SIXTEEN series of the construction plans for only
$244.95
Get Any SEVENTEEN series of the construction plans for only
$259.95
Get Any EIGHTEEN series of the construction plans for only
$274.95
Get Any NINETEEN series of the construction plans for only
$287.95
Get Any TWENTY series of the construction plans for only
$299.95
Get ALL TWENTY ONE series of the construction plans for only
$309.95
Get either of the construction videos/dvd's for only
$19.95
Get BOTH of the construction videos/dvd's for only
$35.95
Get it ALL for only $319.95
------------------------------------------------------
Normally can accommodate more than 5 levels using the add_extra_level_discount command, but since yours are different on a per category basis, you need to look at the apply_special_category_discount function.
You can exclude t shirts from discounting using the exclude_category or exclude_product functions.
Here's the help:
http://www.thatsoftwareguy.com/zenca...discounts.html
I apply QD on a category basis and the blurb on select product pages reads:
"Get 10% off when you buy 10 or more items in this category" etc
Is it possible to state the actual category rather than "items in this category", eg
"Get 10% off when you buy 10 or more widgits" where "widgits" is the immediate category.
Or would doing this be too specific for my own good?
There's nothing built in; you'd have to add code to do this.
For PayPal Express and Discounts, see this post:
http://www.zen-cart.com/forum/showpo...1&postcount=15
ok cool thank you, so is there also a fix for paypal ipn, or just for paypal express?
Are you having this problem with IPN too? I thought you said just paypal express.
I have the Checkout Without Account (Fast and Easy Checkout mod) installed, and when customer chooses to pay with Paypal IPN, he gets charged full price instead of the discounted price, even though the discounts do show up in cart and on order page.
Now I don't know yet whether the correct total is being passed to payment gateway (authorize.net emulator). We haven't had a qty discount authorize.net sale, but the store has only been live for one day.
Everything appears to be correct in ZenCart Admin, discount and correct total displays on the order, the only thing I can see that's wrong is Gross Amount: in the payment section of the order.
I have heard of reports of problems passing discounts to paypal recently but don't know the root cause.
I have installed this module, on my store zen-cart 1.37,
I have a product in multiple sub-categories, the discount works fine when I add the product selected from the category I set it up in.
The problem lies when I select the same product from a different category it does not add the discount.
The master categories id is used in category computations, so if you have copied the product from category A to category B, the one in category B will use category A as its category id.
This what I have setup:
// Add all linkages here
$this->add_twoforone_cat(4);
The product is all also in 6_13.
Does this make sense?
If you copied the product (instead of linking it), you would have to do an $this->add_twoforone_cat(13); or do an add_twoforone_prod on that particular product if the former is not appropriate.
Thanks so much for your quick reply.
I've got this installed and it's working great except...
I've added the code for 'Quantity Discounts Contribution Example 5 Marketing Text' described on the web page.
My web page is displaying: "Priced as low as in quantities of or more." Notice there are no numbers, what's wrong?