I would like to add the credit card logos to the checkout button.
reason: When I enable paypal checkout express we need more of a differentiation between the checkout button and the paypal payment button.
I noticed the code below looks great durring the checkout process.. Changed website to generic name:
<img class="uc-credit-cctype uc-credit-cctype-visa" typeof="Image" src="https://WEBSITENAME.com/sites/all/modules/ubercart/payment/uc_credit/images/visa.gif" alt="Visa" /> <img class="uc-credit-cctype uc-credit-cctype-mastercard" typeof="Image" src="https://WEBSITENAME.com/sites/all/modules/ubercart/payment/uc_credit/images/mastercard.gif" alt="MasterCard" /> <img class="uc-credit-cctype uc-credit-cctype-discover" typeof="Image" src="https://WEBSITENAME.com/sites/all/modules/ubercart/payment/uc_credit/images/discover.gif" alt="Discover" /> <img class="uc-credit-cctype uc-credit-cctype-amex" typeof="Image" src="https://WEBSITENAME.com/sites/all/modules/ubercart/payment/uc_credit/images/amex.gif" alt="American Express" />
How would you recommend adding these images to the checkout button so people do not assume we only accept paypal?
Comments
Comment #1
greenwork CreditAttribution: greenwork commentedMaybe even changing the text...
I can imagine string overrides would do the trick but is their an easy way to change the "checkout" to "Checkout Using a Credit Card" or something similar without installing a completely new module?
Comment #2
longwaveYou can use String Overrides module to change any text, or override theme_uc_cart_checkout_buttons() in your theme to reformat the buttons any way you like.
Comment #3
greenwork CreditAttribution: greenwork commentedI prefer not to use string overrides but I assume when you say overriding in the theme using: theme_uc_cart_checkout_buttons()
Anyone have any good examples of this or a guide? I am looking through hundreds of pages but nothing specifically for the buttons(). If anyone can find a link or give me a quick rough example that would be great. Cheers!
Here is overriding the checkout page:
http://codekarate.com/blog/overriding-ubercart-checkout-page
Still looking for the buttons example but someone may find the above useful
Here is someone trying to use string overrides and it didn't work for them:
http://www.ubercart.org/forum/support/23869/change_text_button
Here is a link to a problem using hook form alter:
https://drupal.org/node/1170364
Comment #4
longwaveDocumentation for overriding theme functions can be found at https://drupal.org/node/173880 - read the "Overriding functions" section. There is no specific documentation for theme_uc_cart_checkout_buttons() as it acts exactly the same way as any other theme function in Drupal.
Comment #5
greenwork CreditAttribution: greenwork commentedIf you dont mind what file is the original uc_cart_checkout_buttons() called from?
Comment #7
greenwork CreditAttribution: greenwork commentedJust wondering where I can hard code this without manipulating the theme
Comment #8
greenwork CreditAttribution: greenwork commenteduc_cart.module
Comment #9
greenwork CreditAttribution: greenwork commented