<%
iii=0
Max_X=2
CellCnt=1
SQL="SELECT P.ID, SC.Label, SellPrice, P.ManufPartNo, P.SKU, P.ProductName, P.ShortDesc FROM Product P, Product_Data PD, PRODUCT_CATEGORY PC, SubCategory SC "
SQL=SQL&"WHERE P.SKU=PD.SKU AND PD.SKU=PC.SKU AND PC.SubCatID=SC.SubCatID "
SQL=SQL&"AND P.Hide=False "
SQL=SQL&"and P.AutoHide=False "
'SQL=SQL&"and P.SKU<>'DP-S1' "
'SQL=SQL&"and P.SKU<>'DP-P1' "
SQL=SQL&"and SHOPPRODUCT='Y' "
SQL=SQL&" ORDER BY PC.SubCatID, P.POS, P.SKU "
set r=conn.execute(SQL)
if not r.eof then
SellPrice = trim(r("SellPrice"))
%>
<%do while not r.eof
SKU=trim(r("SKU"))
%>
<%iii=iii+1%>
| <%
picShown=0
imagearrySTR=""
SQL="SELECT * "
SQL=SQL&"FROM Product_images WHERE "
SQL=SQL&"SKU='"&SQLTXT(SKU)&"' AND ImageType='product' "
SQL=SQL&"ORDER BY POS"
SET rs=conn.execute(SQL)
if not rs.eof then
do while not rs.eof
imagearrySTR=imagearrySTR&trim(rs("imagename"))&"|"
rs.movenext
loop
end if
rs.close
set rs=nothing
if imagearrySTR="" then
imagearrySTR=" |"
else
'imagearrySTR=left(imagearrySTR,(len(imagearrySTR)-1))
end if
imagearry=split(imagearrySTR,"|")
%>
<%for i=lbound(imagearry) to ubound(imagearry)
imagestr=CheckImageExists(imagearry(i),"\images\products\medium\")
if Imagestr<>"F" and picShown=0 then
imagestr=replace(imagestr,"\","/")
%><%
picShown=1
end if
next
%> |
|
|
<%
r.movenext
loop%>
<%
end if
SKU=""
%>
|
|
<%
r.movefirst
if not r.eof then
%>
<%
end if
%> |
<%
r.close
set r=nothing
%>