Closed (fixed)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2010 at 23:45 UTC
Updated:
23 Jan 2012 at 23:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
guypaddock commentedNote: I'm referring to the May 2010 revision of the "Website Payments Standard Integration Guide".
Comment #2
guypaddock commentedWell, it turned out not to be much work at all. The attached patch adds handling for negative line items/discounts.
Comment #3
tr commentedCan you post links to the PayPal documentation that says negative line-items are now OK? I programmed a non-Drupal site a few years ago where I had to make extensive use of the PayPal API, and I can tell you that back then it was definitely not allowed and PayPal insisted to me it never would be - they disallowed negative line items for a reason and they weren't going to change. And since PayPal won't even fix bugs (some I know which go back 4 years or more), I would be surprised to find out that they are now allowing negative line items.
Comment #4
guypaddock commentedSee the Website Payments Standard Integration Guide, page 336, under the section "Setting Discounts for the Cart".
The patch I submitted above doesn't use negative line items -- it converts negative line items in the Ubercart order into discounts on the PayPal side.
Comment #5
pharoz commentedGreat job, GuyPaddock! I applied both your patches and the Discount line items went through for itemized orders.
Have you mention this patch to the Ubercart core since it's modifying it?
Comment #6
3dloco commented+1 ..this worked for me too! Thank you very much GuyPaddock!
Comment #7
guypaddock commented@pharoz, what do you mean by "mention it to the core"?
Comment #8
pharoz commented@ GuyPaddock, Disregard that. I thought this issue was posted under the ubercart discount module issue tracker for some reason... it's already under the ubercart issue queue.
Comment #9
bsmith451 commentedThis also worked for me !
Comment #10
guypaddock commentedChanging status -- unless there is an objection?
Comment #11
MBroberg commentedIt doesn't work for me but I do not have any other discount module enabled, only Ubercart. Is there a second patch or module that is also needed?
The code is not removing or change the negative item in the itemized list.
Comment #12
MBroberg commentedI should add that I really don't need any coupons or complex modules and would like to avoid it if possible. It's a simple "class sign up" site with no taxes, no shipping, but the customers do sometimes receive a hardship discount. I have added a Variable Price feature to allow them to type in an adjustment to the price by adding a "Price Adjustment" product to the cart, and I would like to just have the variable amount available that they can type.
Is there any way to do this? Thanks!
Comment #13
Island Usurper commentedIt should work as patched, so, MBroberg, I'd have to see your code to see why it doesn't work for you.
Committed.
Comment #15
Dubber Dan commentedwould be ideal if this was added in to core. any plans?
Comment #16
ricky.ybarra commentedThanks for sharing. Works great!
Comment #17
adTumbler commentedI have just upgraded to 2.4
I noticed that I needed to re-apply this patch - thought it would be worth noting this for any other users upgrading to 2.4 who have implemented this capability.
Alex
Comment #18
joelstein commentedSubscribing... #17: that's because it was committed after the 2.4 release. It should be a part of the 6.x-2.5 release, whenever that is.
Comment #19
aaronbaumanI'm using Ubercart 2.7, but the following caveat still appears:
As I read this thread, it looks like the patch above (and now in UC core) is supposed to alleviate this constraint, but the caveat was overlooked and should have been removed.
If this is a documentation bug, then please see the attached patch for review.
If this is totally unrelated, please point me in the right direction (and explain to me what that caveat is talking about if not this exact case).
Comment #21
longwaveCommitted #19 to both branches.