Closed (duplicate)
Project:
Ubercart
Version:
6.x-2.4
Component:
Products
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Oct 2010 at 11:04 UTC
Updated:
22 Jul 2011 at 05:07 UTC
Line 1031 File uc_product.module
Now
$tokens['sell_price'] = $object->sell_price;
Where i print this token i see 5.00000$
My code
$tokens['sell_price'] = uc_currency_format($object->sell_price);
Depends on the setting of currency in the store and print 5$ or 5.00$
Comments
Comment #1
longwaveShould use uc_price() instead of uc_currency_format(), and probably should change the 'cost' and 'list_price' tokens at the same time.
Comment #2
pkej commenteduc_price led to an error message. uc_currency_format seems correct, at least there are no errors (from php) and it works as expected.
Comment #3
tr commentedMarking this as a duplicate of #985934: Create formatted price tokens, run through uc_price(), for greater usability, since that issue has more details.