<%@ Language=VBScript %> <% Option Explicit %> <% Response.Buffer = true %> <% on error resume next session("a_aid") = request.QueryString("a_aid") session("a_bid") = request.QueryString("a_bid") 'on error resume next dim rsproduct, strsql, Category_ID, Product_ID, strValidate dim rscategory, rsSettings, storefont, rsoptions, aroptions, counter, arprice, arOnOff dim rsRetailPrice, fRetailPrice, strParameters, arParameters, a_aid, a_bid strparameters = string_apostroph_safe(request.QueryString("Parameters")) if strParameters = "" then conn.close set conn = nothing response.Redirect("storefront.asp") end if arParameters = split(strparameters, "_") Product_ID = arParameters(0) Category_ID = arParameters(1) if product_ID = "" then conn.close set conn = nothing response.Redirect("showcart.asp") end if if ubound(arParameters) > 1 then session("a_aid") = arParameters(2) a_aid = arParameters(2) end if 'response.Write(session("a_aid")) if ubound(arParameters) > 2 then session("a_bid") = arParameters(3) a_bid = arParameters(3) end if 'response.Write(session("a_bid")) strsql = "stor_get_more_info " & Product_ID & "," & session("group_ID") 'response.Write(strsql) set rsproduct = server.CreateObject("ADODB.Recordset") rsproduct.Open strSQL, Conn, adOpenStatic, adLockReadOnly, adCmdText set rssettings = conn.execute("stor_Settings_select") storefont = rssettings("StoreFontFace") if Err <> 0 then conn.close set conn = nothing response.Redirect("/") end if %> "> "> <%=rsProduct("Title")%>

<% if rsproduct("lg_title") > "" then Response.Write("

<%=rsproduct("Name")%>


Item Number: <%=rsproduct("Sku")%>
<% if rsproduct("lg_image") <> "" then %><%=rsproduct(" src="/store/images/<%=rsproduct("lg_image")%>" border=0> <%end if %> <%if rsproduct("show_MSRP") then %> MSRP: <%=formatcurrency(rsproduct("MSRP"))%>
<%end if%> <%if rsproduct("showPrice") then %> <%if session("group_ID") > 0 then set rsRetailPrice = server.CreateObject("ADODB.RECORDSET") set rsRetailPrice = conn.execute("stor_get_more_info " & rsProduct("product_ID") & "," & session("group_ID")) fRetailPrice = rsRetailPrice("retail_price") rsRetailPrice.Close set rsRetailPrice = nothing %> Retail Price: <%=formatcurrency(fRetailPrice)%>
<% else %> Our Price: <%=formatcurrency(rsproduct("Retail_Price"))%> <% end if %> <%end if%> <%'session("User_ID") = 4 'Check to see if any Product Level discounts apply if rsProduct("Discounts") > "" or len(rsProduct("Discounts")) > 1 then dim ardiscounts, rsDiscount, discount_ID, arusers, a ardiscounts = split(rsProduct("Discounts"),",") if ubound(ardiscounts) <= 0 then discount_ID = cint(arDiscounts(0)) set rsDiscount = server.CreateObject("ADODB.RECORDSET") rsDiscount.CursorLocation = adUseClient set rsDiscount = conn.execute("stor_Discounts_select_ID " & discount_ID) if not rsDiscount.EOF then if (rsDiscount("Type3") = 0 and rsDiscount("Type1") = 1 and rsDiscount("Type5") = 0) then 'Single item product-level discount available to all users Response.Write("Special: " & rsDiscount("Display")) end if if (rsDiscount("Type3") = 0 and rsDiscount("Type1") = 1 and rsDiscount("Type5") = 1) then 'Single item product-level discount available to selected users arusers = split(rsDiscount("Users"),",") if ubound(arusers) = 0 then if cint(session("User_ID")) = cint(arusers(0)) then Response.Write("Special: " & rsDiscount("Display")) end if else if ubound(arusers) > 0 then for a = lbound(arusers) to ubound(arusers) if cint(session("User_ID")) = cint(arusers(a)) then Response.Write("Special: " & rsDiscount("Display")) exit for end if next end if end if end if end if rsDiscount.Close set rsDiscount = nothing else 'Multiple Discounts for a single product dim p for p = lbound(ardiscounts) to ubound(ardiscounts) discount_ID = ardiscounts(p) set rsDiscount = server.CreateObject("ADODB.RECORDSET") rsDiscount.CursorLocation = adUseClient set rsDiscount = conn.execute("stor_Discounts_select_ID " & discount_ID) if not rsDiscount.EOF then if (rsDiscount("Type3") = 0 and rsDiscount("Type1") = 1 and rsDiscount("Type5") = 0) then 'Single item product-level discount available to all users Response.Write("Special: " & rsDiscount("Display")) end if if (rsDiscount("Type3") = 0 and rsDiscount("Type1") = 1 and rsDiscount("Type5") = 1) then 'Single item product-level discount available to selected users arusers = split(rsDiscount("Users"),",") if ubound(arusers) = 0 then if cint(session("User_ID")) = cint(arusers(0)) then Response.Write("Special: " & rsDiscount("Display")) end if else if ubound(arusers) > 0 then for a = lbound(arusers) to ubound(arusers) if cint(session("User_ID")) = cint(arusers(a)) then Response.Write("Special: " & rsDiscount("Display")) exit for end if next end if end if end if end if rsDiscount.Close set rsDiscount = nothing next end if end if %>
name=Product_ID ID="Hidden1"> <% set rsoptions = server.CreateObject("ADODB.Recordset") rsoptions.CursorLocation = adUseClient strsql = "stor_ProdOptions_select_ID2 " & rsproduct("Product_ID") set rsoptions = conn.execute(strsql) do while not rsoptions.EOF Response.Write("
") rsoptions.MoveNext loop rsOptions.Close set rsOptions = nothing if right(strValidate,1) = "," then strValidate = left(strValidate,len(strValidate)-1) end if %> <%if rsproduct("Notsold") then%>

<%end if%>  

<%=rsproduct("long_desc")%>

<< Back to Products

 

<% conn.close set conn = nothing %>