I'm very surprised that this hasn't been posted....makes me think that I'm doing wrong or there is something wrong with my specific setup...but I can't get coupons to apply to Product Kits.

I've triple-checked everything. I set Applicable Products to the correct NID and set up the coupon... but no luck. When I try to use a coupon on a Product Kit it says that there is no applicable product in my shopping cart.

I'm using Ubercart RC3 (Can't upgrade to RC5 yet b/c of recurring fees)...would this be the issue? I experienced this with both 6.x-1.3 and 6.x-dev.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vood002’s picture

shameless self bump--anyone know what the deal is with this?

longwave’s picture

Product kits have to be handled as a special case in some Ubercart modules, perhaps this is the case with uc_coupon as well, I don't think I have done any testing with product kits so far. I haven't had much time to work on this module recently but this issue is on my to-do list when I do find time - alternatively patches or suggestions on how to fix this are welcome.

ShaunDychko’s picture

If I may give this a bump up, I also would like coupons to apply to product kits.

xrampage16’s picture

Assigned: Unassigned » xrampage16
FileSize
1.53 KB

This patch that I created adds an array to keep track of the product_kit_id.

Before checking anything else, it checks to see if the ['kit_id'] is set for an item. If so, and it is not part of an array which holds the nids of the product kits, it adds the nid to the array, and sets the applicable_total to the coupon value.

Also added in the ability for percentage and price.

Percentage is handled in a normal fashion, but does so for each item (in order to ensure that the total amount discounted is correct)
Pricing is only handled once, and the applicable_total is set once, and then the rest of the products in that product kit are ignored.

longwave’s picture

Assigned: xrampage16 » Unassigned
Status: Active » Needs review

Thanks, will look at this when I next find time to work on this module.

longwave’s picture

Status: Needs review » Needs work

This patch needs some work to apply to the -dev version, and also I don't think it will support coupon restrictions properly - we need to decide what to do if for example a product kit includes two products, and the coupon excludes one of those products.

KMNL’s picture

+1 for this being a priority. I'd much prefer to have a coupon apply to kits of items than a preset/fixed bundle discount. (+$ to get it done)

2dogrc’s picture

I too would throw some $$$ in a pot to get this working right. Why make a module 90% working with stock Ubercart installations? Also if you know of the limitation it would be nice if it was listed in the description. They we could find the appropriate modules to work.

Anyway, lets see if we can get some others to help get the cash to finish this up!

2dogrc

Daniel Norton’s picture

++

dirtysteak’s picture

+1 for adding this feature.

It is frustrating because Ubercart's handing of discounts applied to kits is lacking as well
(can't apply a percentage discount, can't restrict which product attributes are part of the kit).

I was hoping this would be a work-around.

I would love to step up to fix this, but I have only just started the learning curve on PHP....we could certainly offer $$ to help fund development if someone is willing to put forth a proposal.

j0rd’s picture

I need this feature or maximum quantity discounts for a site I'm working on.

The site essentially has 1 product, but uses product kits to provide discounts on that item with multiple quantities (think 2 in a pack, 10 in a pack). I need a way to provide coupons to these packs, but currently uc_coupon only regonizes the product and not the kit.

Additionally there's no limitation for coupons on maximum quantity or price.

EvanDonovan’s picture

Looks like xrampage16's patch is still the newest one in the queue. Usually patch reviews/re-rolls go farther than +1's in the Drupal community, I've found.

I may have to re-roll in order to make it apply again. If I do that, I will post the re-rolled version here.

wodenx’s picture

See also #1199592: Coupon applying to Product Kits even though Product Kit class not checked. I have been slammed lately and unable to get to this - but it's at the top of my list after critical bug fixes.

wodenx’s picture

Version: 6.x-1.3 » 6.x-1.x-dev

I have committed a first-pass to D6 DEV (see #1199592: Coupon applying to Product Kits even though Product Kit class not checked). This allows you to specifically include or exclude product kits. However, the handling of minimum quantity restrictions, and application of the discount on a per-product basis is more problematic. When I get a little more time I'll get that working properly. In the meantime, if you configure a coupon to apply to matching products (all, most expensive, least expensive), it will apply as though all products had been added individually - not to the kit as a whole. Similarly, the minimum quantity restrictions will be applied to the total of all products in the cart, not treating a product kit as a single item.

EvanDonovan’s picture

Title: Coupons will not apply to product kit » Coupons will not apply to product kit: followups

@wodenx: Thanks so much! That will be sufficient for my needs, I think.

What should we re-title this issue since it sounds like you're saying that products that are added to a cart via a kit get a discount now?

wodenx’s picture

Title: Coupons will not apply to product kit: followups » Coupons will not apply properly to product kits

How about that?

wodenx’s picture

Same fix committed to D7.

EvanDonovan’s picture

What about percentage discounts applied to product kits? Do those work yet (in 6.x)? I tried one and it seemed not to apply.