Ver Mensaje Individual
  #8 (permalink)  
Antiguo 22/07/2004, 16:36
el_principiante
 
Fecha de Ingreso: julio-2004
Mensajes: 7
Antigüedad: 20 años, 9 meses
Puntos: 0
esta es la segunda parte... y creo que es aqui donde se consultan los datos de la tabla de options (que son los finishes para los productos)

Código HTML:
p align="center">
<b><font color="#FFFFFF" face="Times New Roman">
<%
if IsArray(prodoptions) then
	response.write "<table border='0' cellspacing='1' cellpadding='1'>"
	for rowcounter=0 to UBOUND(prodoptions,2)
		index=0
		gotSelection=false
		cacheThis=true
		do while index < (maxprodopts-1) AND aOption(0,index)<>0
			if aOption(0,index)=Int(prodoptions(0,rowcounter)) then
				gotSelection=true
				exit do
			end if
			index = index + 1
		loop
		if NOT gotSelection then
			sSQL="SELECT optID,optName,optfImage,optGrpName,optPriceDiff,optType,optFlags FROM options INNER JOIN optionGroup ON options.optGroup=optionGroup.optGrpID WHERE optGroup="&prodoptions(0,rowcounter)&" ORDER BY optID"
			rs2.Open sSQL,cnn,0,1
			if NOT rs2.EOF then
				if Abs(Int(rs2("optType")))=3 then
					fieldHeight = cInt((cDbl(rs2("optPriceDiff"))-Int(rs2("optPriceDiff")))*100.0)
					aOption(1,index) = "<tr><td align='right' width='30%'><b>"&rs2("optGrpName")&":</b></td><td> <input type='hidden' name='optnPLACEHOLDER' value='"&rs2("optID")&"'>"
					if fieldHeight<>1 then
						aOption(1,index) = aOption(1,index) & "<textarea wrap='virtual' name='voptnPLACEHOLDER' cols='"&atb(Int(rs2("optPriceDiff")))&"' rows='"&fieldHeight&"'>"
						aOption(1,index) = aOption(1,index) & rs2("optName")&"</textarea>"
					else
						aOption(1,index) = aOption(1,index) & "<input maxlength='255' type='text' name='voptnPLACEHOLDER' size='"&atb(Int(rs2("optPriceDiff")))&"' value="""&Replace(rs2("optName"),"""","&quot;")&""">"
					end if
					aOption(1,index) = aOption(1,index) & "</td></tr>"
				else
					aOption(1,index) = "<tr><td align='right' width='30%'><b>"&rs2("optGrpName")&":</b></td><td> <select class=""prodoption"" onChange='updatepricePLACEHOLDER();' name='optnPLACEHOLDER' size='1'>"
					if Int(rs2("optType"))>0 then aOption(1,index) = aOption(1,index) & "<option value=''>"&xxPlsSel&"</option>"
					do while not rs2.EOF
						aOption(1,index) = aOption(1,index) & "<option value='"&rs2("optID")&"'>"&rs2("optName")
						if cDbl(rs2("optPriceDiff"))<>0 then
							aOption(1,index) = aOption(1,index) & " ("
							if cDbl(rs2("optPriceDiff")) > 0 then aOption(1,index) = aOption(1,index) & "+"
							if (rs2("optFlags") AND 1) = 1 then
								cacheThis=false
								aOption(1,index) = aOption(1,index) & FormatEuroCurrency((rs("pPrice")*rs2("optPriceDiff"))/100.0)&")"
							else
								aOption(1,index) = aOption(1,index) & FormatEuroCurrency(rs2("optPriceDiff"))&")"
							end if
						end if
						aOption(1,index) = aOption(1,index) & "</option>"&vbCrLf
						rs2.MoveNext
					loop
					aOption(1,index) = aOption(1,index) & "</select></td></tr>"
				end if
			end if
			if cacheThis then aOption(0,index) = Int(prodoptions(0,rowcounter))
			rs2.Close
		end if
		response.write Replace(Replace(aOption(1,index),"optnPLACEHOLDER","optn"&rowcounter),"updatepricePLACEHOLDER","updateprice"&Count,1,1)
	next
	response.write "</table>"
end if
%></font></b></p>
                </td>
              </tr>
              <tr>
			    <td width="20%" valign="top"><% if useemailfriend then %><b><font color="#FFFFFF" face="Times New Roman">
<a href="javascript:openEFWindow('<%=Server.URLEncode(prodid)%>')"><strong><%=xxEmFrnd%></strong></a>
<% else %> </font></b><b><font color="#FFFFFF" face="Times New Roman">&nbsp;
<% end if %></font></b></td>
                <td width="60%" align="center" valign="top" colspan="2">
				<%	if noprice=true then
						response.write "&nbsp;"
					else
						if cDbl(rs("pListPrice"))<>0.0 then response.write Replace(xxListPrice, "%s", FormatEuroCurrency(rs("pListPrice"))) & "<BR>"
						if cDbl(rs("pPrice"))=0 AND pricezeromessage<>"" then
							response.write pricezeromessage
						else
							response.write "<b>" & xxPrice & ":</b> <span class=""price"" id=""pricediv" & Count & """ name=""pricediv" & Count & """>" & FormatEuroCurrency(rs("pPrice")) & "</span> "
							if showtaxinclusive=true AND (rs("pExemptions") AND 2)<>2 then response.write Replace(ssIncTax,"%s", "<span id=""pricedivti" & Count & """ name=""pricedivti" & Count & """>" & FormatEuroCurrency(rs("pPrice")+(rs("pPrice")*countryTax/100.0)) & "</span> ")
							response.write "<br>"
							if currencyseparator="" then currencyseparator=" "
							if currRate1<>0 AND currSymbol1<>"" then response.write "<span id=""pricediv1c" & Count & """ name=""pricediv1c" & Count & """>" & FormatNumber(rs("pPrice")*currRate1, checkDPs(currSymbol1)) & " <b>" & currSymbol1 & "</b></span>" & currencyseparator
							if currRate2<>0 AND currSymbol2<>"" then response.write "<span id=""pricediv2c" & Count & """ name=""pricediv2c" & Count & """>" & FormatNumber(rs("pPrice")*currRate2, checkDPs(currSymbol2)) & " <b>" & currSymbol2 & "</b></span>" & currencyseparator
							if currRate3<>0 AND currSymbol3<>"" then response.write "<span id=""pricediv3c" & Count & """ name=""pricediv3c" & Count & """>" & FormatNumber(rs("pPrice")*currRate3, checkDPs(currSymbol3)) & " <b>" & currSymbol3 & "</b></span>"
						end if
					end if %><b><font color="#FFFFFF" face="Times New Roman">
                </font></b>
				</td> 
                <td width="20%" align="right" valign="top">
<%
if nobuyorcheckout=true then
	response.write "&nbsp;"
else
	if useStockManagement then
		isInStock = Int(rs("pInStock")) > 0
	else
		isInStock = Int(rs("pSell")) <> 0
	end if
	if isInStock then
%><font color="#FFFFFF"><b><font face="Times New Roman">
<input type="hidden" name="id" value="<%=rs("pID")%>">
<input type="hidden" name="mode" value="add">
<input type="hidden" name="frompage" value="<%=Request.ServerVariables("URL")&IIfVr(Trim(Request.ServerVariables("QUERY_STRING"))<>"","?","")&Request.ServerVariables("QUERY_STRING")%>">
</font></b></font>
<% if showquantondetail=true then %><font color="#FFFFFF"><b><font face="Times New Roman"><input type="text" name="quant" size="2" value="1"><% end if %><input align="absmiddle" type="image" src="images/buy.gif" border="0"><%
	else
		response.write "<b>"&xxOutStok&"</b>"
	end if
end if			%></td>
            </tr>
<%
rs.Close
cnn.Close
%> </font></b></font><font face="Times New Roman"> 
            </table>
<% else ' if usedetailbodyformat=2 %><b><font color="#FFFFFF"> </font></b>
</font>
			<table width="<%=innertablewidth%>" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
              <tr> 
                <td width="30%" align="center" valign="middle"> <%
				if NOT (Trim(rs("pLargeImage"))="" OR IsNull(rs("pLargeImage")) OR Trim(rs("pLargeImage"))="prodimages/") then %><b><font color="#FFFFFF" face="Times New Roman">
                </font></b><b><font color="#FFFFFF" face="Times New Roman"> 
                  <img src="<%=rs("pLargeImage")%>" border="0" alt="<%=Replace(rs("pName"),"""","&quot;")%>"> <%
				elseif NOT (Trim(rs("pImage"))="" OR IsNull(rs("pImage")) OR Trim(rs("pImage"))="prodimages/") then %> 
                  <img src="<%=rs("pImage")%>" border="0" alt="<%=Replace(rs("pName"),"""","&quot;")%>"> <%
				else %> &nbsp; <%
				end if %> </font></b> 
                </td>
				<td>&nbsp;</td>
				<td width="70%" valign="top"> 
                  <p><font color="#FFFFFF" face="Times New Roman"><b><% if showproductid=true then response.write "<b>" & xxPrId & ":</b> " & rs("pID") & "<br>" %><%=rs("pName")&xxDot%><% if alldiscounts<>"" then response.write " <font color=""#FF0000""><strong>"&xxDsApp&"</strong><br><font size=""1"">" & alldiscounts & "</font></font>" %><br>
				  <% shortdesc = Trim(rs("pDescription"))
				longdesc = Trim(rs("pLongDescription"))
				if longdesc<>"" then
					response.write longdesc&"<BR>"
				elseif shortdesc<>"" then
					response.write shortdesc&"<BR>"
				end if
				if noprice=true then
					response.write "&nbsp;"
				else
					if cDbl(rs("pListPrice"))<>0.0 then response.write Replace(xxListPrice, "%s", FormatEuroCurrency(rs("pListPrice"))) & "<BR>"
					if cDbl(rs("pPrice"))=0 AND pricezeromessage<>"" then
						response.write pricezeromessage
					else
						response.write "<b>" & xxPrice & ":</b> <span class=""price"" id=""pricediv" & Count & """ name=""pricediv" & Count & """>" & FormatEuroCurrency(rs("pPrice")) & "</span> "
						if showtaxinclusive=true AND (rs("pExemptions") AND 2)<>2 then response.write Replace(ssIncTax,"%s", "<span id=""pricedivti" & Count & """ name=""pricedivti" & Count & """>" & FormatEuroCurrency(rs("pPrice")+(rs("pPrice")*countryTax/100.0)) & "</span> ")
						response.write "<br>"
						if currencyseparator="" then currencyseparator=" "
						if currRate1<>0 AND currSymbol1<>"" then response.write "<span id=""pricediv1c" & Count & """ name=""pricediv1c" & Count & """>" & FormatNumber(rs("pPrice")*currRate1, checkDPs(currSymbol1)) & " <b>" & currSymbol1 & "</b></span>" & currencyseparator
						if currRate2<>0 AND currSymbol2<>"" then response.write "<span id=""pricediv2c" & Count & """ name=""pricediv2c" & Count & """>" & FormatNumber(rs("pPrice")*currRate2, checkDPs(currSymbol2)) & " <b>" & currSymbol2 & "</b></span>" & currencyseparator
						if currRate3<>0 AND currSymbol3<>"" then response.write "<span id=""pricediv3c" & Count & """ name=""pricediv3c" & Count & """>" & FormatNumber(rs("pPrice")*currRate3, checkDPs(currSymbol3)) & " <b>" & currSymbol3 & "</b></span>"
					end if
					response.write "<hr width=""80%"">"
				end if %> </b></font>
				</p>