We are using a coupon to offer a free product but the customer must pay shipping. Orders containing the free products are being processed by PayPal but no payment is being taken via PayPal.

I think the issue is because PayPal does not accept a product with a zero value. Even though the order total is greater than zero once the shipping has been added.

Comments

longwave’s picture

Category: bug » support

Indeed, PayPal does not support orders with a zero subtotal, even if shipping is charged. This is not a bug in Ubercart, I think you will have to find another workaround (such as charging for the product and not charging for shipping).

sittard’s picture

Confirms what I thought!!! Unfortunately due to the nature of this promotion the product has to remain at zero with a postage charge. Would it be possible for the postage to be treated as a product automatically, for the purpose of this campaign?

Thanks.

end user’s picture

Maybe set the product as a product kit?

sittard’s picture

Thanks for the suggestion, I've not used the 'product kit' module on this site build and I'm not 100% sure how this would help, perhaps you could expand.

Ubercart should have a fall back to catch orders with a zero subtotal being presented to PayPal in the first instance. Perhaps, the order could be blocked along with a logged warning message or the postage is bundled with the item amount so that the payment can be processed without failure.

longwave’s picture

Category: support » feature

This issue was previously noted at #1017010: Paypal WPS not accepting zero value items where the cart total does have a value with the same conclusions.

Changing this to a feature request based on #4, I guess we could bundle shipping in with the product total in this special case.

end user’s picture

Well product kits lets you group several products into one. So I was thinking maybe have a Free Product with $0 cost and Second product would be Shipping Cost? Since the kits is a product the price of the Shipping Cost Product would be sent to PayPal. Although I guess it would have to be set to flat rate/weight.

sittard’s picture

StatusFileSize
new702 bytes

The idea of using product kits as a workaround is a smart one.

Attached is a patch which bundles the shipping charge in with the product total but only if the order would otherwise be declined by PayPal.

I've not tested on a live site, but it seems to be working on my development environment. Would be appreciate if one of the UC maintainers could take a quick look and improve if required.

longwave’s picture

Version: 6.x-2.7 » 6.x-2.x-dev
Status: Active » Needs review
sittard’s picture

Could we get this patch committed. I've been running this on a live site for a long while now with out issues.

Thanks.

longwave’s picture

Issue summary: View changes
StatusFileSize
new723 bytes

Please test this slightly simplified patch.

tr’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev

6.x-2.x is obsolete.