The attached patch adds a "uc-credit-cctype" class and a "uc-credit-cctype-XXX" class (e.g. uc-credit-cctype-visa) to each of the credit card type icons on the checkout form. This allows for additional theming and js functionality.
My use case was that based on the currency selected (with uc_multiprice module) the supported card types had to change. I was able to change the drop-down with a hook_form_alter() but to change the icons displayed I need to be able to target the individual img tags so I could hide/show them using custom javascript. Adding class names to the img tags allowed that.
Comment | File | Size | Author |
---|---|---|---|
#5 | 951444_cc_icon_class.patch | 672 bytes | Island Usurper |
#4 | 951444_cc_icon_class.patch | 672 bytes | Island Usurper |
card_type_class.patch | 681 bytes | stella | |
Comments
Comment #1
longwaveWorks for me, though ultimately it would be better if this line used theme('image', ...) and the CSS wasn't hardcoded.
Comment #2
Island Usurper CreditAttribution: Island Usurper commentedOK. Committed.
Comment #3
longwaveNeeds porting to 7.x.
Comment #4
Island Usurper CreditAttribution: Island Usurper commentedPorted and committed.
Comment #5
Island Usurper CreditAttribution: Island Usurper commentedPorted and committed.
Comment #6
longwaveThat patch does not appear to be in CVS.
Comment #7
Island Usurper CreditAttribution: Island Usurper commentedOops. Fixed for reals now.