<% location = "products" sub_location = "product_detail" category_code = Request("category_code") category_level = Request("category_level") item_code = Request("item_code") sql_detail = "SELECT * FROM og_products WHERE p_item_code='"& item_code &"'" set rs = server.CreateObject("adodb.recordset") rs.Open sql_detail, dbcon,1 if rs.bof or rs.eof then %> <% response.end end if cur_category_name = select_category_name(rs("p_category_code")) cur_category_code = rs("p_category_code") sql_cat = "SELECT c_category_name, c_category_level, c_parent_category FROM og_categories WHERE c_category_code='"& rs("p_category_code") &"'" set rs_cat = server.CreateObject("adodb.recordset") rs_cat.Open sql_cat, dbcon,1 parent_category_code = "" parent_category_name = "" if not rs_cat.bof or not rs_cat.eof then if rs_cat("c_category_level") = 2 then cur_category_level = rs_cat("c_category_level") parent_category_code = rs_cat("c_parent_category") parent_category_name = select_category_name(parent_category_code) end if end if brand_name = select_brand_name(rs("p_brand_code")) flag_sale = "" flag_new = "" if cdbl(rs("p_price_retail_sale")) > 0 then flag_sale = "yes" item_price = rs("p_price_retail_sale") else item_price = rs("p_price_retail") end if p_description = rs("p_description") if p_description <> "" then p_description = replace(p_description,"chr_13", chr(13)) p_description = replace(p_description,"chr_9", chr(9)) end if %>
" class="border_all_gray_red" id="main">
"> <% sql_img = "SELECT p_image FROM og_product_images WHERE p_item_code ='"& item_code &"' ORDER BY p_number ASC" set rs_img = server.CreateObject("adodb.recordset") rs_img.Open sql_img, dbcon,1 if not rs_img.bof or not rs_img.eof then total_img = rs_img.recordcount for m=1 to total_img response.write "" rs_img.movenext next end If rs_img.close set rs_img=nothing %>
<%=brand_name%>
<%=rs("p_item_name")%>
Style # : <%=rs("p_item_code")%>
<% if flag_sale = "yes" then %> $<%=FormatNumber(rs("p_price_retail_sale"),2)%> $<%=FormatNumber(rs("p_price_retail"),2)%> <% else %> $<%=Formatnumber(rs("p_price_retail"),2)%> <% end if %>
<%=rs("p_overview")%>
"> ">
<% ' search option name (option_title) sql_option = "SELECT * FROM og_product_options WHERE p_status='y' AND p_item_code ='"& item_code &"' ORDER BY p_number ASC" set rs_option = server.CreateObject("adodb.recordset") rs_option.Open sql_option, dbcon,1 if not rs_option.bof or not rs_option.eof then total0 = rs_option.recordcount if total0 = 1 then item_sku = rs_option("p_item_sku") end if dim option_title(13) option_count = -1 for o=18 to 30 if rs_option(o) <> "" then option_count = option_count + 1 option_title(cint(option_count)) = rs_option(o).Name response.write "" end if next option_status = "yes" end if rs_option.close set rs_option=nothing %> value="<%=item_sku%>"<% end if %>> <% if option_status = "yes" then for o=0 to option_count 'sql_opt = "SELECT DISTINCT "& option_title(o) &" FROM og_product_options WHERE p_status='y' AND p_item_code ='"& item_code &"'" sql_opt = "SELECT DISTINCT "& option_title(o) &", MIN(p_number) FROM og_product_options WHERE p_status='y' AND p_item_code ='"& item_code &"' GROUP BY "& option_title(o) &" ORDER BY MIN(p_number) ASC" set rs_opt = server.CreateObject("adodb.recordset") rs_opt.Open sql_opt, dbcon,1 if not rs_opt.bof or not rs_opt.eof then total_opt = rs_opt.recordcount %>
<%=ucase(replace(option_title(o),"p_",""))%> : <% if total_opt = 1 then %><%=rs_opt(0)%><% end if %>
<% for t=1 to total_opt option_id = option_title(o) &"_"& t ' for class chain sql_class = "SELECT DISTINCT p_item_sku FROM og_product_options WHERE "& option_title(o) &"='"& rs_opt(0) &"' AND p_item_code ='"& item_code &"'" set rs_class = server.CreateObject("adodb.recordset") rs_class.Open sql_class, dbcon,1 if not rs_class.bof or not rs_class.eof then total_class = rs_class.recordcount option_class = "" for c=1 to total_class temp_class0 = split(rs_class("p_item_sku"),"_") temp_class = temp_class0(ubound(temp_class0)) option_class = option_class & temp_class if c <> total_class then option_class = option_class &" " end if rs_class.movenext next rs_class.close set rs_class=nothing end if %> checked<% end if %>> <% rs_opt.movenext next response.write "
" end if rs_opt.close set rs_opt=nothing next end if %> <% if option_count >0 then %> <% end if %>
<% if rs("p_status") = "y" then %> <% else %> Sold Out <% end if %>
<% if cdbl(item_price) >= 50 then %>
* This product qualifies for FREE shipping within the 48 contiguous states
<% end if %>
Description & Specification
<%=p_description%>
<% if rs("p_related_items") <> "" then arr_related = split(rs("p_related_items")&",",",") %>
You may also like
<% for r=0 to ubound(arr_related)-1 re_item_code = trim(arr_related(r)) if re_item_code <> "" then sql_re = "SELECT p_item_code, p_item_name, p_category_code, p_brand_code, p_image1, p_price_retail, p_price_retail_sale, p_overview, p_display_status, p_number FROM og_products WHERE p_item_code ='"& re_item_code &"'" set rs_re = server.CreateObject("adodb.recordset") rs_re.Open sql_re, dbcon,1 if not rs_re.bof or not rs_re.eof then brand_name = select_brand_name(rs_re("p_brand_code")) flag_sale = "" flag_new = "" if cdbl(rs_re("p_price_retail_sale")) > 0 then flag_sale = "yes" end if if instr(rs_re("p_display_status"),"n") > 0 then flag_new = "yes" end if %>
" class="related_image"> <%=brand_name%>
<%=rs_re("p_item_name")%>
<% if flag_sale = "yes" then %>$<%=FormatNumber(rs_re("p_price_retail_sale"),2)%> $<%=FormatNumber(rs_re("p_price_retail"),2)%> <% else %>$<%=Formatnumber(rs_re("p_price_retail"),2)%><% end if %>
<%=rs_re("p_overview")%>
<% if flag_sale="yes" then %>Sale<% end if %> <% if flag_new="yes" then %>New<% end if %>
<% end if end if next %>
<% end if %>