<% ' Comersus Shopping Cart ' Comersus Open Technologies ' United States ' Software License can be found at License.txt ' http://www.comersus.com ' Details: get products marked as showInHome %> <% on error resume next dim connTemp, rsTemp, rsTemp3, pItemsShown, pMaxPopularity, arrCounter, pIdCustomer, pIdCustomerType, howManyHome, mySQL, pDefaultLanguage, pStoreFrontDemoMode, pCurrencySign, pDecimalSign, pMoneyDontRound, pCompany, pCompanyLogo, pHeaderKeywords, pAuctions, pListBestSellers, pNewsLetter, pPriceList, pStoreNews, pOneStepCheckout, pAffiliatesStoreFront, pShowStockView, pIdProductVip, pLastChanceListing, pAllowNewCustomer, pListProductsByLetter, pRunInstallationWizard, pIdProduct, pDescription, pDetails, pDetailsVip, pImageUrlVip, pLanguage, pCustomerName, pHeaderCartItems, pHeaderCartSubtotal, pItemCounter, f, h call saveCookie() ' get settings pStoreFrontDemoMode = getSettingKey("pStoreFrontDemoMode") pCurrencySign = getSettingKey("pCurrencySign") pDecimalSign = getSettingKey("pDecimalSign") pMoneyDontRound = getSettingKey("pMoneyDontRound") pCompany = getSettingKey("pCompany") pCompanySlogan = getSettingKey("pCompanySlogan") pAboutUsLink = getSettingKey("pAboutUsLink") pStoreLocation = getSettingKey("pStoreLocation") pHeaderKeywords = getSettingKey("pHeaderKeywords") pDateSwitch = getSettingKey("pDateSwitch") pDateFormat = getSettingKey("pDateFormat") pSuppliersList = getSettingKey("pSuppliersList") pAuctions = getSettingKey("pAuctions") pAffiliatesStoreFront = getSettingKey("pAffiliatesStoreFront") pRssFeedServer = getSettingKey("pRssFeedServer") pNewsLetter = getSettingKey("pNewsLetter") pShowStockView = getSettingKey("pShowStockView") pAllowNewCustomer = getSettingKey("pAllowNewCustomer") pRunInstallationWizard = getSettingKey("pRunInstallationWizard") pItemsShown = Cint(getSettingKey("pItemsShown")) pShowNews = getSettingKey("pShowNews") pShowAddedToday = getSettingKey("pShowAddedToday") if pRunInstallationWizard="-1" then response.redirect "../backofficeLite/comersus_backoffice_install0.asp" end if pMaxPopularity = 0 arrCounter = 0 pTodayCount = 0 pIdCustomer = getSessionVariable("idCustomer",0) pIdCustomerType = getSessionVariable("idCustomerType",1) ' get how many products are marked as showInHome mySQL="SELECT COUNT(idProduct) AS howManyHome FROM products WHERE showInHome=-1 AND active=-1 AND listHidden=0 AND idStore=" &pIdStore call getFromDatabase (mySql, rsTemp3, "dynamic_index") if rsTemp3.eof then howManyHome=0 else howManyHome=rstemp3("howManyHome") end if if Cint(howManyHome) <% pColNumber=1 for f=0 to pItemsShown-1 %> <%if pColNumber=1 then%> <%pColNumber=1%> <%end if%> <%next%> <%if pShowAddedToday="-1" then mySQL="SELECT idProduct, description FROM products WHERE dateAdded='" &Date()& "' AND idStore="& pIdStore& " AND listHidden=0 AND active=-1 and isBundleMain=0 ORDER BY idProduct DESC" call getFromDatabase(mySql, rstemp,"index") if not rsTemp.eof then pIdProduct1 =rstemp("idProduct") pDescription1 =rstemp("description") pTodayCount =pTodayCount+1 end if if not rsTemp.eof then rstemp.movenext if not rsTemp.eof then pIdProduct2 =rstemp("idProduct") pDescription2 =rstemp("description") pTodayCount =pTodayCount+1 end if end if%> <%if pShowAddedToday="-1" and pTodayCount>1 then%> <%end if%>
<%end if%> <%if arrProducts(f,4)<>"" then%> <%=arrProducts(f,1)%> <%else%> <%=getMsg(5,"> <%end if%> <%=arrProducts(f,1)%> <%if pShowStockView="-1" then%>
<%=getMsg(3,"Stock")%>: <%=arrProducts(f,5)%> <%end if%>
<%=getMsg(4,"Pop")%>  <%=arrProducts(f,7)%>
<%=getMsg(1,"More")%>
<%=getMsg(2,"Price")%>   <%if arrProducts(f,8) = "-1" Then%> <%=getMsg(745,"add to cart to find out")%> <%else%> <%=pCurrencySign & money(getPrice(arrProducts(f,0), pIdCustomerType, pIdCustomer))%> <%end if%>
>
<%if pColNumber=1 then%>
<%pColNumber=2%> <%else%>
 

<%=getMsg(724,"added today")%>  

  <%=pDescription1%>

<%=getMsg(2,"Price")%>  <%=pCurrencySign & money(getPrice(pIdProduct1, pIdCustomerType, pIdCustomer))%>

<%=getMsg(725,"More...")%>

  <%=pDescription2%>

<%=getMsg(2,"Price")%>  <%=pCurrencySign & money(getPrice(pIdProduct2, pIdCustomerType, pIdCustomer))%>

<%=getMsg(725,"More...")%>

<%call closeDb()%>