[ic] shipmode validation

Adam Lambert tech at khouse.org
Fri Dec 12 18:22:31 UTC 2008

    Well, my check was working fine, right up until yesterday.  I had a
guy in Germany trying to purchase something for a friend of his in
Israel, and because the ship_to and bill_to were not the same,
apparently the [shipping check_validity=1] check was failing (funnily
enough, it was the same shipping method for both countries - so it could
only be the mis-match of ship_to/bill_to country code that was causing
it).   This is not the desired consequence, so... I need a new plan. 

    Anyone have any ideas on what else I can do?  I tried a bit with
Carl Bailey's [perl] example, which looked very promising (I'll
cut/paste the code below since it's been a while since it crossed the
list), but I couldn't get it up and functional (probably because I'm not
fluent in perl to do some minor tweak or another it needs on my system).


--- cut ---


     # get a list of possible modes
     my $possible = $Tag->shipping({ possible => 1, });

    # see if current mode is possible
     if (  $possible !~ /\b$Values->{mv_shipmode}\b/i  ) {
           # bomb out !!!!
           $Scratch->{error_message} .= qq( Ship mode $Values- 
 >{mv_shipmode} is not valid for $Values->{state}, $Values- 
 >{country}. );
           return q{ [bounce checkout] );



--- paste ---

Adam Lambert
Koinonia House, Inc.
adam at khouse.org

More information about the interchange-users mailing list