<% ' Comersus Shopping Cart ' Comersus Open Technologies ' United States ' Software License can be found at License.txt ' http://www.comersus.com ' Details: list one category %> <% dim mySQL, connTemp, rsTemp, pIdCategory, pCategoryDesc, pIdAffiliate, pStoreFrontDemoMode, pCurrencySign, pDecimalSign, pCompany, pAuctions, pListBestSellers, pNewsLetter, pPriceList, pStoreNews, pAffiliatesStoreFront, pCategoriesAlphOrder, pAllowNewCustomer, pHeaderKeywords, pCustomerName, pHeaderCartItems, pHeaderCartSubtotal, pMoneyDontRound, pImageCategory, pCategoryString, pSomethingInside call saveCookie() on error resume next ' set affiliate pIdAffiliate=getUserInput(request.querystring("idAffiliate"),4) if isNumeric(pIdAffiliate)then session("idAffiliate")= pIdAffiliate end if ' get settings pStoreFrontDemoMode = getSettingKey("pStoreFrontDemoMode") pCurrencySign = getSettingKey("pCurrencySign") pDecimalSign = getSettingKey("pDecimalSign") pCompany = getSettingKey("pCompany") pCompanySlogan = getSettingKey("pCompanySlogan") pAboutUsLink = getSettingKey("pAboutUsLink") pStoreLocation = getSettingKey("pStoreLocation") pHeaderKeywords = getSettingKey("pHeaderKeywords") pAuctions = getSettingKey("pAuctions") pSuppliersList = getSettingKey("pSuppliersList") pNewsLetter = getSettingKey("pNewsLetter") pAffiliatesStoreFront = getSettingKey("pAffiliatesStoreFront") pAllowNewCustomer = getSettingKey("pAllowNewCustomer") pRssFeedServer = getSettingKey("pRssFeedServer") pCategoriesAlphOrder = getSettingKey("pCategoriesAlphOrder") pShowNews = getSettingKey("pShowNews") ' session pIdCustomer = getSessionVariable("idCustomer",0) pIdCustomerType = getSessionVariable("idCustomerType",1) pIdCategoryRoot = getCategoryStart(pIdStore) ' get category pIdCategory = getUserInput(request.querystring("idCategory"),8) pSomethingInside = 0 call customerTracking("comersus_listOneCategory.asp", request.querystring) ' get category details mySQL="SELECT idCategory, categoryDesc, details, imageCategory, keywords FROM categories WHERE idCategory=" & pIdCategory call getFromDatabase (mySql, rsTemp, "listCategoriesAndProducts") if rstemp.eof then response.redirect "comersus_message.asp?message="&Server.Urlencode(getMsg(6,"Invalid ctg")) end if pCategoryDesc =rstemp("categoryDesc") pDetails =rstemp("details") pImageCategory =rstemp("imageCategory") pSearchKeywords = rsTemp("keywords") pCategoryString=pCategoryDesc call getCategoryPath(pIdCategory, pCategoryString) pArrayCategories=split(pCategoryString,"|") ' check redirection to listItems if isCategoryLeaf(pIdCategory) then mySQL="SELECT COUNT(*) AS productsCount FROM products, categories_products WHERE products.idProduct=categories_products.idProduct AND categories_products.idCategory="& pIdCategory&" AND listHidden=0 AND active=-1 AND idStore=" &pIdStore call getFromDatabase (mySql, rsTemp, "listCategoriesAndProducts") if not rsTemp.eof then response.redirect "comersus_listItems.asp?idCategory="&pIdCategory end if end if %>
<%=getMsg(8,"You are at")%> <%for f=uBound(pArrayCategories) to 0 step -1%> > <%=pArrayCategories(f)%> <%next%>
<%if pImageCategory<>"" then%>
<%=pCategoryDesc%>
<%end if%>
<%=pDetails%>

<%=getMsg(744,"subcat")%>
<% mySQL="SELECT idCategory, categoryDesc, details, imageCategory FROM categories WHERE active=-1 AND idParentCategory=" & pIdCategory call getFromDatabase (mySql, rsTemp, "listCategoriesAndProducts") do while not rsTemp.eof pSomethingInside=-1 %>
"><%=rstemp("categoryDesc")%> <% rsTemp.movenext loop %> <%if pSomethingInside=0 then%> <%=getMsg(9,"No items")%> <%end if%> <%call closeDb()%>