% ' Comersus Shopping Cart ' Comersus Open Technologies ' United States ' Software License can be found at License.txt ' http://www.comersus.com ' Details: view item details, increase visits %> <% on error resume next dim connTemp, rsTemp, mySql, pIdProduct, pDescription, pPrice, pGST, pApplyGST, pGSTRate, pDetails, pListPrice, pImageUrl, pWeight, pIdProduct2 ' get settings. pStoreFrontDemoMode = getSettingKey("pStoreFrontDemoMode") pCurrencySign = getSettingKey("pCurrencySign") pDecimalSign = getSettingKey("pDecimalSign") pCompany = getSettingKey("pCompany") pCompanyCountryCode = getSettingKey("pCompanyCountryCode") pApplyGST = getSettingKey("pGST") pGSTRate = getSettingKey("pGSTRate") pCompanySlogan = getSettingKey("pCompanySlogan") pHeaderKeywords = getSettingKey("pHeaderKeywords") pMoneyDontRound = getSettingKey("pMoneyDontRound") pCurrencyConversion = lCase(getSettingKey("pCurrencyConversion")) pShowBtoBPrice = getSettingKey("pShowBtoBPrice") pShowStockView = getSettingKey("pShowStockView") pProductReviews = getSettingKey("pProductReviews") pUnderStockBehavior = lCase(getSettingKey("pUnderStockBehavior")) pAuctions = getSettingKey("pAuctions") pSuppliersList = getSettingKey("pSuppliersList") pNewsLetter = getSettingKey("pNewsLetter") pAffiliatesStoreFront = getSettingKey("pAffiliatesStoreFront") pAllowNewCustomer = getSettingKey("pAllowNewCustomer") pRssFeedServer = getSettingKey("pRssFeedServer") pRealTimeShipping = lCase(getSettingKey("pRealTimeShipping")) pCompareWithAmazon = getSettingKey("pCompareWithAmazon") pAdSenseClient = getSettingKey("pAdSenseClient") pShowNews = getSettingKey("pShowNews") pEmailToFriend = getSettingKey("pEmailToFriend") pWishList = getSettingKey("pWishList") pRelatedProducts = getSettingKey("pRelatedProducts") pGetRelatedProductsLimit = getSettingKey("pGetRelatedProductsLimit") pProductCustomField1 = getSettingKey("pProductCustomField1") pProductCustomField2 = getSettingKey("pProductCustomField2") pProductCustomField3 = getSettingKey("pProductCustomField3") ' session. pIdCustomer = getSessionVariable("idCustomer",0) pIdCustomerType = getSessionVariable("idCustomerType",1) pIdProduct = getUserInput(request.queryString("idProduct"),10) pImage = getUserInput(request.queryString("image"),2) pIdAffiliate = getUserInput(request.querystring("idAffiliate"),4) if pImage = "" then pImage = 1 end if ' set affiliate. if isNumeric(pIdAffiliate) then session("idAffiliate") = pIdAffiliate end if if trim(pIdProduct) = "" or IsNumeric(pIdProduct) = false then response.redirect "comersus_message.asp?message=" & Server.Urlencode(getMsg(17,"Invalid")) end if call customerTracking("comersus_viewItem.asp", request.querystring) ' increase visits to the product. mySQL = "UPDATE products SET visits=visits+1 WHERE idProduct=" & pIdProduct call updateDatabase(mySQL, rsTemp, "ViewItem") ' redirect to rental screen. if isRental(pIdProduct) then response.redirect "comersus_optRentalEnterInterval.asp?idProduct=" & pIdProduct end if ' redirect to bundle screen. if isBundleMain(pIdProduct) then response.redirect "comersus_viewItemBundle.asp?idProduct=" & pIdProduct end if ' redirect to donation screen. if isDonation(pIdProduct) then response.redirect "comersus_viewItemDonation.asp?idProduct=" & pIdProduct end if ' check for discount per quantity. pDiscountPerQuantity = itHasDiscountPerQty(pIdProduct) ' check for auctions. pIdAuction = getIdAuction(pIdProduct) ' get item price. pPrice = getPrice(pIdProduct, pIdCustomerType, pIdCustomer) ' gets item details from db. mySQL = "SELECT description, details, gst, listPrice, map, imageUrl, imageUrl2, imageUrl3, imageUrl4, sku, formQuantity, hasPersonalization, freeShipping, isDonation, searchKeywords, user1, user2, user3 FROM products WHERE idProduct=" & pIdProduct & " AND active=-1 AND idStore=" & pIdStore call getFromDatabase (mySql, rsTemp, "ViewItem") if rsTemp.eof then response.redirect "comersus_message.asp?message=" & Server.Urlencode(getMsg(580,"Cannot get product details. Please contact us to request more information about item " & pIdProduct)) end if pDescription = rsTemp("description") pDetails = rsTemp("details") pGST = rsTemp("gst") pListPrice = rsTemp("listPrice") pMapPrice = rsTemp("map") pImageUrl = rsTemp("imageUrl") pImageUrl2 = rsTemp("imageUrl2") pImageUrl3 = rsTemp("imageUrl3") pImageUrl4 = rsTemp("imageUrl4") pStock = getStock(pIdProduct) pSku = rsTemp("sku") pFormQuantity = rsTemp("formQuantity") pHasPersonalization = rsTemp("hasPersonalization") pFreeShipping = rsTemp("freeShipping") pIsDonation = rsTemp("isDonation") pSearchKeywords = rsTemp("searchKeywords") pUser1 = rsTemp("user1") pUser2 = rsTemp("user2") pUser3 = rsTemp("user3") ' for meta tags. pTitle = pDescription & " " & pCurrencySign & money(pPrice) pMetaDescription = pDescription & " " & pCurrencySign & money(pPrice) %> <%if pAdSenseClient <> "0" and checkAvailability() then%> <%end if%>