Skip to content

Instantly share code, notes, and snippets.

@Jursdotme
Created January 11, 2018 11:41
Show Gist options
  • Save Jursdotme/467f912a7bc5b3adf6025fdf54a8ddd1 to your computer and use it in GitHub Desktop.
Save Jursdotme/467f912a7bc5b3adf6025fdf54a8ddd1 to your computer and use it in GitHub Desktop.
PR Choko
function renderProductList(boolHighlighted)
intAmount = 0 '0 equals all(*)
intRows = 75
strFields = "i.ID,i.ItemName,i.Image,i.ParentID, i.Highlighted, i.NetPrice, i.Colli, i.UnitOfMeasure, i.ItemName2"
strOrder = "Order By i.ItemName"
strSearch = ""
intPageNum = 1
intCategory = 0
intLastPage = 0 '0 Gets the last page as intLastPage
strCode = ""
'boolHighlighted = 0 '1 Selects products that are highlighted (cross categories)
if illegalChars(request("page")) <> "" and IsNumeric(illegalChars(request("page"))) then intPageNum = illegalChars(request("page")) end if
if illegalChars(request("category")) <> "" then intCategory = illegalChars(request("category")) end if
if illegalChars(request("code")) <> "" then strCode = illegalChars(request("code")) end if
if illegalChars(request("search")) <> "" then strSearch = illegalChars(request("search")) end if
arrayProducts = listProducts(intAmount,intRows,strFields,strOrder,intPageNum,intLastPage,intCategory,boolHighlighted,strSearch,strCode)
'renderCategoryHeader(intCategory)
if intCategory = "994" then
'response.write "<div style=""padding:10px 0;""><h1>Leveres fra d. 26. januar 2015</h1></div>"
elseif intCategory = "992" then
'response.write "<div style=""padding:10px 0;""><h1>Leveres fra d. 15. Februar 2018</h1></div>"
elseif intCategory = "993" then
'response.write "<div style=""padding:10px 0;""><h1>Leveres fra d. 15. Februar 2018</h1></div>"
elseif intCategory = "91" then
'response.write "<div style=""padding:10px 0;""><h1>Leveres fra d. 20. marts 2015</h1></div>"
elseif intCategory = "10" then
'response.write "<div style=""padding:10px;background:#f5f5f5; border:1px solid #eee; bprder-radius:3px;""><b>Husk</b> at bestille den nye vare som er i sortimentet fra 1/10-16 � <a href=""/shop/?category=10&product=81412""><u>CHO CHO chokolade 870g 81 stk. � varenummer 81412</u></a></div>"
end if
Call renderProductListInner(arrayProducts,0)
Response.Write(" <div style=""text-align:right;"">") & vbcrlf
Response.Write(" " & pagingProducts(pageID,intPageNum,intLastPage)) & vbcrlf
Response.Write(" </div>") & vbcrlf
end function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment