<HTML>
<HEAD>
<title> WebStore 400CS Shopping Cart - RDC Software - Subtotal Range Shipping</title>
<META NAME="description" content="WebStore 400CS - a flexible, low cost, Perl shopping cart by RDC Software. Easy to install and customize. Online web store demonstrations and support documentation. Custom programming available.">
<META NAME="keywords" content="shopping cart,Shopping Cart,SHOPPING CART,perl webstore,Perl Webstore,WebStore,WEBSTORE,webstores,Webstores,WebStores,WEBSTORES,web-store,Web-store,Web-Store,WEB-STORE,web-stores,Web-stores,Web-Stores,WEB-STORES,storefront,Storefront,STOREFRONT,storefronts,Storefronts,STOREFRONTS,store-front,Store-Front,STORE-FRONT,store-fronts,Store-Fronts,STORE-FRONTS,on-line shop,On-line Shop,ON-LINE SHOP,online store,Online Store,ONLINE STORE,virtual mall,Virtual Mall,VIRTUAL MALL,internet commerce,Internet Commerce,e-commerce,E-Commerce,frontpage,MS Frontpage,nt,NT server">
<META NAME="copyright" content="
Copyright (c) 1996 - 2002, RDC Software, http://www.ratite.com
Copyright notifications:
Single User License:  /Docs/Copyright_SingleUser.html
Server License:       /Docs/Copyright_Server.html
File contents can not be altered.">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" ALINK="#FF0000" VLINK="#0000A0">



<DL>
  <DT><TABLE BORDER=0 WIDTH="100%" CELLPADDING=0 CELLSPACING=0>
      <TR><TD><FONT SIZE=2>
      <A HREF="shipping.Rates_Percentages.html">Previous</A> |
      <A HREF="OrderForm.html">Next</A>
      </FONT></TD>

      <TD ALIGN=right><FONT SIZE=2>
      Main Index: &nbsp;
      <A HREF="index.html" TARGET="_top">Frames</A> |
      <A HREF="index.docs.html" TARGET="_top">No Frames</A>
      </FONT></TD></TR>

      <TR><TD COLSPAN=2 ALIGN=right><FONT SIZE=2>
      Document: &nbsp;
      <A HREF="frames/frame.shipping.Subtotal.html" TARGET="_top">Frames</A> |
      <A HREF="shipping.Subtotal.html" TARGET="_top">No Frames</A>
      </FONT></TD></TR>
      </TABLE>


  <DT>&nbsp;
  <DT><CENTER><H3><B><I>Subtotal Range Shipping</I></B></H3></CENTER>
  <DT>&nbsp;


  <DT><I>Subtotal Range Shipping</I> costs are based on the order's subtotal.
  <DT>&nbsp;
  <DT><I><A HREF="outlet.setup.html#SHIPPING" TARGET="w1">%SHIPPING</A></I> is a hash of arrays in <I>WebStore's</I> setup file,
      /Web_store/Databases/<I><A HREF="../Databases/outlet.setup" TARGET="w1" onClick="window.open('','w1','width=640,height=480,scrollbars,resizable,top=0,left=0')">outlet.setup</A></I>.
      listing all shipping variables.
  <DT>&nbsp;
  <DT><A HREF="#SHIPPING">%SHIPPING</A> arrays in this file are configured for
      <NOBR><I>Subtotal Range Shipping</I>.</NOBR>


<!-- Shipping -->
  <DT><PRE>Example:  $SHIPPING<FONT COLOR="#DC143C">{1}</FONT><FONT COLOR="#0000CD">[2]</FONT>

 <FONT COLOR="#DC143C">{1}</FONT>  An array's KEY value. KEY values will be referenced by their
      numeric value in the explanations below (0, 1, 2, etc.).

 <FONT COLOR="#0000CD">[2]</FONT>  An array's element reference. Element numeric values will
      be spelled in the explanations below (zero, one, two, etc.)

      Specific <FONT COLOR="#DC143C">arrays</FONT> will be referenced as $SHIPPING<FONT COLOR="#DC143C">{1}</FONT>.

      A specific <FONT COLOR="#0000CD">element</FONT> within a specific <FONT COLOR="#DC143C">array</FONT> will be referenced
      as $SHIPPING<FONT COLOR="#DC143C">{1}</FONT><FONT COLOR="#0000CD">[2]</FONT>.</PRE>

      Arrays 1, 2, and 10 must exist in %SHIPPING. If any of these arrays are
      not present in %SHIPPING or the value of their KEY (1, 2, 10) is altered,
      shipping is disabled in <I>WebStore</I>.
  <DT>&nbsp;
  <DT>Numeric array KEYS allow the <I>Webstore</I> script to sort the shipping methods
      in ascending order for printing to the client's web browser.
  <DT>&nbsp;
  <DT>Arrays 0 and 3 - 9 are reserved and can not be used.
  <DT>&nbsp;

  <DT><A NAME="SHIPPING"></A><PRE><B>%SHIPPING = (

<FONT COLOR="#008080"><A NAME="array_1"></A>	# Determines type of shipping
	# Database Field, Handling, Free Shipping</FONT>
	'<A HREF="#array1">1</A>' => ['',   '',   ''],


	<FONT COLOR="#008080"><A NAME="array_2"># </A>Domestic Shipping</FONT>
	'<A HREF="#array2">2</A>' => ['319',  '10','11','12','13'],


	<FONT COLOR="#008080"><A NAME="array_3"># </A>Universal Subtotal Ranges</FONT>
	'<A HREF="#array3">3</A>' => [                 <FONT COLOR="#008080">#  Order Subtotal        Shipping Charged</FONT>
	        '100.00:6.95',   <FONT COLOR="#008080">#    $0.01 to $100.00     $6.95</FONT>
	        '150.00:9.95',   <FONT COLOR="#008080">#  $100.01 to $150.00     $9.95</FONT>
	        '200.00:12.95',  <FONT COLOR="#008080">#  $150.01 to $200.00    $12.95</FONT>
	        '300.00:15.95',  <FONT COLOR="#008080">#  $200.01 to $300.00    $15.95</FONT>
	        '300.01:18.95',  <FONT COLOR="#008080">#  $300.01 & up          $18.95</FONT>
	       ],


	<FONT COLOR="#008080"><A NAME="array_10"># </A>Shipping Methods
	# 10  UPS Ground or Priority Mail:   $3.95 plus  3% of order's subtotal
	# 11  2nd Day Air:                  $12.00 plus  4% of order's subtotal
	# 12  Standard Next Day Air:        $18.00 plus  5% of order's subtotal
	# 13  Alaska & Hawaii:              $12.00 plus  4% of order's subtotal
	# 14  Canadian Orders:              $10.00 plus 17% of order's subtotal
	# 15  International Orders:         $20.00 plus  8% of order's subtotal</FONT>

	'<A HREF="#array10">10</A>' => ['UPS Ground or Priority Mail', '3.95',   '.03'],
	'11' => ['2nd Day Air',                 '12.00',  '.04'],
	'12' => ['Standard Next Day Air',       '18.00',  '.05'],
	<FONT COLOR="#008080"># State Specific Shipping Method</FONT>
	'13' => ['Alaska &amp; Hawaii',             '12.00',  '.04',  '<A HREF="#array11">11:21</A>'],
	<FONT COLOR="#008080"># Country Specific Shipping Method</FONT>
	'14' => ['Canadian Orders',             '10.00',  '.17',  '<A HREF="#array14">132</A>'],
	'15' => ['International Orders',        '20.00',  '.08'],

); <FONT COLOR="#008080"># DO NOT REMOVE - terminates %SHIPPING</FONT></B></PRE>


  <DT>&nbsp;
  <DT>&nbsp;
  <DT><CENTER><A HREF="#Ship"><FONT SIZE=2>Index</FONT><HR WIDTH="85%" NOSHADE SIZE=1></A></CENTER>
  <DT>&nbsp;


  <!-- Array 1 - $SHIPPING{1} -->
  <DT><A NAME="array1"></A><PRE><B>Array 1 - <A HREF="#array_1">$SHIPPING{1}</A></B></PRE>
  <DT>$SHIPPING{1} must exist in <A HREF="#SHIPPING">%SHIPPING</A>.
      If $SHIPPING{1} is removed or the numeric value of it's KEY (1)
      is altered, shipping is disabled in <I>WebStore</I>.
  <DT>&nbsp;
  <DT>$SHIPPING{1} consists of the following elements:<PRE><B>
 <FONT COLOR="#008080">KEY     zero  one     two</FONT>
 '1' => ['',   '3.50', '150.00'],</B></PRE>

  <DT><TABLE BORDER=0 WIDTH="100%" CELLPADDING=0 CELLSPACING=4>
      <TR><TD>zero</TD>
          <TD>&nbsp;&nbsp;</TD>
          <TD>Database Shipping Field</TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>Element zero is not used for <I>Subtotal Range Shipping</I> and must be set to ''.</TD></TR>
      <TR><TD COLSPAN=3>&nbsp;</TD></TR>


      <TR><TD>one</TD>
          <TD>&nbsp;&nbsp;</TD>
          <TD>Handling Charge</TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>Element one is the labor charge for packaging an order for shipment.</TD></TR>

      <!-- SPACER -->
      <TR><TD COLSPAN=3 HEIGHT=3></TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>Setting element one = '' disables the addition of a handling charge.</TD></TR>

      <!-- SPACER -->
      <TR><TD COLSPAN=3 HEIGHT=3></TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>Do not include a dollar sign or commas in element one.
              Element one is a fixed decimal number.</TD></TR>
      <TR><TD COLSPAN=3>&nbsp;</TD></TR>


      <TR><TD>two</TD>
          <TD>&nbsp;&nbsp;</TD>
          <TD>Free Shipping</TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>When the value of an order's subtotal is greater than the value
              listed in element two, no shipping or handling is charged for the
              order.  The shipping drop down select element is not printed to the
              client's web browser.</TD></TR>

      <!-- SPACER -->
      <TR><TD COLSPAN=3 HEIGHT=3></TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>Setting element two = '' disables free shipping checks, all orders
              pay shipping.</TD></TR>

      <!-- SPACER -->
      <TR><TD COLSPAN=3 HEIGHT=3></TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>Do not include a dollar sign or commas in element two.
              Element two is a fixed decimal number.</TD></TR>
      </TABLE>


  <DT>&nbsp;
  <DT>&nbsp;
  <DT><CENTER><A HREF="#SHIPPING"><FONT SIZE=2>%SHIPPING</FONT><HR WIDTH="85%" NOSHADE SIZE=1></A></CENTER>
  <DT>&nbsp;


  <!-- Array 2 - $SHIPPING{2} - Domestic Shipping -->
  <DT><A NAME="array2"></A><PRE><B>Array 2 - <A HREF="#array_2">$SHIPPING{2}</A> - Domestic Shipping</B></PRE>
  <DT>$SHIPPING{2} must exist in <A HREF="#SHIPPING">%SHIPPING</A>.
      If $SHIPPING{2} is removed or the numeric value of it's KEY (2)
      is altered, shipping is disabled in <I>WebStore</I>.
  <DT>&nbsp;
  <DT>$SHIPPING{2} consists of the following elements:<PRE><B>
 <FONT COLOR="#008080">KEY     zero    one   two   three four</FONT>
 '2' => ['319',  '10', '11', '12', '13'],</B></PRE>

  <DT><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=4>
      <TR><TD>zero</TD>
          <TD>&nbsp;&nbsp;</TD>
          <TD>Country Code</TD></TR>
      <TR><TD COLSPAN=2>&nbsp;</TD>
          <TD>Your 3 digit country code from %countries in
              <I><A HREF="../Databases/outlet.state_country.setup" TARGET="w1" onClick="window.open('','w1','width=640,height=480,scrollbars,resizable,top=0,left=0')">outlet.state_country.setup</A></I>.
              </TD></TR>
      <TR><TD COLSPAN=3>&nbsp;</TD></TR>


      <TR><TD COLSPAN=3>one, two, three, etc. &nbsp;&nbsp;&nbsp; Domestic Shipping Method KEYS</TD></TR>
      <TR><TD>&nbsp;</TD><TD>&nbsp;&nbsp;</TD>
          <TD>Elements one, two, three, etc. is a listing off all domestic
              (your country's) shipping method KEYS in %SHIPPING.</TD></TR>

      <!-- SPACER -->
      <TR><TD COLSPAN=3 HEIGHT=3></TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>List as many domestic shipping methods as you require.</TD></TR>
      </TABLE>


      <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=4>
      <TR><TD COLSPAN=3>&nbsp;</TD></TR>
      <TR><TD COLSPAN=3 HEIGHT=3>Your 3 digit country code in element zero and the
          domestic shipping methods listed in elements one, two, three, etc. are
          used to determine if the client has chosen a shipping method which applies
          to their country of residence.</TD></TR>
      </TABLE>


  <DT>&nbsp;
  <DT>&nbsp;
  <DT><CENTER><A HREF="#SHIPPING"><FONT SIZE=2>%SHIPPING</FONT><HR WIDTH="85%" NOSHADE SIZE=1></A></CENTER>
  <DT>&nbsp;


  <!-- Array 3 - $SHIPPING{3} - Universal Subtotal Ranges -->
  <DT><A NAME="array3"></A><PRE><B>Array 3 - <A HREF="#array_3">$SHIPPING{3}</A> - Universal Subtotal Ranges</B></PRE>
  <DT>$SHIPPING{3} is optional.
      If you do not use <I>Universal Subtotal Ranges</I>, $SHIPPING{3} may be deleted.
  <DT>&nbsp;
  <DT>$SHIPPING{3} example:<PRE><B>
 '3' => [                 <FONT COLOR="#008080">#  Order Subtotal        Shipping Charged</FONT>
         '100.00:6.95',   <FONT COLOR="#008080">#    $0.01 to $100.00     $6.95</FONT>
         '150.00:9.95',   <FONT COLOR="#008080">#  $100.01 to $150.00     $9.95</FONT>
         '200.00:12.95',  <FONT COLOR="#008080">#  $150.01 to $200.00    $12.95</FONT>
         '300.00:15.95',  <FONT COLOR="#008080">#  $200.01 to $300.00    $15.95</FONT>
         '500.00:20.00',  <FONT COLOR="#008080">#  $300.01 to $500.00    $20.00</FONT>
         '750.00:30.00',  <FONT COLOR="#008080">#  $500.01 to $750.00    $30.00</FONT>
         '750.01:45.00',  <FONT COLOR="#008080">#  $750.01 & up          $45.00</FONT>
        ],
</B></PRE>

  <DT>If the client-selected shipping method contains subtotal ranges in element one,
      the shipping method's range values are used in place of the universal ranges.
  <DT>&nbsp;
  <DT>Each element of $SHIPPING{3} is colon delimited.
  <DT>&nbsp;
  <DT>Order subtotal values are left of the colon in each element and the
      corresponding <I>base</I> shipping cost is right of the colon in each element.
  <DT>&nbsp;
  <DT>The subtotal values must be listed in ascending order.
  <DT>&nbsp;
  <DT>For example, if an order's subtotal equals $32.95 (less than $100.00), the order's
      <I>base</I> shipping cost is $6.95.
  <DT>&nbsp;
  <DT>&nbsp;


  <DT>The <I>base</I> or <I>universal</I> shipping charge for an order are first
      calculated using the values listed in $SHIPPING{3}.
  <DT>&nbsp;
  <DT>The values placed in this array should equal the values of your least
      expensive shipping method, usually a ground shipping method within the
      borders of your country.
  <DT>&nbsp;
  <DT>After the <I>base</I> shipping value is determined, <I>WebStore</I> checks the contents
      of elements one and two of the client-selected shipping method for additional
      manipulations of the <I>base</I> shipping charges.
  <DT>&nbsp;
  <DT>When a dollar value is present in element one of the client-selected shipping
      method and no value is present in element two, element one's value is added
      to the <I>base</I> shipping charge to determine total shipping charges.
  <DT>&nbsp;
  <DT>When a value is present in element two of the client-selected shipping
      method, the <I>base</I> shipping charge is discarded.  Shipping charges are
      calculated by multiplying the order's subtotal by the percentage value found
      in element two. If a dollar value is present in element one, it is added
      to the product to determine total shipping costs.
  <DT>&nbsp;
  <DT>If the charges for your shipping methods vary to the point that you can not
      use <I>base</I> or <I>universal</I> shipping values, delete $SHIPPING{3}.
      Subtotal ranges or a dollar value may be placed in element one of
      each shipping method or a percentage value must be placed in element two of
      each shipping method.  If elements one and two of a shipping method are set
      to '' and $SHIPPING{3} does not exist, shipping costs will be set to 0.00.


  <DT>&nbsp;
  <DT>&nbsp;
  <DT><CENTER><A HREF="#SHIPPING"><FONT SIZE=2>%SHIPPING</FONT><HR WIDTH="85%" NOSHADE SIZE=1></A></CENTER>
  <DT>&nbsp;


  <!-- Arrays 10 - XX - Shipping Methods -->
  <DT><A NAME="array10"></A><PRE><B>Arrays 10 - XX <A HREF="#array_10">$SHIPPING{10}</A> - Shipping Methods</B></PRE>
  <DT>$SHIPPING{10} must exist in <A HREF="#SHIPPING">%SHIPPING</A>.
      If $SHIPPING{10} is removed or the numeric value of it's KEY (10)
      is altered, shipping is disabled in <I>WebStore</I>.
  <DT>&nbsp;
  <DT>$SHIPPING{10} is the first shipping method array.
  <DT>&nbsp;
  <DT>The default shipping method used by <I>WebStore</I> is defined in $SHIPPING{10}.
  <DT>&nbsp;
  <DT>$SHIPPING{10} remains the shipping method until the client selects an
      alternative shipping method.
  <DT>&nbsp;
  <DT>Each shipping method array (10, 11, 12, etc.) consists of a maximum of
      four elements.
  <DT>&nbsp;

  <DT>$SHIPPING{10} consists of the following elements:<PRE><B>
 <FONT COLOR="#008080">KEY     zero                           one  two  three</FONT>
'10' => ['UPS Ground or Priority Mail', '',  '',  ''],</B></PRE>

  <DT><TABLE BORDER=0 WIDTH="100%" CELLPADDING=0 CELLSPACING=4>
      <TR><TD>zero</TD>
          <TD>&nbsp;&nbsp;</TD>
          <TD>Shipping Label</TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>The shipping label used in the shipping drop down select element
              on the order form HTML page, confirmation of order HTML page, and
              e-mail messages.</TD></TR>
      <TR><TD COLSPAN=3>&nbsp;</TD></TR>


      <TR><TD>one</TD>
          <TD>&nbsp;&nbsp;</TD>
          <TD>Add Value</TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>When element one equals a dollar value, that value is added to the
          <I>base</I> shipping costs obtained using the universal subtotal range
          array, <A HREF="#array_3">$SHIPPING{3}</A>.
          When <A HREF="#array_3">$SHIPPING{3}</A> is not defined, element one's
          value becomes the total shipping cost for the shipping method.</TD></TR>

      <!-- SPACER -->
      <TR><TD COLSPAN=3 HEIGHT=3></TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>Element one may contain a set of <FONT COLOR="#0000CD">tilde</FONT>
              delimited subtotal ranges:<PRE>
'15' => ['International Orders',
         '100.00:26.95<FONT COLOR="#0000CD"><B>~</B></FONT>
          150.00:29.95<FONT COLOR="#0000CD"><B>~</B></FONT>
          200.00:32.95<FONT COLOR="#0000CD"><B>~</B></FONT>
          500.00:40.00<FONT COLOR="#0000CD"><B>~</B></FONT>
          750.00:50.00<FONT COLOR="#0000CD"><B>~</B></FONT>
          800.00:65.00',   '', ''],</PRE>

          Subtotal ranges present in a shipping method array take precedence
          over subtotal ranges in the universal subtotal range array,
          <A HREF="#array_3">$SHIPPING{3}</A>.</TD></TR>

      <!-- SPACER -->
      <TR><TD COLSPAN=3 HEIGHT=3></TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>Do not include dollar signs or commas in element one.
              Element one is a fixed decimal number.</TD></TR>
      <TR><TD COLSPAN=3>&nbsp;</TD></TR>


      <TR><TD>two</TD>
          <TD>&nbsp;&nbsp;</TD>
          <TD>Multiply Value</TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>The <I>Multiply Value</I> takes precedence over the universal subtotal
              range array, <A HREF="#array_3">$SHIPPING{3}</A>, and any value present
              in element one of the shipping method.</TD></TR>

      <!-- SPACER -->
      <TR><TD COLSPAN=3 HEIGHT=3></TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>The order's subtotal is multiplied by the decimal value present in
              element two to obtain the order's shipping cost.  If a dollar value
              is present in element one, element one's value is added to the
              shipping cost product, producing the order's shipping subtotal.
              If ranges are present in element one, they are not used.</TD></TR>

      <!-- SPACER -->
      <TR><TD COLSPAN=3 HEIGHT=3></TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD>Do not include a dollar sign or commas in element two.
              Element two is a fixed decimal number.</TD></TR>
      <TR><TD COLSPAN=3>&nbsp;</TD></TR>


      <TR><TD>three</TD>
          <TD>&nbsp;&nbsp;</TD>
          <TD>Country or State(s) Specific Shipping Method</TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD><PRE>

<A NAME="array14"></A>'14' => ['Canadian Orders', '10.00', '.17', '<A HREF="#SHIPPING">132</A>'],</PRE>
              For country-specific shipping methods, list the country's 3 digit
              code from %countries in
              <I><A HREF="../Databases/outlet.state_country.setup" TARGET="w1" onClick="window.open('','w1','width=640,height=480,scrollbars,resizable,top=0,left=0')">outlet.state_country.setup</A></I>
              in element three. Only one country code may be listed in element three
              for a country-specific shipping method.</TD></TR>



      <!-- SPACER -->
      <TR><TD COLSPAN=3 HEIGHT=3></TD></TR>
      <TR><TD COLSPAN=2></TD>
          <TD><PRE>

<A NAME="array11">'</A>13' => ['Alaska &amp; Hawaii', '12.00', '.04', '<A HREF="#SHIPPING">11:21</A>'],</PRE>
              For state-specific shipping methods, list state 2 digit
              codes from %states in
              <I><A HREF="../Databases/outlet.state_country.setup" TARGET="w1" onClick="window.open('','w1','width=640,height=480,scrollbars,resizable,top=0,left=0')">outlet.state_country.setup</A></I>
              in element three. More than one state code may be listed in element
              three for a state-specific shipping method. Colon delimit multiple
              state codes.</TD></TR>
      </TABLE>


  <DT>&nbsp;
  <DT>&nbsp;
  <DT><CENTER><FONT SIZE=2><A HREF="#SHIPPING">%SHIPPING</A> | <A HREF="#top">Top of Page</A></FONT><HR WIDTH="85%" NOSHADE SIZE=1></CENTER>
  <DT>&nbsp;
  <DT>&nbsp;


<SCRIPT LANGUAGE="JavaScript" src="js.page_trailer.js"></SCRIPT>
</DL>


 

</BODY>
</HTML>
