<% ' Comersus 4.2x Sophisticated Cart ' Developed by Rodrigo S. Alhadeff ' Dic-2002 ' Open Source License can be found at License.txt ' http://www.comersus.com ' Details: show a list of orders %> <% on error resume next dim connTemp, rsTemp, mySql, counter pIdCustomer = getSessionVariable("idCustomer","0") if pIdCustomer="0" then response.redirect "supportError.asp?error="&Server.Urlencode("Customer not logged in at ShowOrders") end if ' get settings pDefaultLanguage = getSettingKey("pDefaultLanguage") pStoreFrontDemoMode = getSettingKey("pStoreFrontDemoMode") pCurrencySign = getSettingKey("pCurrencySign") pDecimalSign = getSettingKey("pDecimalSign") pCompany = getSettingKey("pCompany") pCompanyLogo = getSettingKey("pCompanyLogo") pAuctions = getSettingKey("pAuctions") pListBestSellers = getSettingKey("pListBestSellers") pNewsLetter = getSettingKey("pNewsLetter") pPriceList = getSettingKey("pPriceList") pStoreNews = getSettingKey("pStoreNews") pOneStepCheckout = getSettingKey("pOneStepCheckout") pOrderPrefix = getSettingKey("pOrderPrefix") ' get orders mySQL="SELECT orders.idOrder, orderDate, total, orderstatus FROM orders, customers WHERE orders.idcustomer=customers.idcustomer AND customers.idcustomer=" &pIdCustomer& " ORDER by orders.IdOrder DESC" call getFromDatabase (mySql, rsTemp,"customerShowOrders") if rstemp.eof then response.redirect "message.asp?message="&Server.Urlencode(dictLanguage.Item(Session("language")&"_customershoworders_2") ) end if counter=Cint(0) %>

<%=dictLanguage.Item(Session("language")&"_customershoworders_6")%>

<%do while not rstemp.eof counter = counter +1 pIdOrder = rstemp("idOrder") pOrderDate = rstemp("orderDate") pTotal = rstemp("total") pOrderStatus = rstemp("orderStatus") %> <%rstemp.movenext loop%>
<%=dictLanguage.Item(Session("language")&"_customershoworders_8")%> <%=dictLanguage.Item(Session("language")&"_customershoworders_9")%> <%=dictLanguage.Item(Session("language")&"_customershoworders_10")%> <%=dictLanguage.Item(Session("language")&"_customershoworders_11")%>
<%=pOrderDate%> <%=pOrderPrefix&pIdorder%> <%=pCurrencySign & money(ptotal)%> <%select case pOrderStatus case 1 response.write dictLanguage.Item(Session("language")&"_customershoworders_3") case 2 response.write dictLanguage.Item(Session("language")&"_customershoworders_4") case 3 response.write dictLanguage.Item(Session("language")&"_customershoworders_5") case 4 response.write dictLanguage.Item(Session("language")&"_customershoworders_7") end select%>


<%call closeDb()%>