Download & Extend

Discount type "Free items" not working as expected

Project:Ubercart Discounts (Alternative)
Version:6.x-2.2
Component:Code
Category:bug report
Priority:major
Assigned:Unassigned
Status:reviewed & tested by the community

Issue Summary

Hi everyone,

Please if anyone can guide me how to create a combo.

As per my understanding a combo will be more than two cart items of same or different products with some discount.

But I am failing to understand:
How to set up the counts to give discount?
What sort of discount it will be whether percentage or free items?
How to make that offer work for multiple combo purchases?
How to just give discount on items qualifying for offer?

It will be really nice if anyone can help.

Thanks & Regards,

Tajinder Singh

Comments

#1

Component:Documentation» Code
Category:support request» bug report
Priority:normal» major

Hi,

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

#2

Hi,

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

#3

Title:How to create combos?» Discount type "Free items" not working as expected

I 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".

#4

subscribing

#5

It 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.

#6

Status:active» fixed

Issue #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.

#7

Status:fixed» needs work

I 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.

#8

Status:needs work» needs review

I 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.

AttachmentSize
1181998-fix-buy-X-get-Y-free.patch 1.06 KB

#9

No 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

#10

Status:needs review» reviewed & tested by the community

I was experiencing the same problem and can confirm the #8 patch resolves it.

#11

Patch #8 does seem to fix this problem. Thanks!

#12

How do I go about applying the patch in post #8?

#13

  1. Download the 1181998-fix-buy-X-get-Y-free.patch patch file to the modules directory above the uc_discounts_alt module
  2. Change directory to the uc_discounts_alt module directory
  3. Run patch -p1 < ../1181998-fix-buy-X-get-Y-free.patch which 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.