Price alterers can add prefixes and suffixes to prices, but they must be themed individually. The attached patch adds a around the price prefix and suffix if one is available so the entire prefix or suffix can be themed as a group. Requested in #490646: Possibility to place a text behind the price but this is not strictly a uc_vat issue.

CommentFileSizeAuthor
uc_price_span.patch1 KBlongwave
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Status: Active » Fixed

Thanks, longwave! Committed.

fenstrat’s picture

Just a note for anyone else that was using $options['prefixes'] and $options['suffixes'] to format prices. These will be effected by this patch as now prefixes and suffixes are wrapped in a span.

I was using the prefix to allow a simple sales module to add the original price (in struck out text) before a red/bold sale price.

That solution had to change after this patch - new solution is to start using $context['class'] to add a class on the custom price instead.

Status: Fixed » Closed (fixed)

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