[ic] Newbie help - Filters - [solved]

Mark Halliday bmhtdev at yahoo.co.uk
Sun Feb 12 04:42:04 EST 2006


--- Gert van der Spoel <ic at 3edge.com> wrote:


> 
> [filter op=pound2gbp interpolate=1][total-cost][/filter] 
> 
Having done some more research, I came to this syntax as well which
works! So for the benefit of others the full solution (for rpm based
installations)is:

Save the following filter as:
/usr/lib/interchange/code/Filter/pound2gbp.filter

CodeDef pound2gbp Filter
CodeDef pound2gbp Routine <<EOR
sub {
        my $val = shift;

        $val =~ s/&pound;\s*/GBP /g;
        return $val;
}
EOR

Then use the following syntax in mail_receipt:

For items: [item-filter pound2gbp][item-price][/item-filter]
For totals: [filter op=pound2gbp interpolate=1][salestax][/filter]

Thanks to everyone for their help

Mark


		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com


More information about the interchange-users mailing list