Hello all. I have a structure of arrays that I need to sort for my shopping
cart. The structure is "stWSShoppingBasket" and the key that holds the
arrays is "BasketSKU". I need to sort this stucture of arrays based on
"BasketSKU". I am stumped as to why I can't get this to work. What should my
StructSort line say [last line of code]?


<cfscript>
        if (NOT isDefined("stWSShoppingBasket")) {
                // Check to make sure that the Shopping cart structure exists.
                stWSShoppingBasket = structNew();
        }

        tempValue =
ListToArray('#Product_ID#,#Quantity#,#WS_Price#,#OptTitle#,#OptPartNumber#')
;

        // If the item is not yet in the cart, simply add it to the cart.
        if (NOT(StructKeyExists(stWSShoppingBasket, BasketSKU))) {
                StructInsert(stWSShoppingBasket,BasketSKU,tempValue);

                // StructSort(stWSShoppingBasket,"Numeric","ASC",BasketSKU);
        }
</cfscript>


Thanks, Che


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209979
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to