Jump to content


glowsource

Member Since 20 Jun 2008
Offline Last Active Jun 24 2008 09:31 AM
-----

Posts I've Made

In Topic: A better way to display products?

24 June 2008 - 09:33 AM

As a follow-up, I did find this string of code embedded in our existing product pages that seems to reference a size/color drop-down selector:




<select NAME="txtvariant" class="smalltextblk">
<%
extra_field = ""
xmlstring =sitelink.BUILDSIZECOLORLIST(cstr(REQUEST.QUERYSTRING("number")),cstr(""),"STOCK.DESC2",extra_field)
objDoc.loadxml(xmlstring)

set SL_sbcl = objDoc.selectNodes("//sbcl")

for x=0 to SL_sbcl.length-1
SL_Variation= SL_sbcl.item(x).selectSingleNode("scolor").text
SL_VarationDesc= SL_sbcl.item(x).selectSingleNode("desc2").text
SL_VarationPrice= SL_sbcl.item(x).selectSingleNode("price1").text
SL_VarationUnits= SL_sbcl.item(x).selectSingleNode("units").text
SL_VarationDrop= SL_sbcl.item(x).selectSingleNode("drop").text
SL_VarationConst= SL_sbcl.item(x).selectSingleNode("construct").text

%>
<option value="<%=trim(SL_Variation)%>"><%=SL_VarationDesc%>&nbsp;<%=formatcurrency(SL_VarationPrice)%>
<%if SHOW_IN_STOCK =1 then
if (SL_VarationUnits > 0) or (SL_VarationDrop = "true") or (SL_VarationConst = "true") then
Response.Write(" - In Stock")
else
Response.Write(" - Out of Stock")
end if
end if
%>
<%
next
set SL_sbcl = nothing
%>
</select>