[ic] shipping.asc and formulas (adder or at_least field)

Randy Just randyjust at justcomp.com
Sat Oct 29 11:58:58 EDT 2005


At the risk of sounding like an idiot, in what location would I find Ship.pm?

I did a find on the system I am working on for "Ship.pm" and couldn't seem
to locate the file (I am on 5.2.X).

Randy


>I don't believe that the "min_cost" field interpolates ICML tags at
>all, at the moment.  There may be a good reason for this, or perhaps
>I'm just reading the code wrong.
>
>Assuming I'm correct, the following patch should add the capability.
>I say "should" because I haven't tested it at all. :-)
>
>----------------------------------------------------------------------
>--- Ship.pm     9 Jun 2005 18:43:58 -0000       2.13
>+++ Ship.pm     28 Oct 2005 19:18:03 -0000
>@@ -694,6 +694,10 @@
>
>                 $o = get_option_hash($row->[OPT], $o)
>                         if $row->[OPT];
>+
>+               $o->{at_least} = interpolate_html($o->{at_least})
>+                       if (defined($o->{at_least}) && 
>$o->{at_least} =~ /__\w+__|\[/);
>+
>                 # unless field begins with 'x' or 'f', straight 
> cost is returned
>                 # - otherwise the quantity is multiplied by the 
> cost or a formula
>                 # is applied
>----------------------------------------------------------------------
>
>If the above works, and is deemed acceptable, then the same code could
>also be applied to the "adder" value.
>
>By the way, there's no reason to use "interpolate=1" in your [calc]
>tag.  [calc] interpolates by default.  [calcn] is the one that doesn't.
>
>Also, if you're going to use Perl then you might as well loop through
>the @$Items array instead of calling the [item-list] tag.




More information about the interchange-users mailing list