<% ' 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%> <%if pMapPrice = "-1" then%> <%else%> <%if pCompanyCountryCode = "AU" and pApplyGST = "-1" then%> <%if pGST = "-1" then pItemGST = pPrice * pGSTRate%> <%else pItemGST = "Exempt"%> <%end if%> <%end if%> <%if pCurrencyConversion="static" then%> <%end if%> <%if pCurrencyConversion="dynamic" then%> <%end if%> <%if trim(pShowBtoBPrice) = "-1" and pIdCustomerType = 1 and getPrice(pIdProduct, 2, pIdCustomer) > 0 then%> <%end if%> <%if trim(pShowBtoBPrice) = "-1" and pCompanyCountryCode = "AU" and pApplyGST = "-1" then%> <%if pGST = "-1" then pItemGST = getPrice(pIdProduct, 2, pIdCustomer) * pGSTRate%> <%else pItemGST = "Exempt"%> <%end if%> <%end if%> <%if (pListPrice-pPrice) > 0 then%> <%end if%> <%end if%> <%if pShowStockView = "-1" then%> <%end if%> <%if pCompareWithAmazon = "-1" then pAmazonPrice = getAmazonPrice(pSku) if pAmazonPrice > pPrice then%> <%end if ' price is better. end if%> <%if pProductCustomField1 <> "" and pUser1 <> "" then%> <%end if%> <%if pProductCustomField2 <> "" and pUser2 <> "" then%> <%end if%> <%if pProductCustomField3 <> "" and pUser3 <> "" then%> <%end if%> <%if pProductReviews = "-1" then pRateReview = getRateReview(pIdProduct) if Cdbl(pRateReview) > 0 then%> <%else%> <%end if%> <%end if ' reviews%> <%if pHasPersonalization = -1 then%> <%end if%>

<%=getOptionsGroups(pIdProduct)%> <%if pUnderStockBehavior = "backorder" and Cdbl(pStock) <= 0 then%> <%if pIdCustomer > 0 then%> <%else%> <%end if%> <%else%> <%end if%> <%if pDiscountPerQuantity = -1 then%> <%end if%> <%if pEmailToFriend = "-1" then%> <%end if%> <%if pWishList="-1" then%> <%end if%> <%if pFreeShipping = -1 and (pRealTimeShipping = "none" or pRealTimeShipping = "ups") then%> <%end if%>
<%=pSku & " " & pDescription%>
<%call getImage(pImageUrl, pImageUrl2, pImageUrl3, pImageUrl4, pImage)%>
<%=pDetails%>

<%=getMsg(15,"Price")%> :[<%=getMsg(745,"add to cart to find out")%>]
<%=pCurrencySign & money(pPrice)%>
GST :
<%=pCurrencySign & money(pItemGST)%>
GST :
<%=pItemGST%>

<%=getMsg(18,"Other cur")%>

<%=getMsg(18,"Other cur")%>

<%=getMsg(151,"Wholesale")%> <%=getMsg(15,"Price")%> :
<%=pCurrencySign & money(getPrice(pIdProduct, 2, pIdCustomer))%>
GST :
<%=pCurrencySign & money(pItemGST)%>
GST :
<%=pItemGST%>

<%=getMsg(19,"List price")%> <%=pCurrencySign & money(pListPrice)%> <%=getMsg(16,"Saving")%> <%=pCurrencySign & money(pListPrice - pPrice)%>

<%=getMsg(20,"Stock")%> <%=pStock%>

<%=getMsg(21,"Amazon price")%>  $ <%=(pAmazonPrice)%>
<%=getMsg(22,"See yself")%>

<%=pProductCustomField1%>: <%=pUser1%>

<%=pProductCustomField2%>: <%=pUser2%>

<%=pProductCustomField3%>: <%=pUser3%>

<%=getMsg(23,"Rated")%> <%=round(pRateReview,2)%> 

<%=getMsg(24,"Not rated")%>

<%=getMsg(25,"Person")%>

<%=getMsg(746,"2 backorder")%>. <%=getMsg(747,"we will notify...")%>

<%=getMsg(748,"login 2 backorder")%>.

 ">

<%=getMsg(27,"Discounts qty")%>
<%end if%> <%if pIdAuction > 0 then%>

<%=getMsg(28,"Get 4 less")%> <%=getMsg(29,"Auction")%>

"><%=getMsg(30,"Email 2 friend")%>

<%=getMsg(31,"Add 2 WL")%>

<%=getMsg(32,"Free Shipping")%>

<%=getMsg(727,"Sugg Box")%>
<%=getMsg(727,">
<%=getMsg(728,"Your opin")%>  <%=pCompany%>. <%=getMsg(729,"If you have...")%>
<%=getMsg(730,"Thanks again")%>
<% call closeDb() set pIdproduct = Nothing set pDescription = Nothing set pDetails = Nothing set pListPrice = Nothing set pImageUrl = Nothing %>