The addToShoppingCart.asp module adds a product to the shopping cart by adding a row to arrays held in session variables.
aiSKProductIDs = session("aiSKProductIDs")
aiSKCategoryIDs = session("aiSKCategoryIDs")
aiSKProductQuantitys = session("aiSKProductQuantitys")
aiSKProductPrices = session("aiSKProductPrices")
acSKProductNames = session("acSKProductNames")
acSKProductDescriptions = session("acSKProductDescriptions")
jCount = CInt(iCartCount + 1)redim preserve aiSKProductIDs(jCount) redim preserve aiSKCategoryIDs(jCount) redim preserve aiSKProductQuantitys(jCount) redim preserve aiSKProductPrices(jCount)
redim preserve acSKProductNames(jCount)
redim preserve acSKProductDescriptions(jCount)
aiSKProductIDs(iCartCount) = request("iProductID")
aiSKCategoryIDs(iCartCount) = request("iCategoryID")
aiSKProductQuantitys(iCartCount) = htmlQuantity
aiSKProductPrices(iCartCount) = request("iProductPrice")
acSKProductNames(iCartCount) = request("cProductName")
acSKProductDescriptions(iCartCount) = request("cProductDescription")
session("aiSKProductIDs") = aiSKProductIDs
session("aiSKCategoryIDs") = aiSKCategoryIDs
session("aiSKProductQuantitys") = aiSKProductQuantitys
session("aiSKProductPrices") = aiSKProductPrices
session("acSKProductNames") = acSKProductNames
session("acSKProductDescriptions") = acSKProductDescriptions