%
'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 %>
<%
on error resume next
If scStoreOff="1" then
response.redirect "msg.asp?message=83"
End If
if session("idcustomer")="" then
session("idPCStore")= scID
session("idCustomer")=Cint(0)
session("idAffiliate")=Cint(1)
session("language")=Cstr("english")
session("pcCartIndex")=Cint(0)
dim pcCartArray(100,35)
session("pcCartSession")=pcCartArray
end if
if session("idPCStore")<>scID then
session.Abandon()
session("idPCStore")= scID
session("idCustomer")=Cint(0)
session("idAffiliate")=Cint(1)
session("language")=Cstr("english")
session("pcCartIndex")=Cint(0)
redim pcCartArray(100,35)
session("pcCartSession")=pcCartArray
end if
Dim mySQL, conntemp, rstemp
iPageSize=scSpcNum
if request.queryString("page")="" then
iPageCurrent=1
else
iPageCurrent=server.HTMLEncode(request.queryString("page"))
end if
call openDb()
' brings Specials items
ProdSort="" & request("prodsort")
if ProdSort<>"" then
else
ProdSort="" & PCOrd
end if
if ProdSort="" then
ProdSort="0"
end if
select case ProdSort
Case "0": mySQL1 = " ORDER BY products.SKU Asc"
Case "1": mySQL1 = " ORDER BY products.description Asc"
Case "2":
If Session("customerType")=1 then
mySQL1 = " ORDER BY products.btoBprice desc, products.price Desc"
else
mySQL1 = " ORDER BY products.price Desc"
End if
Case "3":
If Session("customerType")=1 then
mySQL1 = " ORDER BY products.bToBprice Asc, products.price Asc"
else
mySQL1 = " ORDER BY products.price Asc"
end if
end select
mySQL="SELECT idProduct,description,price,listPrice,listHidden,serviceSpec,details,listPrice,bToBPrice,smallImageUrl,sDesc,pcprod_HideBTOPrice,noprices from products WHERE hotdeal=-1 AND active=-1 AND configOnly=0 and removed=0" & mySQL1
set rstemp=Server.CreateObject("ADODB.Recordset")
rstemp.CursorLocation=adUseClient
rstemp.CacheSize=iPageSize
rstemp.Open mySQL, conntemp
if Err.number <> 0 then
call closeDb()
response.redirect "techErr.asp?error="&Server.UrlEncode("Error db viewSpc. Error: "&Err.Description)
end If
if rstemp.eof then
call closeDb()
response.redirect "msg.asp?message=89"
end if
%>
|
<% dim iPageCount, count
rstemp.MoveFirst
rstemp.PageSize=iPageSize
iPageCount=rstemp.PageCount
rstemp.AbsolutePage=iPageCurrent
%>
<%response.write dictLanguage.Item(Session("language")&"_viewSpc_2")%> |
Get 25% off your entire order when you purchase one or more of these titles!
Enter MARK1014 in the "Discounts" window at checkout.
(Web-based orders only. Cannot be combined with other offers.)
<%if HideSortPro<>"1" then%>
|
<%end if%>
|
<%'set Count equal to zero
count=0
do While not rstemp.eof and Count < rstemp.PageSize
pIdProduct=rstemp("idproduct")
pDescription=rstemp("description")
pPrice=rstemp("price")
pDetails=rstemp("details")
pListPrice=rstemp("listPrice")
pListHidden=rstemp("listHidden")
pBtoBPrice=rstemp("bToBPrice")
pSmallImageUrl=rstemp("smallImageUrl")
pserviceSpec=rstemp("serviceSpec")
psDesc=rstemp("sDesc")
pcv_intHideBTOPrice=rstemp("pcprod_HideBTOPrice")
if pcv_intHideBTOPrice<>"" then
else
pcv_intHideBTOPrice="0"
end if
pnoprices=rstemp("noprices")
if pnoprices<>"" then
else
pnoprices=0
end if
'BTO ADDON-S
if scBTO=1 then
if (pserviceSpec=true) and (pnoprices<2) then
mySQL="SELECT categories.categoryDesc, products.description, 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 rsSSObj=conntemp.execute(mySQL)
if err.number <> 0 then
response.redirect "techErr.asp?error="& Server.Urlencode("Error in viewPrd: "&err.description)
end if
if NOT rsSSobj.eof then
Dim iAddDefaultPrice, iAddDefaultWPrice
iAddDefaultPrice=Cdbl(0)
iAddDefaultWPrice=Cdbl(0)
do until rsSSobj.eof
iAddDefaultPrice=Cdbl(iAddDefaultPrice+rsSSobj("price"))
iAddDefaultWPrice=Cdbl(iAddDefaultWPrice+rsSSobj("Wprice"))
rsSSobj.moveNext
loop
set rsSSobj=nothing
pPrice=Cdbl(pPrice+iAddDefaultPrice)
pBtoBPrice=Cdbl(pBtoBPrice+iAddDefaultWPrice)
end if
end if
end if
'BTO ADDON-E %>
<%if pSmallImageUrl<>"" then%>
<%else%>
<%end if%>
|
<%response.write pDescription%>
<%
if (pPrice>"0") and (pcv_intHideBTOPrice<>"1") then
response.write dictLanguage.Item(Session("language")&"_prdD1_1") & " "
response.write scCurSign & money(pPrice)%>
<%if (pListPrice-pPrice)>0 AND plistHidden<0 AND session("customerType")<>1 then %><%response.write dictLanguage.Item(Session("language")&"_prdD1_2")%><%response.write scCurSign & money(pListPrice-pPrice)%>
<%end if
end if%>
<%if (pBtoBPrice>"0") and (session("customerType")=1) and (pcv_intHideBTOPrice<>"1") then%>
<%response.write dictLanguage.Item(Session("language")&"_prdD1_4")& " "%><%response.write scCurSign & money(pbToBPrice)%>
<%end if%>
<%
if pnoprices=0 then
' check for discount per quantity
mySQL="SELECT idDiscountperquantity FROM discountsperquantity WHERE idproduct=" &pidProduct
if session("CustomerType")<>"1" then
mySQL=mySQL & " and discountPerUnit<>0"
else
mySQL=mySQL & " and discountPerWUnit<>0"
end if
Dim rsDisc
set rsDisc=Server.CreateObject("ADODB.Recordset")
set rsDisc=conntemp.execute(mySQL)
if err.number <> 0 then
call closedb()
response.redirect "techErr.asp?error="& Server.Urlencode("Error in viewPrd: "&err.description)
end if
Dim pDiscountPerQuantity
if not rsDisc.eof then
pDiscountPerQuantity=-1
else
pDiscountPerQuantity=0
end if
set rsDisc = nothing
end if
%>
<%if pDiscountPerQuantity=-1 then %>
<%end if%>
<%if psDesc<>"" then%>
<%=psDesc%>
<%else%>
<%end if%>
" border="0" vspace="5">
|
|
<% i=i + 1
If i > 0 then
response.write " "
i=0
End If
iRecordsShown=iRecordsShown + 1
count=count + 1
rsTemp.MoveNext
loop
%>
<% If iPageCount>1 then %>
<% If iPageCount>1 then
If iPageCurrent > 1 Then %>
" border="0">
<% end if
For I=1 To iPageCount
If Cint(I)=Cint(iPageCurrent) Then %>
<%= I %>
<% Else %>
<%=I%>
<% End If
Next
If Cint(iPageCurrent) < Cint(iPageCount) Then %>
" border="0">
<% End If %>
<% End If %>
|
<% end if %>
<%
set rstemp=Nothing
set iPageCurrent=Nothing
call closeDb()
%>
|