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

tajindersingh’s picture

Component: Documentation » Code
Category: support » bug
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

tajindersingh’s picture

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

megachriz’s picture

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

mattcasey’s picture

subscribing

fonant’s picture

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.

jrust’s picture

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.

megachriz’s picture

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.

mholloway’s picture

Status: Needs work » Needs review
StatusFileSize
new1.06 KB

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.

richard moger’s picture

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

johnhanley’s picture

Status: Needs review » Reviewed & tested by the community

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

fonant’s picture

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

hockey2112’s picture

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

fonant’s picture

  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.
stewart.adam’s picture

Status: Reviewed & tested by the community » Needs work

This 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:

$num_groups = (int)($discount_products_qty / $discount->qualifying_amount);
$discount->times_applied = ($discount->max_times_applied == 0 ? $num_groups : min($discount->max_times_applied, $num_groups));
wjackson’s picture

Patch #8 Worked for me as well. Thank you mholloway!

wjackson’s picture

Status: Needs work » Needs review
StatusFileSize
new1.01 KB

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

imatosyan’s picture

Patch from comment #16 works, free items now behave as expected.

wjackson’s picture

I 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

MBroberg’s picture

Issue summary: View changes

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

loparr’s picture

Hi,
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

avpaderno’s picture

Version: 6.x-2.2 » 6.x-2.x-dev
Status: Needs review » Closed (outdated)

I am closing this issue as it's for a Drupal version that isn't supported.