Closed (outdated)
Project:
Ubercart Discounts (Alternative)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jun 2011 at 05:03 UTC
Updated:
24 Apr 2021 at 13:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tajindersingh commentedHi,
I am trying to make combos.
The scenarios used were:
In case of Buy 1 Get 1 free
(Scenario A)
Set Min Qualifying Quantity = 2
Set Max Qualifying Quantity = 2
Set Discount type Percentage per Qualifying product with value 0.5
Result:
This works if I am buying quantity 2 of valid product(s).
But if it goes above 2, where discount should be applied multiple times, say 4. Then it doesn't work, while it should work for pairs.
(Scenario B)
Set Min Qualifying Quantity = 2
Don't set Max Qualifying Quantity
Set Discount type Percentage per Qualifying product with value 0.5
Result:
This works if I am buying quantity 2 of valid product(s).
But it also gets implemented for any quantity above 2.
(Scenario C)
Set Min Qualifying Quantity = 2
Don't Set Max Qualifying Quantity
Set Discount type Free Items with value 1 (as we wish to give 1 item free)
Result:
It results in giving all the items for free.
------------------------------------------------------------------------------------------------------------------------------------------
I think that the setting of Discount Type to Free Items is expected to be for Buy 1 Get 1 free types. But somehow not working properly so giving all items for free.
Any suggestions please.
Thanks & Regards,
Tajinder Singh
Comment #2
tajindersingh commentedHi,
Just in case if someone else requires help.
Combos are just another name for Ubercart's Product kit, at least in case of a clothing store project I am working on.
We create Product Kits with multiple products then implement discounts on them with Discounts Alt module.
Thanks & Regards,
Tajinder Singh
Comment #3
megachrizI got the same problem as described in #1. Somehow the behaviour of the discount type "Free items" has been changed. It worked as expected in the 2.x-dev version of December 10, 2010.
An example of 1 product priced $10.
Expected result
Settings
Minimum qualification amount: 2
Discount amount: 1
Discounts
Discount 1 product in cart: $0
Discount 2 products in cart: $10
Discount 3 products in cart: $10
Discount 4 products in cart: $20
Discount 5 products in cart: $20
Discount 6 products in cart: $30
Current result
Settings
Minimum qualification amount: 2
Discount amount: 0.5
Discounts
Discount 1 product in cart: $0
Discount 2 products in cart: $10
Discount 3 products in cart: $15
Discount 4 products in cart: $20
Discount 5 products in cart: $25
Discount 6 products in cart: $30
It looks like the discount type "Free items" behaves exactly as "Percentage off".
Comment #4
mattcasey commentedsubscribing
Comment #5
fonant commentedIt appears that the "free items" discount is being applied to all possible combinations of items now, rather than only counting each item once towards the discount item count.
So for products A, B, C and a "buy two, get one free" discount, we should get the discount once, for the ABC combination. But we're now getting it three times, once for ABC, once for BCA, and once for CAB. This results in all the products being discounted, and a zero price for the cart...
I think! More research needed.
Comment #6
jrust commentedIssue #999778: Allow the selection of multiple product(s) in the "required product" qualification pulldown should resolve the issue as it makes it clearer which products are being used for determining qualification of the discount.
Comment #7
megachrizI tried the dev from September 15, 2011, but it still looks like the "Free items" discount type behaves the same as "Percentage off" or am I confused by the settings?
Can you tell me what steps I need to take in order to get the discount behave as the "expected result" described in #3? Remember that it worked like that in the 2.x-dev version of December 10, 2010.
Comment #8
mholloway commentedI think this patch cures the problem.
It applies the free items discount to every group of Min Qualifying Quantity products instead of every product.
I would appreciate someone who knows the module better then me checking it has no adverse side effects.
Comment #9
richard moger commentedNo exhaustive testing but patch #8 appears to work for me too. Thanks.
My use case: add three to cart and get the 3rd free. It works for each batch of 3 beyond first as I expect too (buy 4 get 2 free, buy 6 get 3 free etc.).
I love it when the last post in a thread has my fix!
Happy days
Comment #10
johnhanley commentedI was experiencing the same problem and can confirm the #8 patch resolves it.
Comment #11
fonant commentedPatch #8 does seem to fix this problem. Thanks!
Comment #12
hockey2112 commentedHow do I go about applying the patch in post #8?
Comment #13
fonant commented1181998-fix-buy-X-get-Y-free.patchpatch file to the modules directory above the uc_discounts_alt modulepatch -p1 < ../1181998-fix-buy-X-get-Y-free.patchwhich means "patch, ignoring one level of the file paths in the .patch file, reading from the patch file named that is located in the parent directory.Comment #14
stewart.adam commentedThis patch doesn't take into account the max number of applications settings in the discount settings. This code isn't very readable but it works:
Comment #15
wjackson commentedPatch #8 Worked for me as well. Thank you mholloway!
Comment #16
wjackson commentedPatch 8 worked, however as stewart.adam mentioned the maximum number of applications is disregarded. I created and tested a new patch that includes the implementations form comment #8 and includes the lines in #14.
Comment #17
imatosyan commentedPatch from comment #16 works, free items now behave as expected.
Comment #18
wjackson commentedI also noticed that after applying these patches that the discount was not applied to the order. On the checkout review page the discount was not present, and if the customer completed the transaction they were charged the original price.
I was able to fix this issue by applying the patch in comment #5 at http://drupal.org/node/1494522#comment-6162998
Comment #19
MBroberg commentedI was able to use patch #16 and did not need the patch in #18. Using most recent release 6x-2.4, not a dev version. Seems to give correct discounts including Review Order page.
Comment #20
loparr commentedHi,
The patch works for scenario with 1 product - buy 2x product A and get 1 free. This is ok.
What about buy 2x product A and get product B for free?
This is not working s expected if I setup discount following way:
Minimum quantity:2
Required product:A
Discount type:free items
Discounted product:B
Further limit maximum applications:checked
Anybody knows how to solve this? Thank you
Comment #21
avpadernoI am closing this issue as it's for a Drupal version that isn't supported.