<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 2013-06-23, at 10:18 AM, kerry blalock wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  
  <div text="#000000" bgcolor="#FFFFFF">
    I am trying to add an additions shipping method to my site and seem
    to be having a problem with the logic. Here is the code that is
    giving me an error on the truckbig method:<br>
    <br>
    
    <pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; white-space: pre-wrap;">truckbigger:      Oversize Truck Shipping
        criteria <<EOC
[calcn]
        foreach my $item (@$Items) {
                if ($item->{width} >= 160) {
                        # We have to use this shipping method
                        return 1;
                }
        }
        return 0;
[/calcn]
EOC
        min     1
        max     1
        cost    170.00

truckbig:       Truck Shipping
        criteria <<EOC
[calcn]
        foreach my $item (@$Items) {
                if (($item->{width} >= 108 and ($item->{width} <=160)) {
                        # We have to use truckbigger shipping method
                        return 1;
                }
       }
       return 0;
[/calcn]
EOC
        min     1
        max     1
        cost    85.00

Truckbigger works as is. But when I want to charge less for rods between 108 and 160, I get an error, 
</pre>
    <table width="100%" border="0" cellpadding="4" cellspacing="0" align="center" style="position: static; z-index: auto; ">
      <tbody>
        <tr>
          <td class="contentbar1"><br>
          </td>
          <td colspan="3" class="contentbar1"> <b>Note:</b> No match
            found for mode 'ground', quantity '', returning 0. </td>
        </tr>
      </tbody>
    </table>
    Shipping defaults to the shippin method just below truckbig method.
    Need fresh eyes to help me figure out why this is not working.<br>
    <br>
    Kerry<br>
  </div>

_______________________________________________<br>interchange-users mailing list<br><a href="mailto:interchange-users@icdevgroup.org">interchange-users@icdevgroup.org</a><br>http://www.icdevgroup.org/mailman/listinfo/interchange-users<br></blockquote></div><div><br></div><div><br></div><div><blockquote type="cite"><div text="#000000" bgcolor="#FFFFFF"><pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; white-space: pre-wrap; ">            if (($item->{width} >= 108 and ($item->{width} <=160)) {
</pre></div></blockquote></div><div><div text="#000000" bgcolor="#FFFFFF"><pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; white-space: pre-wrap; "><br></pre><pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; white-space: pre-wrap; ">Looks like you are missing a closing bracket between "108" and "and".</pre><pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; white-space: pre-wrap; ">HTH</pre><pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; white-space: pre-wrap; ">Angus</pre></div></div><div><br></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><b>---</b></div><div><b>Angus Rogerson, BMath, BScN, RN</b></div><div><br></div><div>Duct Tape Programmer</div><div>University of Waterloo | Retail Services | Information Systems</div><div><span class="Apple-style-span" style="line-height: 12px; "><b><br></b></span></div><div><span class="Apple-style-span" style="line-height: 12px; "><b>Visit Us Online & Right On Campus<span class="Apple-converted-space"> </span><a href="http://www.retailservices.uwaterloo.ca">www.retailservices.uwaterloo.ca</a></b></span></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></body></html>