I've been a critic of how the "Choose a Payment Processor" form works in Drupal Commerce. I believe the one in Ubercart is much better.
But you can style Drupal Commerce checkout form to look just like the one in Ubercart. Drupal Commerce 1.0 brings this even closer by adding expiry month and year on the same line.
In a custom style you'd end up styling id="payment-details" with a border or slightly different background color. The problem is for payment processors which don't implement hook_submit_form() you'll get an empty box. This is no good.
To change this I've implemented an HTML description much like the one from Ubercart get added into this payment-details box.
I believe all processors should be forced to implement this hook and at the very least add a short description explaining to the end user what's going to happen, so simply return a blank array(). If we don't force them, we'll have more fragmentation between processors which is a bad thing.
This patch add a description into that box. This is how Ubercart kind of works and provides a more clear experience.
-- PS
Ideally these would be themable. I'm using a t() wrapper, so anyone could override it with a string override, but ideally it would be a theme hook as that's a more standard way to theme these things.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | Paypal WPP | 38.2 KB | j0rd |
| #2 | Paypal WPS | 31.16 KB | j0rd |
| #1 | payment_wps_add_submit_form-1258420-1.patch | 790 bytes | j0rd |
Comments
Comment #1
j0rd commentedAttaching patch
Comment #2
j0rd commentedAttached are some screenshots so you can see what I'm talking about.
Comment #3
bradhawkins commentedThanks j0rd!
I was going to try to do the same thing myself, but your patch does exactly what I need. Thanks!
Comment #4
rszrama commentedJust committed this in conjunction with #1112784: Use the PayPal and Credit Card icons on the checkout form.