[ic] Urgent: total_cost with commas and without dollar symbol

kyle@invisio.com interchange-users@lists.akopia.com
Wed May 23 17:15:01 2001


I've never needed a noformat total_cost so I'm
not sure if it takes a noformat arg....

You could use calc though:

[calc interpolate=1]
$tot = q{[total_cost]};
# strips anything not a number or a comma below
$tot =~ s/[^0-9,]//g;
return $tot;
[/calc]

Kyle (KC)

At 04:44 PM 5/23/01 , you wrote:
>
>
> Hi guys!
>
> I need some help with Interchange shop... :)
>
> I need catch the value [total_cost] and to send it
> in a hidden field to other form. Its ok, but I
> have a problem ...
>
> This value ([total_cost]) must go without the
> dollar symboll ($) and with the commas.
>
> In other words, if the real value is $56,89,
> the "new" value must be only 56,89.
>
> I already tried:
>
> a) [total-cost noformat=1]
> b) [total-cost noformat]
>
> But the first (a) results in a value without the commas.
> Example: 45
>
> And the second (b) results in a value with the dollar
> symboll ($) and the price only show zeros: $0,00.
>
> 
> Someone can help me, please?
> 
> Thanks for all.
>
>............................................
>::: Samir G. Barak :::::::::::::::::::::::::
>............................................
>
>
>_______________________________________________
>Interchange-users mailing list
>Interchange-users@lists.akopia.com
>http://lists.akopia.com/mailman/listinfo/interchange-users