Shipping quotes modules generate very little information that is displayed to the customer, but what there is should be theme-able. Right now, the markup is generated by the same function that obtains the quote from the courier's website; doing it this way doesn't allow a site to customize this output. Examples of customization include: turning on or off the shipper's logo, adding time-in-transit information, adding # of packages information, etc.
To address this problem, I have added theme functions in the two shipping quotes modules I wrote: uc_fedex and uc_canadapost. Here is a patch for uc_ups which does the same. I will roll patches for the other core shipping modules if you decide that this should be fixed in core.
This patch simply adds a new theme function, theme_uc_ups_option_label(), and puts all the markup generated by this module into the theme function.
Comment | File | Size | Author |
---|---|---|---|
ups_theme_function.patch | 1.65 KB | TR | |
Comments
Comment #1
TR CreditAttribution: TR commentedComment #2
Island Usurper CreditAttribution: Island Usurper commentedThis looks like a good idea. The only thing I would change is a note in the comment saying that displaying the UPS logo is a requirement of their terms of service. We can't prevent people from getting rid of it in their theme overrides, but a friendly warning ought to prevent mistakes.
Comment #3
rszrama CreditAttribution: rszrama commentedMade the recommended comment and committed. Thanks, TR!
Comment #5
BigMike CreditAttribution: BigMike commentedLet's get this going for USPS!!
Comment #6
TR CreditAttribution: TR commentedUSPS patch can be found in #637482: Add theme function to USPS shipping quotes module