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.

CommentFileSizeAuthor
ups_theme_function.patch1.65 KBTR
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR’s picture

Issue tags: -theme +theme layer
Island Usurper’s picture

This 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.

rszrama’s picture

Status: Needs review » Fixed

Made the recommended comment and committed. Thanks, TR!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

BigMike’s picture

Let's get this going for USPS!!

TR’s picture