<% 'This file is part of ProductCart, an ecommerce application developed and sold by Early Impact LLC. ProductCart, its source code, the ProductCart name and logo are property of Early Impact, LLC. Copyright 2001-2003. All rights reserved. You are not allowed to use, alter, distribute and/or resell any parts of ProductCart's source code without the written consent of Early Impact. To contact Early Impact, please visit www.earlyimpact.com. %> <% response.Buffer=true %> <% ' Check if the store is on. If store is turned off display store message If scStoreOff="1" then response.redirect "msg.asp?message=83" End If '<--RP--> If RewardsActive=True then If (Request("refby") <> "") And (RewardsReferral=True) Then Session("referral")=CLng(Request("refby")) End If End if '<--RP--> '---> start store session if not aleady initiated <---- if session("idcustomer")="" then session("idPCStore")= scID session("idCustomer")=CLng(0) session("idAffiliate")=CLng(1) session("language")=Cstr("english") session("pcCartIndex")=CLng(0) dim pcCartArray(100,35) session("pcCartSession")=pcCartArray end if if session("idPCStore")<>"" AND session("idPCStore")<>scID then session.Abandon() session("idPCStore")= scID session("idCustomer")=CLng(0) session("idAffiliate")=CLng(1) session("language")=Cstr("english") session("pcCartIndex")=CLng(0) redim pcCartArray(100,35) session("pcCartSession")=pcCartArray end if ' Check to see if the user is updating the product after adding it to the shopping cart tIndex=0 tUpdPrd=request.QueryString("imode") if tUpdPrd="updOrd" then tIndex=request.QueryString("index") end if ' Check to see if the user was referred by an Affiliate web site if request.querystring("idAffiliate")<>"" and isNumeric(request.querystring("idAffiliate"))then session("idAffiliate")= request.querystring("idAffiliate") end if dim query, conntemp, rs, pIdProduct, pDescription, pPrice, pDetails, pListPrice, pLgimageURL, pImageUrl, pWeight, pSku ,pconfigOnly,pserviceSpec, pBtoBPrice, plistHidden, pArequired,pBrequired, pStock, pEmailText, pformQuantity, pnoshipping, pcustom1, pcustom2, pcustom3, pcontent1, pcontent2, pcontent3, pxfield1, pxfield2, pxfield3, px1req, px2req, px3req, pNoStock, psDesc, pnoshippingtext pIdProduct=request.QueryString("idProduct") if trim(pIdProduct)="" or IsNumeric(pIdProduct)=false then response.redirect "msg.asp?message=85" end if '--> open database connection call opendb() ' --> increase visits for product <-- query="UPDATE products SET visits=visits+1 WHERE idProduct="& pIdProduct set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closeDb() response.redirect "techErr.asp?error="&Server.Urlencode("Error in viewPrd.asp - Line 76") end if ' --> check for discount per quantity query="SELECT idDiscountperquantity FROM discountsperquantity WHERE idproduct=" &pidProduct set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closeDb() response.redirect "techErr.asp?error="& Server.Urlencode("Error in viewPrd.asp - Line 87") end if dim pDiscountPerQuantity if not rs.eof then pDiscountPerQuantity=-1 else pDiscountPerQuantity=0 end if set rs=nothing ' --> gets product details from db query="SELECT iRewardPoints, description, sku, configOnly, serviceSpec, price, btobprice, details, listprice, listHidden, imageurl, largeImageURL, Arequired, Brequired, stock, weight, emailText, formQuantity, noshipping, custom1, content1, custom2, content2, custom3, content3, xfield1, x1req, xfield2, x2req, xfield3, x3req, noprices, IDBrand, sDesc, noStock, noshippingtext,pcprod_HideBTOPrice,pcprod_QtyValidate,pcprod_MinimumQty,pcprod_HideDefConfig, notax FROM products WHERE idProduct=" &pidProduct& " AND active=-1" set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closeDb() response.redirect "techErr.asp?error="& Server.Urlencode("Error in viewPrd.asp - Line 106") end if if rs.eof then set rs=nothing call closeDb() response.redirect "msg.asp?message=88" end if ' --> set product variables <--- iRewardPoints=rs("iRewardPoints") pDescription=replace(rs("description"),""",chr(34)) pSku= rs("sku") pconfigOnly=rs("configOnly") pserviceSpec=rs("serviceSpec") pPrice=rs("price") pBtoBPrice=rs("bToBPrice") pDetails=replace(rs("details"),""",chr(34)) pListPrice=rs("listPrice") plistHidden=rs("listHidden") pimageUrl=rs("imageUrl") pLgimageURL=rs("largeImageURL") pArequired=rs("Arequired") pBrequired=rs("Brequired") pStock=rs("stock") pWeight=rs("weight") pEmailText=rs("emailText") pFormQuantity=rs("formQuantity") pnoshipping=rs("noshipping") pcustom1=rs("custom1") pcontent1=rs("content1") pcustom2=rs("custom2") pcontent2=rs("content2") pcustom3=rs("custom3") pcontent3=rs("content3") pxfield1=rs("xfield1") px1req=rs("x1req") pxfield2=rs("xfield2") px2req=rs("x2req") pxfield3=rs("xfield3") px3req=rs("x3req") pnoprices=rs("noprices") if isNull(pnoprices) OR pnoprices="" then pnoprices=0 end if pIDBrand=rs("IDBrand") psDesc=rs("sDesc") pNoStock=rs("noStock") pnoshippingtext=rs("noshippingtext") pcv_intHideBTOPrice=rs("pcprod_HideBTOPrice") if isNull(pcv_intHideBTOPrice) OR pcv_intHideBTOPrice="" then pcv_intHideBTOPrice="0" end if pcv_intQtyValidate=rs("pcprod_QtyValidate") if isNull( pcv_intQtyValidate) OR pcv_intQtyValidate="" then pcv_intQtyValidate="0" end if pcv_lngMinimumQty=rs("pcprod_MinimumQty") if isNull(pcv_lngMinimumQty) OR pcv_lngMinimumQty="" then pcv_lngMinimumQty="0" end if intpHideDefConfig=rs("pcprod_HideDefConfig") if isNull(intpHideDefConfig) OR intpHideDefConfig="" then intpHideDefConfig="0" end if pnotax=rs("notax") set rs=nothing ' Check to see if the product has been assigned to a brand. If so, get the brand name if (pIDBrand&""<>"") and (pIDBrand&""<>"0") then query="select BrandName from Brands where IDBrand=" & pIDBrand set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) if not rs.eof then BrandName=rs("BrandName") end if set rs=nothing end if %> <% ' Check to see if this is a BTO product. If so, get additional product information if pserviceSpec<>0 then query="SELECT categories.categoryDesc, products.description, configSpec_products.configProductCategory, configSpec_products.price, categories_products.idCategory, categories_products.idProduct, products.weight FROM categories, products, categories_products INNER JOIN configSpec_products ON categories_products.idCategory=configSpec_products.configProductCategory WHERE (((configSpec_products.specProduct)="&pIdProduct&") AND ((configSpec_products.configProduct)=[categories_products].[idproduct]) AND ((categories_products.idCategory)=[categories].[idcategory]) AND ((categories_products.idProduct)=[products].[idproduct]) AND ((configSpec_products.cdefault)<>0)) ORDER BY configSpec_products.catSort, categories.idCategory, configSpec_products.prdSort;" set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closedb() response.redirect "techErr.asp?error="& Server.Urlencode("Error in viewPrd.asp - Line 281") end if query="SELECT * FROM configSpec_Charges WHERE specProduct="&pIdProduct set rstemp=server.CreateObject("ADODB.RecordSet") set rstemp=conntemp.execute(query) BTOCharges=0 if not rstemp.eof then BTOCharges=1 end if set rstemp=nothing 'if this BTO product has been configured by the administrator, use this form action and JavaScript validation functions if NOT rs.eof then response.write "
" %> <% ' End JavaScript validation functions for a configured BTO product ' This BTO product has not been configured, so write a different form action and JavaScript validation functions else %> <% ' Check to see if the user is updating the product after adding it to the shopping cart. If so, pass 2 hidden fields. if tIndex<>0 then %> <% end if %> <% end if ' End validation functions for this configured BTO product else ' This is a STANDARD product, so use a different form action and JavaScript validation function %> <% ' Check to see if the user is updating a product after adding it to the shopping cart if tIndex<>0 then %> <% end if %> <% end if ' End writing validation functions for this STANDARD product set rs=nothing ' Begin writing the main content table %> <% ' START CATEGORY TREE ' If there is a category ID defined, show category tree. Otherwise, hide this row. If isNumeric(request.querystring("idCategory")) AND request.querystring("idCategory")<>"" then %> <% end if ' END CATEGORY TREE ' PRODUCT INFORMATION ' Show product name %> <% ' Right column contains product image %> <% end if %> <% end if %> <% end if %> <% end if %> <% end if %> <% query= "SELECT cs_status,cs_showprod,cs_showcart,cs_showimage,crossSellText,cs_ProductViewCnt FROM crossSelldata WHERE id=1;" set rs=server.createobject("adodb.recordset") set rs=conntemp.execute(query) dim scCS, cs_showprod, cs_showcart, cs_showimage, crossSellText scCS=rs("cs_status") cs_showprod=rs("cs_showprod") cs_showcart=rs("cs_showcart") cs_showimage=rs("cs_showimage") crossSellText=rs("crossSellText") cs_ViewCnt=rs("cs_ProductViewCnt") set rs=nothing 'check if there are items to cross sell query= "SELECT cs_relationships.idproduct FROM cs_relationships,products WHERE cs_relationships.idrelation=products.idProduct and (((cs_relationships.idproduct)="&pidProduct&") AND ((products.active)=-1) AND ((products.removed)=0)) ORDER BY cs_relationships.num;" set rs=server.createobject("adodb.recordset") set rs=conntemp.execute(query) if NOT rs.eof then %> <% if scCS=-1 AND cs_showProd="-1" then%> <% end if %> <% end if set rs=nothing call closedb() %>
<% dim pIdCategory, indexCategories, pUrlString, pIdCategory2 pIdCategory=request.querystring("idCategory") if pIdCategory<>"" then dim arrCategories(999,4) indexCategories=0 pUrlString=Cstr("") pIdCategory2=pidCategory ' load category array with all categories until parent do while pIdCategory2>1 query="SELECT idParentcategory, categoryDesc, idCategory, [image] FROM categories WHERE idCategory=" & pIdCategory2 &" ORDER BY priority, categoryDesc ASC" set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closeDb() response.redirect "techErr.asp?error="& Server.Urlencode("Error in viewPrd.asp - Line 748") end if if rs.eof then set rs=nothing call closeDb() response.redirect "msg.asp?message=86" end if pIdCategory2=rs("idParentCategory") arrCategories(indexCategories,0)=rs("categoryDesc") arrCategories(indexCategories,1)=rs("idCategory") arrCategories(indexCategories,2)=pIdCategory2 arrCategories(indexCategories,3)=rs("image") indexCategories=indexCategories + 1 set rs=nothing loop end if 'idParentCategory response.write dictLanguage.Item(Session("language")&"_viewCat_P_2") dim f for f=indexCategories-1 to 0 step -1 If arrCategories(f,2)="1" Then response.write "" & arrCategories(f,0) &"" Else response.write " > " & "" & arrCategories(f,0) &"" End If next %>
<%response.write pDescription%>
<% ' Display product SKU response.write dictLanguage.Item(Session("language")&"_viewCat_P_8")%>: <%response.write pSku%> <% ' Display product WEIGHT if the administrator has turned that feature on if scShowProductWeight="-1" then if int(pWeight)>0 then response.write "
" & ship_dictLanguage.Item(Session("language")&"_viewCart_c") if scShipFromWeightUnit="KGS" then pKilos=Int(pWeight/1000) pWeight_g=pWeight-(pKilos*1000) pWeight=pKilos if pWeight_g>0 then response.write dictLanguage.Item(Session("language")&"_viewCart_c")&pWeight&" kg "&pWeight_g&" g" else response.write dictLanguage.Item(Session("language")&"_viewCart_c")&pWeight&" kg" end if else pPounds=Int(pWeight/16) pWeight_oz=pWeight-(pPounds*16) pWeight=pPounds if pWeight_oz>0 then response.write dictLanguage.Item(Session("language")&"_viewCart_c")&pWeight&" lbs "&pWeight_oz&" ozs" else response.write dictLanguage.Item(Session("language")&"_viewCart_c")&pWeight&" lbs" end if end if end if end if ' End WEIGHT ' If the product has been assigned to a BRAND, display it here if sBrandPro="1" then if (pIDBrand&""<>"") and (pIDBrand&""<>"0") then response.write "
" response.write dictLanguage.Item(Session("language")&"_viewPrd_brand")%> <%=BrandName%> <% end if ' End brand-related IF statements end if ' If Show Units in stock is on, show the stock level here if scdisplayStock=-1 AND pNoStock=0 then if pstock > 0 then response.write "
" response.write dictLanguage.Item(Session("language")&"_viewPrd_19") &" "&pStock end if end if %>
<% ' Product Description: if there is a short description, show it and link to the long description below. ' Otherwise show the long description response.write "

" if psDesc <> "" then response.Write psDesc & " " & dictLanguage.Item(Session("language")&"_viewPrd_21") & "
" else response.Write pDetails & "
" end if pcv_BTORP=Clng(0) ' If this is a BTO product, then gather information about default configuration if pserviceSpec=true then query="SELECT categories.categoryDesc, products.description, products.iRewardPoints,configSpec_products.configProductCategory, configSpec_products.price, configSpec_products.Wprice, categories_products.idCategory, categories_products.idProduct, products.weight FROM categories, products, categories_products INNER JOIN configSpec_products ON categories_products.idCategory=configSpec_products.configProductCategory WHERE (((configSpec_products.specProduct)="&pIdProduct&") AND ((configSpec_products.configProduct)=[categories_products].[idproduct]) AND ((categories_products.idCategory)=[categories].[idcategory]) AND ((categories_products.idProduct)=[products].[idproduct]) AND ((configSpec_products.cdefault)<>0)) ORDER BY configSpec_products.catSort, categories.idCategory, configSpec_products.prdSort;" set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closeDb() response.redirect "techErr.asp?error="& Server.Urlencode("Error in viewPrd.asp - Line 856") end if if NOT rs.eof then Dim FirstCnt FirstCnt=0 iAddDefaultPrice=Cdbl(0) iAddDefaultWPrice=Cdbl(0) if intpHideDefConfig="0" then response.write "
"&dictLanguage.Item(Session("language")&"_viewPrd_25")&"
" end if do until rs.eof FirstCnt=FirstCnt+1 strCategoryDesc=rs("categoryDesc") strDescription=rs("description") intReward=rs("iRewardPoints") if (intReward<>"") and (intReward<>"0") then else intReward=0 end if pcv_BTORP=pcv_BTORP+clng(intReward) strConfigProductCategory=rs("configProductCategory") dblPrice=rs("price") dblWPrice=rs("Wprice") intIdCategory=rs("idCategory") intIdProduct=rs("idProduct") intWeight=rs("weight") iAddDefaultPrice=Cdbl(iAddDefaultPrice+dblPrice) iAddDefaultWPrice=Cdbl(iAddDefaultWPrice+dblWPrice) ItemPrice=0 if (Session("CustomerType")=1) and (dblWPrice<>0) then ItemPrice=dblWPrice else ItemPrice=dblPrice end if if intpHideDefConfig="0" then response.write ""&strCategoryDesc&": "&strDescription&"
" end if response.write "" response.write "" response.write "" rs.moveNext loop set rs=nothing response.write "" end if end if ' End writing default configuration for BTO product ' Check to see if the product has been assigned Custom Search Fields. If so, display the values. dim pcl pcl="NO" 'custom search field #1 if pcustom1<>"" AND pcontent1<>"" then query="SELECT customfields.idcustom, customfields.custom FROM customfields WHERE (((customfields.idcustom)="&pcustom1&"));" set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) If NOT rs.eof then response.write "
"&rs("custom")&": "&pcontent1&"
" pcl="Yes" end if set rs=nothing end if 'custom search field #2 if pcustom2<>"" AND pcontent2<>"" then query="SELECT customfields.idcustom, customfields.custom FROM customfields WHERE (((customfields.idcustom)="&pcustom2&"));" set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) If NOT rs.eof then if pcl="NO" then response.write "
" end if response.write rs("custom")&": "&pcontent2&"
" pcl="Yes" end if set rs=nothing end if 'custom search field #3 if pcustom3<>"" AND pcontent3<>"" then query="SELECT customfields.idcustom, customfields.custom FROM customfields WHERE (((customfields.idcustom)="&pcustom3&"));" set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) If NOT rs.eof then if pcl="NO" then response.write "
" end if response.write rs("custom")&": "&pcontent3&"
" pcl="Yes" end if set rs=nothing end if if pcl="Yes" then response.write "
" else response.write "

" end if ' End custom search fields '<--RP--> If RewardsActive=True then ' Show Reward Points associated with this product, if any ' By default, Reward Points are not shown to Wholesale Customers if Clng(iRewardPoints+clng(pcv_BTORP))>"0" and session("customerType")<>"1" then response.write dictLanguage.Item(Session("language")&"_viewPrd_50")&Clng(iRewardPoints+clng(pcv_BTORP))&" "&RewardsLabel&dictLanguage.Item(Session("language")&"_viewPrd_51")&"

" else ' If the system is setup to include Wholesale Customers, then show Reward Points to them too if Clng(iRewardPoints+clng(pcv_BTORP))>"0" and session("customerType")="1" and RewardsIncludeWholesale=True then response.write dictLanguage.Item(Session("language")&"_viewPrd_50")&Clng(iRewardPoints+clng(pcv_BTORP))&" "&RewardsLabel&dictLanguage.Item(Session("language")&"_viewPrd_50")&"

" end if end If End If '<--RP--> ' Show product prices ' Don't show prices if the BTO product has been set up to hide prices (pnoprices) If pnoprices<2 Then ' If this is a BTO product, calculate the base price as the sum of price + default prices if pserviceSpec=true then pPrice=Cdbl(pPrice+iAddDefaultPrice) pBtoBPrice=Cdbl(pBtoBPrice+iAddDefaultWPrice) end if ' Display the online price if it's not zero if (pPrice>Cdbl(0)) and (pcv_intHideBTOPrice<>"1") then response.Write "" & dictLanguage.Item(Session("language")&"_viewPrd_3") response.write scCurSign & money(pPrice) response.write "" ' If the store is using and showing VAT, show the VAT included message and price without VAT if ptaxVAT="1" and ptaxdisplayVAT="1" and pnotax <> "-1" then if session("customerType")="1" AND ptaxwholesale="0" then else response.write " " & dictLanguage.Item(Session("language")&"_viewPrd_26") & "
" response.write dictLanguage.Item(Session("language")&"_viewPrd_27") & scCurSign & _ money(pPrice/(1+ptaxVATrate/100)) & "
" end if end if ' If the List Price is not zero and higher than the online price, display striken through if ((pListPrice-pPrice)>0) and (pcv_intHideBTOPrice<>"1") then response.write "
" & dictLanguage.Item(Session("language")&"_viewPrd_20") response.write "" response.write scCurSign & money(pListPrice) response.write "" end if ' If the product is setup to use the Show Savings feature, show the savings if they exist and the customer is retail if ((pListPrice-pPrice)>0) AND (plistHidden<0) AND (session("customerType")<>1) and (pcv_intHideBTOPrice<>"1") then response.write " - " response.write "" response.write dictLanguage.Item(Session("language")&"_viewPrd_4") response.write scCurSign & money((pListPrice-pPrice)) response.write "
" else response.write "
" end if end if 'this is the IF statement regarding the online price being > zero ' If this is a wholesale customer and the wholesale price is > zero, display it here if (pBtoBPrice>"0") and (session("customerType")=1) and (pcv_intHideBTOPrice<>"1") then response.write "
" response.write dictLanguage.Item(Session("language")&"_viewPrd_15") &" " response.write scCurSign & money(pBtoBPrice) response.write "
" end if end if 'this is the IF statement regarding the BTO product being setup not to show prices ' Product Options and Add to Cart ' NOTE: The scorderlevel variable controls the type of customer that is allowed to make a purchase on the store ' This variable is set via the Store Settings page. Values are 0 (everybody), 1 (wholesale only), or 2 (no ecommerce) if scorderlevel <> "0" then else ' Check to see if the product is set for Free Shipping and display message if product is for sale if pnoshipping="-1" and pFormQuantity <> "-1" and pnoshippingtext="-1" then response.write "
" response.write dictLanguage.Item(Session("language")&"_viewPrd_8") response.write "
" end if end if 'BTO ADDON-S if pserviceSpec<>0 then if Cdbl(pBtoBPrice)>0 and session("customerType")="1" then response.write "" response.write "" response.write "" else response.write "" response.write "" response.write "" end if end if 'BTO ADDON-E %>
<% ' if out of stock and show message is enabled (-1) then show message unless stock is ignored if (scShowStockLmt=-1 AND CLng(pStock)<1 AND pserviceSpec=0 AND pNoStock=0) OR (pserviceSpec<>0 AND scShowStockLmt=-1 AND iBTOOutofstockpurchase=-1 AND CLng(pStock)<1 AND pNoStock=0) then response.write "

"&dictLanguage.Item(Session("language")&"_viewPrd_7")& "


" end if 'end of show out of stock message %>
<% 'show product image if it exists if pImageUrl<>"" then%> <% ' show link to detail view image if it exists if pLgimageURL<>"" then%>
<% If InStr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE") OR InStr(Request.ServerVariables("HTTP_USER_AGENT"),"Firefox") Then %> <% Else If InStr(Request.ServerVariables("HTTP_USER_AGENT"),"Safari") Then Response.Write("") Else Response.Write("") End If End If %> " border="0" hspace="10">
<% end if 'if no image, show no_image.gif else%> Product image not available <% end if 'Start quantity discounts if pDiscountPerQuantity=-1 then 'if customer is retail, check if there are discounts with retail <> 0 Dim VardiscGo VardiscGo=0 if session("customerType")=1 then query="SELECT discountPerWUnit FROM discountsperquantity WHERE idProduct="& pIdProduct &" AND discountPerWUnit>0" set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) if rs.eof then VardiscGo=1 end if set rs=nothing else query="SELECT discountPerUnit FROM discountsperquantity WHERE idProduct="& pIdProduct &" AND discountPerUnit>0" set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) if rs.eof then VardiscGo=1 end if set rs=nothing end if if VardiscGo=0 then query="SELECT quantityFrom,quantityUntil,percentage,discountPerWUnit,discountPerUnit FROM discountsperquantity WHERE idProduct="& pIdProduct &" ORDER BY num" set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) %>

<% do until rs.eof dblQuantityFrom=rs("quantityFrom") dblQuantityUntil=rs("quantityUntil") dblPercentage=rs("percentage") dblDiscountPerWUnit=rs("discountPerWUnit") dblDiscountPerUnit=rs("discountPerUnit") %> <% if dblQuantityFrom=dblQuantityUntil then %> <% else %> <% end if %> <% rs.moveNext loop set rs=nothing %>
" border="0"> <%response.write dictLanguage.Item(Session("language")&"_pricebreaks_1")%> <%response.write dictLanguage.Item(Session("language")&"_pricebreaks_2")%>
<%=dblQuantityUntil%> <% response.write dictLanguage.Item(Session("language")&"_pricebreaks_4") %><%=dblQuantityFrom%> <%response.write dictLanguage.Item(Session("language")&"_pricebreaks_3")%> <%=dblQuantityUntil%> <%response.write dictLanguage.Item(Session("language")&"_pricebreaks_4")%> <% If session("customerType")=1 Then If dblPercentage="0" then response.write scCurSign & money(dblDiscountPerWUnit) else response.write dblDiscountPerWUnit & "%" End If else If dblPercentage="0" then response.write scCurSign & money(dblDiscountPerUnit) else response.write dblDiscountPerUnit & "%" End If end If %>

<% end if end if 'End Quantity Discounts %>
<% 'Check if product is for sale or not <<<-- if pFormQuantity="-1" then if pEmailText<>"" then response.write "" response.write pEmailText 'reason why it's not for sale response.write "" end if else ' End of product for sale check - product is for sale ' Check for order level permission if scorderlevel="2" then ' no ecommerce, catalog only else if scorderlevel="0" or scorderlevel="1" then if scorderlevel="1" AND session("customerType")<>1 then else ' if out of stock and out of stock purchase is not allowed (-1), don't show add to cart info if (scOutofStockPurchase=-1 AND CLng(pStock)<1 AND pserviceSpec=0 AND pNoStock=0) OR (pserviceSpec<>0 AND scOutofStockPurchase=-1 AND iBTOOutofstockpurchase=-1 AND CLng(pStock)<1 AND pNoStock=0) then ' else out of stock purchase is allowed else %> <% If pserviceSpec<>0 AND (pPrice=0 OR scConfigPurchaseOnly=1) then else '--> ordering options and add to cart <-- 'option A query= "SELECT OptionGroupDesc, options_optionsGroups.InActive, options_optionsGroups.price, options_optionsGroups.Wprice, options_optionsGroups.idoptoptgrp, options.idoption, options.optiondescrip FROM products, options_optionsgroups, options, optionsgroups WHERE products.idProduct=" & pidProduct &" AND products.idOptiongroupA=options_optionsGroups.idoptionGroup AND options_optionsGroups.idoption=options.idoption AND optionsGroups.idoptionGroup=products.idOptiongroupA AND options_optionsGroups.idProduct=" &pidProduct& " AND products.idOptionGroupA>1 ORDER BY options_optionsgroups.sortOrder;" set rs=server.createobject("adodb.recordset") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closeDb() response.redirect "techErr.asp?error="& Server.Urlencode("Error in viewPrd.asp - Line 1206") end if if NOT rs.eof then If pArequired=True then pArequired="2" End If optionA=rs("OptionGroupDesc") if optionA<>"" then optionA=replace(optionA,"""",""") end if %>

<% end if %> <% 'end of option A 'option B query= "SELECT OptionGroupDesc, options_optionsGroups.InActive, options_optionsGroups.price, options_optionsGroups.Wprice, options_optionsGroups.idoptoptgrp, options.idoption, options.optiondescrip FROM products, options_optionsgroups, options, optionsgroups WHERE products.idProduct=" & pidProduct &" AND products.idOptiongroupB=options_optionsGroups.idoptionGroup AND options_optionsGroups.idoption=options.idoption AND optionsGroups.idoptionGroup=products.idOptiongroupB AND options_optionsGroups.idProduct=" &pidProduct& " AND products.idOptionGroupB>1 ORDER BY options_optionsgroups.sortOrder;" set rs=server.createobject("adodb.recordset") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closeDb() response.redirect "techErr.asp?error="& Server.Urlencode("Error in viewPrd.asp - Line 1280") end if if NOT rs.eof then If pBrequired=True then pBrequired="2" End If optionB=rs("OptionGroupDesc") if optionB<>"" then optionB=replace(optionB,"""",""") end if %>

<% end if 'end of option B %>
<% '--> If xfields are present add here <-- dim xrequired, xfieldCnt, reqstring xrequired="0" xfieldCnt=0 reqstring="" if pxfield1<>"0" then 'select from the database more info query= "SELECT xfield,textarea,widthoffield,rowlength,maxlength FROM xfields WHERE idxfield="&pxfield1 set rs=server.createobject("adodb.recordset") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closeDb() response.redirect "techErr.asp?error="& Server.Urlencode("Error in viewPrd.asp - Line 1363") end if xField=rs("xfield") TextArea=rs("textarea") widthoffield=rs("widthoffield") rowlength=rs("rowlength") maxlength=rs("maxlength") set rs=nothing if px1req="-1" then xfieldCnt=xfieldCnt+1 xrequired="1" reqstring=reqstring&"additem.xfield1.value,'"&replace(xField,"'","")&"'" end if %> <%=xField%> <% if TextArea="-1" then %>
<% else %>
<% end if %>

<% end if %> <% if pxfield2<>"0" then 'select from the database more info query= "SELECT xfield,textarea,widthoffield,rowlength,maxlength FROM xfields WHERE idxfield="&pxfield2 set rs=server.createobject("adodb.recordset") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closeDb() response.redirect "techErr.asp?error="& Server.Urlencode("Error in viewPrd.asp - Line 1402") end if xField=rs("xfield") TextArea=rs("textarea") widthoffield=rs("widthoffield") rowlength=rs("rowlength") maxlength=rs("maxlength") set rs=nothing if px2req="-1" then xfieldCnt=xfieldCnt+1 if xrequired="1" then reqstring=reqstring&"," end if xrequired="1" reqstring=reqstring&"additem.xfield2.value,'"&replace(xField,"'","")&"'" end if %> <%=xField%> <% if TextArea="-1" then %>
<% else %>
<% end if %>

<% end if %> <% if pxfield3<>"0" then 'select from the database more info query= "SELECT xfield,textarea,widthoffield,rowlength,maxlength FROM xfields WHERE idxfield="&pxfield3 set rs=server.createobject("adodb.recordset") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closeDb() response.redirect "techErr.asp?error="& Server.Urlencode("Error in viewPrd.asp - Line 1445") end if xField=rs("xfield") TextArea=rs("textarea") widthoffield=rs("widthoffield") rowlength=rs("rowlength") maxlength=rs("maxlength") set rs=nothing if px3req="-1" then xfieldCnt=xfieldCnt+1 if xrequired="1" then reqstring=reqstring&"," end if xrequired="1" reqstring=reqstring&"additem.xfield3.value,'"&replace(xField,"'","")&"'" end if %> <%=xField%> <% if TextArea="-1" then %>
<% else %>
<% end if %>

<% end if end if 'END IF price =0 and BTO then do not show options A or B or X 'end of xfields %> <%'!--> if price=0 and this is a BTO don't show addto cart, show customize button only <--! If ((pserviceSpec<>0) AND ((pnoprices>0) OR (pPrice=0) OR (scConfigPurchaseOnly=1))) or ((iBTOQuoteSubmitOnly=1) and (pserviceSpec<>0)) then %> <% else '--> begin add to cart <-- %> <% if xrequired="1" then %> <% else %> <% end if %> <% end if '!-- if price=0 and this is a BTO don't show addto cart, show customize button only '--> start wishlist <-- if scWL=-1 then If pserviceSpec=0 then %> <% end if end if 'end wishlist '--> start tell-a-friend if scTF<>0 then If ((pserviceSpec<>0) AND ((pnoprices>0) OR (pPrice=0) OR (scConfigPurchaseOnly=1))) or ((iBTOQuoteSubmitOnly=1) and (pserviceSpec<>0)) then %> <% else %> <% end if end if 'end tell-a-friend %>
" border="0">
0 then %>value="<%=pcv_lngMinimumQty%>"<% else %>value="1"<% end if %> onblur="checkproqty(this);"> <% If BTOCharges=0 then If pArequired="2" or pBrequired="2" then %> <% if pArequired="2" and pBrequired<>"2" then %> <%if xfieldCnt=1 then %> ',<%=reqstring%>);} return false">"> <% end if %> <%if xfieldCnt=2 then %> ',<%=reqstring%>);} return false">"> <% end if %> <%if xfieldCnt=3 then %> ',<%=reqstring%>);} return false">"> <% end if %> <% end if %> <% if pBrequired="2" and pArequired<>"2" then %> <%if xfieldCnt=1 then %> ',<%=reqstring%>);} return false">"> <% end if %> <%if xfieldCnt=2 then %> ',<%=reqstring%>);} return false">"> <% end if %> <%if xfieldCnt=3 then %> ',<%=reqstring%>);} return false">"> <% end if %> <% end if %> <% if pArequired="2" and pBrequired="2" then %> <%if xfieldCnt=1 then %> "> <% end if %> <%if xfieldCnt=2 then %> "> <% end if %> <%if xfieldCnt=3 then %> "> <% end if %> <% end if %> <% else %> <%if xfieldCnt=1 then %> "> <% end if %> <%if xfieldCnt=2 then %> "> <% end if %> <%if xfieldCnt=3 then %> "> <% end if %> <% end if end if %> <% If pserviceSpec<>0 then %> " border="0"> <% End If %>
0 then%>value="<%=pcv_lngMinimumQty%>"<% else %>value="1"<% end if %> onblur="checkproqty(this);"> <% IF BTOCharges=0 then If pArequired="2" or pBrequired="2" then %> <% if pArequired="2" and pBrequired<>"2" then %> ');} return false">"> <% end if %> <% if pBrequired="2" and pArequired<>"2" then %> ');} return false">"> <% end if %> <% if pArequired="2" and pBrequired="2" then %> ' ,'<%=replace(optionB,"'","")%>');} return false">"> <% end if %> <% else %> " type=image name="add" border="0"> <% end if End if %> <% If pserviceSpec<>0 then %> " border="0"> <% End If %>
  document.additem.idOptionA.value+<%end if%>'&idOptionB='<%if optionB<>"" then%>+document.additem.idOptionB.value<%end if%>;">" border="0">
" border="0">
  " border="0">
 
<%=crossSellText%>
<% if cs_showImage="-1" then %> <% else %> <% end if %>
<% ' Display long product description if there is a short description if psDesc <> "" then %>  
<% response.write dictLanguage.Item(Session("language")&"_viewPrd_22") & "

" response.Write pDetails response.write "

" response.write "" end if %>
<%' Product reviews feature - new in ProductCart v2.75 %>