[ic] Shipping Quote - SOLVED

Steve icdev at mrlock.com
Fri Jul 2 10:24:56 EDT 2004

Here is a brute force method to access the shipping quotes within
Interchange. It adds an item to a new cart that weighs 1 pound, then
calculates the weight for x number of items.
I'm not sure the request form action headers are quite correct for each of
these page requests - so please correct me if necessary.
sh.html <- get the zip code and weight/number of items from the user.

<FORM ACTION="[process secure=0]" METHOD="POST" name=checkout>
    <INPUT TYPE=hidden NAME=mv_session_id VALUE="[data session id]">
    <INPUT TYPE=hidden NAME=mv_doit VALUE=refresh>
    <INPUT TYPE=hidden NAME=mv_nextpage VALUE="sh2">

<table width="95%">
<tr><td align="center">
Enter your zip code and click Calculate
	    <td align="left" class="contentbar1">

	      [error name=zip std_label="Enter ship to Zip/Postal Code" required=1]

	     <INPUT TYPE=text NAME=zip VALUE="[value name=zip filter=word]"
size="10" maxlength="10">
[error name=zip2 std_label="Weight" required=1]
	      <INPUT TYPE=text NAME=t_qty_items VALUE="1" size="3" maxlength="3">
<input type="submit" value="Calculate">


sh2.html <- calculate & display all valid shipping options.

[comment] Clear cart [/comment]
        @{$Carts->{$CGI->{mv_cartname} || 'main'}} = ();

[comment] add item that weighs 1 lb, however many times needed
The following routine also uses the add_item tag that was supplied in the
archives - it is not
a default tag in IC 4.8.x
[add_item code="12129" qty="[calc][cgi t_qty_items][/calc]"]
[seti weight][summary amount=`[item-quantity] * [item-field weight]`][/seti]
For ([scratch weight]) lbs - we offer these standard options:<br>
       [loop option=mv_shipmode
       list=|[data table=country key='[default country US]'
l=shipmodes]|   ]
<OPTION VALUE="[loop-code]"> [shipping-desc [loop-code]]: [shipping

[comment] Clear cart again [/comment]
        @{$Carts->{$CGI->{mv_cartname} || 'main'}} = ();


Hope this is useful

More information about the interchange-users mailing list