前往購物車   更多主題書展   前往三民網路書店
<% '--============= 視覺大人設定區 ==============-- flag_ACT_verson = "1" ' 1:開啟活動頁模式 0:關閉活動頁模式 ( EDM mode ) flag_description = "1" ' 1:使用短敘述 0:關閉短敘述 width_prod = 230 ' 單一商品寬 (數字) show_qty = 4 ' 一列呈現幾個商品 (數字) gate_space_pixel = 20 ' 列間距 (數字) set_product_01 = "H000000020434,H000000000126,H000000018499" set_product_02 = "H000000018210,H000000020133" set_product_03 = "H000000007414,H000000016956,H000000017087" set_product_04 = "H000000018570,H000000017534,H000000016052,H000000012740" set_product_05 = "H000000020661,H000000018593,H000000021293" set_product_06 = "H000000000921,H000000020699" set_product_07 = "H000000021150,H000000021126,H000000G10810,H000000021153" set_product_08 = "H000000021107,H000000021294,H000000020938,H000000020567" set_product_09 = "H000000019680,H000000019681,H000000021095,H000000021097" set_product_10 = "H000000021501,H000000021502,H000000021497,H000000019960" '排除特殊折扣的清單(包含在清單內產品將會不會乘以設定折數,而是直接顯示特價) 'exclude_product = ",H000000018688,H000000018896,H000000019002,H000000G10188" '書單呈現順序開關 1:開啟 0:關閉(不限制順序較節省效能) flag_prod_sort_01= "1" flag_prod_sort_02= "1" flag_prod_sort_03= "1" flag_prod_sort_04= "1" flag_prod_sort_05= "1" flag_prod_sort_06= "1" flag_prod_sort_07= "1" flag_prod_sort_08= "1" flag_prod_sort_09= "1" flag_prod_sort_10= "1" Set dicDescription = Server.CreateObject("Scripting.Dictionary") Set dicSubDescription = Server.CreateObject("Scripting.Dictionary") '自定短敘述 'dicDescription.Add "H000000017263","充滿歡樂的魔力,在互動中分享與學習…" '預設折扣(85折 => 0.85,9折 => 0.9) discount = 0.79 '============= 視覺大人設定區 End ============== product_box = set_product_01 & "," & set_product_02 & "," & set_product_03 & "," & set_product_04 & "," & set_product_05 & "," & set_product_06 & "," & set_product_07 & "," & set_product_08 & "," & set_product_09 & "," & set_product_10 & "," & set_product_11 & "," & set_product_12 & "," & set_product_13 & "," & set_product_14 & "," & set_product_15 & "," & set_product_16 & "," & set_product_17 product_box = replace(product_box,",","','") 'sql = sql & "select " & _ '"productno as 'product_id', productName as 'name',ShortDescription as 'description', " & _ '"SalePrice as 'retail_price', " & _ '"CASE WHEN productno in('" & replace(exclude_product,",","','") &"') " & _ '" then specialprice " & _ '" else " & _ '" CASE WHEN ABS((SalePrice * " & discount & ") - ROUND((SalePrice * " & discount & "), 0, 1)) * POWER(10, 0+1) = 5 " & _ '" THEN ROUND((SalePrice * " & discount & "), 0, CASE WHEN CONVERT(INT, ROUND(ABS((SalePrice * " & discount & ")) * POWER(10,0), 0, 1)) % 2 = 1 THEN 0 ELSE 1 END) " & _ '" ELSE ROUND((SalePrice * " & discount & "), 0) " & _ '" END " & _ '"END " & _ '" as 'sell_price' " & _ '"from product with (nolock) " sql = sql & "select " & _ "productno as 'product_id', productName as 'name',ShortDescription as 'description', " & _ "SalePrice as 'retail_price', " & _ "CASE WHEN productno in('" & replace(exclude_product,",","','") &"') " & _ " then specialprice " & _ " else " & _ " CASE WHEN " & _ " specialprice < ROUND((product.SalePrice * " & discount & "), 0) then specialprice " & _ " ELSE ROUND((SalePrice * " & discount & "), 0) " & _ " END " & _ "END " & _ " as 'sell_price' " & _ ", SaleStatus " & _ "from product with (nolock) " &_ "join Productec on productec.ProductID = product.productid " sql_01 = sql & " where product.productno in('" & replace(set_product_01,",","','") &"') " if flag_prod_sort_01 ="1" then sql_01 = sql_01 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_01 & ",')" sql_02 = sql & " where product.productno in('" & replace(set_product_02,",","','") &"') " if flag_prod_sort_02 ="1" then sql_02 = sql_02 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_02 & ",')" sql_03 = sql & " where product.productno in('" & replace(set_product_03,",","','") &"') " if flag_prod_sort_03 ="1" then sql_03 = sql_03 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_03 & ",')" sql_04 = sql & " where product.productno in('" & replace(set_product_04,",","','") &"') " if flag_prod_sort_04 ="1" then sql_04 = sql_04 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_04 & ",')" sql_05 = sql & " where product.productno in('" & replace(set_product_05,",","','") &"') " if flag_prod_sort_05 ="1" then sql_05 = sql_05 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_05 & ",')" sql_06 = sql & " where product.productno in('" & replace(set_product_06,",","','") &"') " if flag_prod_sort_06 ="1" then sql_06 = sql_06 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_06 & ",')" sql_07 = sql & " where product.productno in('" & replace(set_product_07,",","','") &"') " if flag_prod_sort_07 ="1" then sql_07 = sql_07 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_07 & ",')" sql_08 = sql & " where product.productno in('" & replace(set_product_08,",","','") &"') " if flag_prod_sort_08 ="1" then sql_08 = sql_08 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_08 & ",')" sql_09 = sql & " where product.productno in('" & replace(set_product_09,",","','") &"') " if flag_prod_sort_09 ="1" then sql_09 = sql_09 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_09 & ",')" sql_10 = sql & " where product.productno in('" & replace(set_product_10,",","','") &"') " if flag_prod_sort_10 ="1" then sql_10 = sql_10 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_10 & ",')" sql_11 = sql & " where product.productno in('" & replace(set_product_11,",","','") &"') " if flag_prod_sort_11 ="1" then sql_11 = sql_11 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_11 & ",')" sql_12 = sql & " where product.productno in('" & replace(set_product_12,",","','") &"') " if flag_prod_sort_12 ="1" then sql_12 = sql_12 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_12 & ",')" sql_13 = sql & " where product.productno in('" & replace(set_product_13,",","','") &"') " if flag_prod_sort_13 ="1" then sql_13 = sql_13 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_13 & ",')" sql_14 = sql & " where product.productno in('" & replace(set_product_14,",","','") &"') " if flag_prod_sort_14 ="1" then sql_14 = sql_14 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_14 & ",')" sql_15 = sql & " where product.productno in('" & replace(set_product_15,",","','") &"') " if flag_prod_sort_15 ="1" then sql_15 = sql_15 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_15 & ",')" sql_16 = sql & " where product.productno in('" & replace(set_product_16,",","','") &"') " if flag_prod_sort_16 ="1" then sql_16 = sql_16 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_16 & ",')" sql_17 = sql & " where product.productno in('" & replace(set_product_17,",","','") &"') " if flag_prod_sort_17 ="1" then sql_17 = sql_17 & "order by charindex(','+rtrim(cast(product.productno as varchar(13)))+',','," & set_product_17 & ",')" if not isnumeric(show_qty) or show_qty = "" then show_qty = 4 End IF '查詢是否有自定 Description function GetDesciption(productno,description) result = dicDescription(trim(productno)) if result = "" then result = description end if GetDesciption = result end function '查詢是否有額外要加 Description function IsHaveSubDesciption(productno) result = dicSubDescription(trim(productno)) if result = "" then result = description end if IsHaveSubDesciption = result end function ' 是否包含在sub function IsInSubDesciption(productno) result = dicSubDescription(trim(productno)) if result = "" then result = false else result = true end if IsInSubDesciption = result end function ' 取得產品素材folder name function GetProductMediaFolder(productno) if InStr(productno,"G") > 0 then GetProductMediaFolder = Right(productno, len(productno) - (InStr(productno,"G") - 1) ) else GetProductMediaFolder = Right(productno,5) end if end function %> <% IF flag_ACT_verson ="1" Then script type="text/javascript"> $(document).ready(function () { var fancyboxproduct = "<%=product_box%>"; fancyboxproduct = fancyboxproduct.replace(/\'/g,'');; var productlist = fancyboxproduct.split(','); for(var i = 0; i < productlist.length;i++ ) { if(productlist[i] == '') continue; $("#" + productlist[i] + " a[rel=lightbox]").fancybox({ 'width': '70%', 'height': '80%', 'autoSize': true, 'transitionIn': 'none', 'transitionOut': 'none', 'arrows': true, 'type': 'image', 'loop' : false }); } var productdetaillist = $("a[rel=example_group]"); for(var k = 0; k < productdetaillist.length; k++ ) { $("a[rel=example_group]:eq(" + k +")").fancybox({ 'width': '70%', 'height': '80%', 'autoScale': false, 'transitionIn': 'none', 'transitionOut': 'none', 'arrows': false, 'type': 'iframe', 'loop' : false, 'cyclic' : false }); } }); <% End IF %>
Back to Top
  定 價:280元
優惠價:90252
 
  定 價:280元
優惠價:90252
 
定 價:1180元 優惠價:901062元 

TOP