<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.whirlwind-ecommerce.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Functions%3AorderGetShipArray</id>
		<title>Functions:orderGetShipArray - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.whirlwind-ecommerce.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Functions%3AorderGetShipArray"/>
		<link rel="alternate" type="text/html" href="http://wiki.whirlwind-ecommerce.com/mediawiki/index.php?title=Functions:orderGetShipArray&amp;action=history"/>
		<updated>2026-05-01T11:52:23Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>http://wiki.whirlwind-ecommerce.com/mediawiki/index.php?title=Functions:orderGetShipArray&amp;diff=617&amp;oldid=prev</id>
		<title>71.163.185.8 at 02:54, 26 February 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.whirlwind-ecommerce.com/mediawiki/index.php?title=Functions:orderGetShipArray&amp;diff=617&amp;oldid=prev"/>
				<updated>2009-02-26T02:54:24Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 02:54, 26 February 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*$totalWeight FLOAT OPTIONAL&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*$totalWeight FLOAT OPTIONAL&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:: The total weight to be considered when retrieving shipping options / prices from the Fedex zone shipping tables.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:: The total weight to be considered when retrieving shipping options / prices from the Fedex zone shipping tables.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Return Values ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Return Values ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Returns a multidimensional array of shipping options and their details. The first dimension is the index of the shipping options. The second dimension contains the keys for each of the shipping option's data elements.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Returns a multidimensional array of shipping options and their details. The first dimension is the index of the shipping options. The second dimension contains the keys for each of the shipping option's data elements.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 28:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; [typeCode] =&amp;gt; String&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; [typeCode] =&amp;gt; String&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; [shipAmount] =&amp;gt; Float&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; [shipAmount] =&amp;gt; Float&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; // the following &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2 &lt;/del&gt;fields are only included if the shipping data is from the level tables&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; // the following &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;3 &lt;/ins&gt;fields are only included if the shipping data is from the level tables&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; [charge] =&amp;gt; Float&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; [charge] =&amp;gt; Float&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; [percent] =&amp;gt; Float&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; [percent] =&amp;gt; Float&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>71.163.185.8</name></author>	</entry>

	<entry>
		<id>http://wiki.whirlwind-ecommerce.com/mediawiki/index.php?title=Functions:orderGetShipArray&amp;diff=616&amp;oldid=prev</id>
		<title>71.163.185.8: New page: == Description == eV::orderGetShipArray($itemTotal=NULL,$toZip=NULL,$totalWeight=NULL) retrieves an array of shipping options that can be offered to visitors for an order. The shipping opt...</title>
		<link rel="alternate" type="text/html" href="http://wiki.whirlwind-ecommerce.com/mediawiki/index.php?title=Functions:orderGetShipArray&amp;diff=616&amp;oldid=prev"/>
				<updated>2009-02-26T02:53:41Z</updated>
		
		<summary type="html">&lt;p&gt;New page: == Description == eV::orderGetShipArray($itemTotal=NULL,$toZip=NULL,$totalWeight=NULL) retrieves an array of shipping options that can be offered to visitors for an order. The shipping opt...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Description ==&lt;br /&gt;
eV::orderGetShipArray($itemTotal=NULL,$toZip=NULL,$totalWeight=NULL) retrieves an array of shipping options that can be offered to visitors for an order. The shipping options will be calculated based on the attributes sent in combinations with the shipping settings set up in [[Settings]] &amp;gt; eCommerce and [[Shipping]].&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
$array = eV::orderGetShipArray([$itemTotal],[$toZip],[$totalWeight]);&lt;br /&gt;
&lt;br /&gt;
== Paramaters ==&lt;br /&gt;
''NOTE: either $itemTotal (for shipping level tables) OR $toZip+$totalWeight (for Fedex calculations) are required''&lt;br /&gt;
*$itemTotal FLOAT OPTIONAL&lt;br /&gt;
:: The order dollar value to be used for pulling shipping options / prices from the [[Shipping]] level tables.&lt;br /&gt;
*$toZip INT OPTIONAL&lt;br /&gt;
:: The shipping zip code that the order will be sent to. Used to retrieve shipping options / prices from the Fedex zone shipping tables.&lt;br /&gt;
*$totalWeight FLOAT OPTIONAL&lt;br /&gt;
:: The total weight to be considered when retrieving shipping options / prices from the Fedex zone shipping tables.&lt;br /&gt;
== Return Values ==&lt;br /&gt;
Returns a multidimensional array of shipping options and their details. The first dimension is the index of the shipping options. The second dimension contains the keys for each of the shipping option's data elements.&lt;br /&gt;
&lt;br /&gt;
The returned array is as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        ( &lt;br /&gt;
            [type] =&amp;gt; String&lt;br /&gt;
            [typeCode] =&amp;gt; String&lt;br /&gt;
            [shipAmount] =&amp;gt; Float&lt;br /&gt;
            // the following 2 fields are only included if the shipping data is from the level tables&lt;br /&gt;
            [charge] =&amp;gt; Float&lt;br /&gt;
            [percent] =&amp;gt; Float&lt;br /&gt;
            [minAmount] =&amp;gt; Float&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array...&lt;br /&gt;
       ( .. same as above ..)&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
;Using Fedex Tables (be sure fedex shipping option is setup and configured via [[Settings]]&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// lets get the weight and target zip code&lt;br /&gt;
$orderArr = eV::orderGetCompleteArray();&lt;br /&gt;
&lt;br /&gt;
// extract data from orderArr that will be passed to orderGetShipArray function&lt;br /&gt;
$weight = $orderArr['order']['weightTotal'];&lt;br /&gt;
$toZip = $orderArr['items'][0]['zipCode'];&lt;br /&gt;
&lt;br /&gt;
// extract data from orderArr for current shipping option/prices selected&lt;br /&gt;
$currentShipTypeCode = $orderArr['items'][0]['shipTypeCode'];&lt;br /&gt;
&lt;br /&gt;
// extract addressId for form select&lt;br /&gt;
$sale_addressId = $orderArr['items'][0]['sale_addressId']&lt;br /&gt;
&lt;br /&gt;
// get shipping options&lt;br /&gt;
// note we are using the 2nd ($toZip) and 3rd ($weight) attributes because this is a Fedex shipping query&lt;br /&gt;
$shipArr = eV::orderGetShipArray(NULL,$toZip,$weight);&lt;br /&gt;
&lt;br /&gt;
// output shipping options as a form allowing customer to select and commit to the cart&lt;br /&gt;
echo &amp;quot;&amp;lt;form action=\&amp;quot;index.php\&amp;quot; method=\&amp;quot;post\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
echo &amp;quot;&amp;lt;select name=\&amp;quot;shipping4addressId&amp;quot; . $sale_addressId . &amp;quot;\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
foreach($shipArr as $ship) {&lt;br /&gt;
echo &amp;quot;&amp;lt;option value=\&amp;quot;&amp;quot; . htmlspecialchars($ship['typeCode']) . &amp;quot;\&amp;quot;;&lt;br /&gt;
if($currentShipTypeCode == $ship['typeCode']) echo &amp;quot; selected &amp;quot;;&lt;br /&gt;
echo &amp;quot;&amp;gt;&amp;quot; . htmlspecialchars($ship['shipType']) . &amp;quot;: &amp;quot; . eV::dollarFormat($ship['shipAmount']) . &amp;quot;&amp;lt;/option&amp;gt;&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
echo &amp;quot;&amp;lt;/select&amp;gt;&amp;quot;;&lt;br /&gt;
// lets put zipCode in this form since its required to get the shipping total&lt;br /&gt;
echo &amp;quot; Enter Zip Code: &amp;lt;input type=\&amp;quot;text\&amp;quot; name=\&amp;quot;zipCode\&amp;quot; value=\&amp;quot;&amp;quot; . htmlspecialchars($toZip) . &amp;quot;\&amp;quot; size=\&amp;quot;12\&amp;quot; maxlength=\&amp;quot;10\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
echo &amp;quot; &amp;lt;input type=\&amp;quot;submit\&amp;quot; value=\&amp;quot;Submit\&amp;quot;&amp;gt; &amp;quot;;&lt;br /&gt;
echo &amp;quot; &amp;lt;input type=\&amp;quot;hidden\&amp;quot; name=\&amp;quot;fa\&amp;quot; value=\&amp;quot;ORDER.cartUpdate\&amp;quot;&amp;gt; &amp;quot;;&lt;br /&gt;
echo &amp;quot;&amp;lt;/form&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Using Shipping Price Levels (requires setup in [[Settings]] &amp;gt; eCommerce AND levels created in [[Shipping]])&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// lets get the weight and target zip code&lt;br /&gt;
$orderArr = eV::orderGetCompleteArray();&lt;br /&gt;
&lt;br /&gt;
// extract data from orderArr that will be passed to orderGetShipArray function&lt;br /&gt;
$itemTotal = $orderArr['order']['itemTotal'];&lt;br /&gt;
&lt;br /&gt;
// extract data from orderArr for current shipping option/prices selected&lt;br /&gt;
$currentShipTypeCode = $orderArr['items'][0]['shipTypeCode'];&lt;br /&gt;
&lt;br /&gt;
// extract addressId for form select&lt;br /&gt;
$sale_addressId = $orderArr['items'][0]['sale_addressId']&lt;br /&gt;
&lt;br /&gt;
// get shipping options&lt;br /&gt;
// note we are using only the 1st ($itemTotal) attribute because this is a Shipping level table query&lt;br /&gt;
$shipArr = eV::orderGetShipArray($itemTotal);&lt;br /&gt;
&lt;br /&gt;
// output shipping options as a form allowing customer to select and commit to the cart&lt;br /&gt;
echo &amp;quot;&amp;lt;form action=\&amp;quot;index.php\&amp;quot; method=\&amp;quot;post\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
echo &amp;quot;&amp;lt;select name=\&amp;quot;shipping4addressId&amp;quot; . $sale_addressId . &amp;quot;\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
foreach($shipArr as $ship) {&lt;br /&gt;
echo &amp;quot;&amp;lt;option value=\&amp;quot;&amp;quot; . htmlspecialchars($ship['typeCode']) . &amp;quot;\&amp;quot;;&lt;br /&gt;
if($currentShipTypeCode == $ship['typeCode']) echo &amp;quot; selected &amp;quot;;&lt;br /&gt;
echo &amp;quot;&amp;gt;&amp;quot; . htmlspecialchars($ship['shipType']) . &amp;quot;: &amp;quot; . eV::dollarFormat($ship['shipAmount']) . &amp;quot;&amp;lt;/option&amp;gt;&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
echo &amp;quot;&amp;lt;/select&amp;gt;&amp;quot;;&lt;br /&gt;
echo &amp;quot; &amp;lt;input type=\&amp;quot;submit\&amp;quot; value=\&amp;quot;Submit\&amp;quot;&amp;gt; &amp;quot;;&lt;br /&gt;
echo &amp;quot; &amp;lt;input type=\&amp;quot;hidden\&amp;quot; name=\&amp;quot;fa\&amp;quot; value=\&amp;quot;ORDER.cartUpdate\&amp;quot;&amp;gt; &amp;quot;;&lt;br /&gt;
echo &amp;quot;&amp;lt;/form&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>71.163.185.8</name></author>	</entry>

	</feed>