Can't get coupons to work with PayPal Express Checkout
SeanBannister - July 30, 2008 - 23:52
| Project: | Ubercart Discount Coupons |
| Version: | 6.x-1.1 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I'm using PayPal Express Checkout in Ubercart and I've noticed it doesn't give me the option to enter a coupon because with PayPal Express Checkout the user doesn't go to the Ubercart checkout page. Is this correct? If so maybe there should be a coupon pane on the cart page just like "shipping quote".

#1
PayPal Express Checkout uses its own checkout page instead of the standard panes. It should be possible to add coupon support here, but I currently don't need this functionality.
#2
#3
This patch is meeting my needs to get coupons working while using Google Checkout. Google Checkout doesn't use the checkout screen either so the coupons are used on the cart screen.
#4
Thank you for submitting this patch, this looks good! It does need a little work, for example the uc_coupon_form_alter() function apparently does nothing, but I will run some tests and try to commit this feature soon.
#5
Committed with a few small changes; I moved the hook_uc_cart_alter() code to hook_uc_order() and added the coupon as a line item rather than modifying the product prices directly. The coupon cart pane can also be used if the checkout is enabled, the coupon code is immediately applied on the checkout screen in this case.
Thanks again for your work on this!
#6
While the patch now in HEAD does properly display the coupon code text box and messages on the cart page if you use it with google checkout it fails to modify the order before sending the user on to Google checkout so the coupon is never actually applied and the user is asked to pay full price.
Also, it seems like the order amount on the cart pane should be decremented when the coupon is applied rather than just displaying the message that the coupon has been applied. This behavior is somewhat counter intuitive.
#7
I thought Google Checkout worked similarly to PayPal EC, but there is no way of passing a modified order total or discount line item to Google Checkout - the only information that is sent is a list of products and shipping options. Google Checkout does support the use of coupons entered in Google's own pages, but Ubercart does not implement the Merchant Calculations API needed for this, and there is no way uc_coupon can currently hook into uc_google_checkout to make this work.
To use coupons with Google Checkout for now I think you will have to set them up in Google Checkout itself - see https://sandbox.google.com/checkout/sell/settings?section=Coupons for the sandbox version of this. Unfortunately this is nowhere near as flexible as uc_coupon. If you can see a workaround for this please let me know!
As for the cart pane not updating with the new price, the cart pane doesn't have any way of displaying line items - it can only list cart products and their subtotal. This is unfortunate but again I can't see a way around this. Maybe it could display the coupon value somewhere in the coupon pane, similar to the way the shipping quote estimate works?
This issue was originally for PayPal Express Checkout, which I believe to be fixed. Please open a new issue to continue discussing these two feature requests.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.