I needed the order subtotal without the '$' sign, but the problem was that the default implementation of [order-subtotal] was themed, so it was rendered like '$12.20'. I just needed the value, like '12.20'.

I tweaked the uc_order.module to add a [order-subtotal-value] token, which is the same as the [order-subtotal], but it just doesn't pass thru the theming routines in uc_price.

Attached is a patch.

CommentFileSizeAuthor
#1 uc_order.module-patch.txt1.86 KBrich.yumul
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rich.yumul’s picture

FileSize
1.86 KB
rich.yumul’s picture

Title: Enhancing the [order-subtotal] token so drop the theming » Enhancing the [order-subtotal] token to drop the theming
longwave’s picture

TR’s picture

Version: 6.x-2.2 » 6.x-2.x-dev
Status: Needs review » Fixed

In D6 Ubercart we are using the suffix "-raw" to indicate unformatted values in tokens. So I added an [order-subtotal-raw] token and an [order-total-raw] token. As @longwave said, Ubercart 7.x-3.x already has these unformatted tokens.

Status: Fixed » Closed (fixed)

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