Coupons don't work with Google checkout
tizzo - June 3, 2009 - 20:30
| Project: | Ubercart Discount Coupons |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
This post is closely related to the paypal express checkout issue. uc_coupon currently does not work with Google Checkout. This patch solves two problems, first it gets uc_coupon to work with Google Checkout and second it causes the cart pane to display the new pricing when a coupon is applied.
I have not tested it with paypal express or ubercart's normal checkout pane but I think that they should continue to work as they did previously.
Should I still create an issue for updating the cart when using the coupon form on that page? The way this patch is implemented it kills two birds and can't easily be separated into two different patches.

#1
somehow didn't get the patch posted...
#2
Updating status to needs review
#3
This patch does not take into account any coupon restrictions as long as there is at least one valid product in the cart - the discount is applied to all products in the cart, even if a product, SKU or term restriction was set so the discount should only apply to a subset of cart items.
Also, if another payment method is used that goes through the standard checkout, a coupon can now be applied twice - once in the cart, where the product prices are modified directly, and again in the checkout, where the coupon is applied as a line item, to the items that were already discounted in the cart. This could be partially worked around by either creating an options page to enable this functionality or simply testing for Google Checkout as an available payment method, but we also need to support stores that want to offer both Google Checkout and other payment methods. while not allowing coupons to be applied twice.
#4
Yeah that is an issue. Also I just realized that this version will also deduct the total coupon amount from each of the products if the value is a whole dollar amount. I attached a quick fix patch for that.
At the moment this does what we need it to do (we're only allowing google checkout). If anyone else wants to add settings for that it would be great, if not I'll see if I can get to it soon.
#5
subscribing