Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
uc_price_span.patch | 1 KB | longwave | |
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedThanks, longwave! Committed.
Comment #2
fenstratJust 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.