<% ' 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, pDetails, pListPrice, pImageUrl, pWeight, pIdProduct2 ' get settings pStoreFrontDemoMode = getSettingKey("pStoreFrontDemoMode") pCurrencySign = getSettingKey("pCurrencySign") pDecimalSign = getSettingKey("pDecimalSign") pCompany = getSettingKey("pCompany") 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, 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") 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%>

<%=pSku& " " &pDescription%>

<%call getImage(pImageUrl, pImageUrl2, pImageUrl3, pImageUrl4, pImage)%>

<%=pDetails%>

<%=getMsg(15,"Price")%>   <%If pMapPrice = "-1" Then%> [<%=getMsg(745,"add to cart to find out")%>] <%else%> <%=pCurrencySign & money(pPrice)%> <%if pCurrencyConversion="static" then%> <%=getMsg(18,"Other cur")%> <%end if%> <%if pCurrencyConversion="dynamic" then%> <%=getMsg(18,"Other cur")%> <%end if%> <%if trim(pShowBtoBPrice)="-1" and pIdCustomerType=1 and getPrice(pIdProduct, 2, pIdCustomer)>0 then%>
<%=getMsg(151,"Wholesale")%> <%=getMsg(15,"Price")%>:  <%=pCurrencySign & money(getPrice(pIdProduct, 2, pIdCustomer))%> <%end if%> <%if (pListPrice-pPrice)>0 then%>
<%=getMsg(19,"List price")%> <%=pCurrencySign & money(pListPrice)%> <%=getMsg(16,"Saving")%> <%=pCurrencySign & money(pListPrice-pPrice)%> <%end if%> <%end if%> <%if pShowStockView="-1" then%>
<%=getMsg(20,"Stock")%> <%=pStock%> <%end if%> <% if pCompareWithAmazon="-1" then pAmazonPrice=getAmazonPrice(pSku) if pAmazonPrice>pPrice then%>
<%=getMsg(21,"Amazon price")%>  $ <%=(pAmazonPrice)%>
<%=getMsg(22,"See yself")%>
<%end if ' price is better end if%> <%if pProductCustomField1<>"" and pUser1<>"" then%>
<%=pProductCustomField1%>: <%=pUser1%> <%end if%> <%if pProductCustomField2<>"" and pUser2<>"" then%>
<%=pProductCustomField2%>: <%=pUser2%> <%end if%> <%if pProductCustomField3<>"" and pUser3<>"" then%>
<%=pProductCustomField3%>: <%=pUser3%> <%end if%> <%if pProductReviews="-1" then pRateReview=getRateReview(pIdProduct) if Cdbl(pRateReview)>0 then%>
<%=getMsg(23,"Rated")%> <%=round(pRateReview,2)%>  <%else%>
<%=getMsg(24,"Not rated")%>

<%end if%> <%end if ' reviews%> <%if pHasPersonalization=-1 then%>
<%=getMsg(25,"Person")%> <%end if%>

<%=getOptionsGroups(pIdProduct)%> <%if pUnderStockBehavior="backorder" and Cdbl(pStock)<=0 then%> <%if pIdCustomer > 0 then%> <%=getMsg(746,"2 backorder")%>. <%=getMsg(747,"we will notify...")%> <%else%>
<%=getMsg(748,"login 2 backorder")%>. <%end if%> <%else%>
"> <%end if%>
<%if pDiscountPerQuantity=-1 then%>
<%=getMsg(27,"Discounts qty")%>
<%end if%> <%if pIdAuction>0 then%>
<%=getMsg(28,"Get 4 less")%> <%=getMsg(29,"Auction")%>
<%end if%> <%if pEmailToFriend="-1" then%>
"><%=getMsg(30,"Email 2 friend")%> <%end if%> <%if pWishList="-1" then%>
<%=getMsg(31,"Add 2 WL")%> <%end if%> <%if pFreeShipping=-1 and (pRealTimeShipping="none" or pRealTimeShipping="ups") then%>

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


<%=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 %>