$product = {"id":7408542351459,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Weiweiboy - 可愛大王上甜點","handle":"iphone-12-mini-mod-nx-printable-eo04","description":null,"published_at":"2024-06-11T16:40:11+08:00","created_at":"2024-05-03T15:47:06+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Weiweiboy","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-weiweiboy","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-weiweiboy","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":41886671831139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-EO04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472547659875,"product_id":7408542351459,"position":9,"created_at":"2024-05-03T15:47:27+08:00","updated_at":"2024-05-03T15:47:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a2a45646dc765700c9198da896afe808619c50_65c16b00-ea1a-422d-950d-0a1a4d144cf9.webp?v=1714722447","variant_ids":[41886671831139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Weiweiboy - 可愛大王上甜點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-EO04","featured_media":{"alt":null,"id":23877464948835,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a2a45646dc765700c9198da896afe808619c50_65c16b00-ea1a-422d-950d-0a1a4d144cf9.webp?v=1714722447"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6b0f396ba3a60ec105b5d53b5d6f26b13a59f38_250af145-8132-4e5e-b481-c4beb520c39d.webp?v=1714722428","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b8b10139fe668009295b360bf1be5f0747a876_018a035c-31cb-4fbf-ab5d-fe00eae3eb46.webp?v=1714722431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d9949a63455331762fe8f5add90880ea9b8310f_5ec164b3-c818-4dad-b3c2-ff3774d8da06.webp?v=1714722433","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29f455d1febf8a81383fdbd47ef91aab01af9b79_aa0d4480-ae1e-495c-9ca3-c95023b028fb.webp?v=1714722435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27457950a4d5248857a5b9037df39ef012fbee68_1dbec1a3-776c-4a6c-9676-2aeecfeccb76.webp?v=1714722438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcd58288311356a7fe9899a2821fec5c3cdd6fde_4d7433b1-c3d9-4b05-ac1a-d438cf65147c.webp?v=1714722440","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/123aabdd757d9479180e880ed337c3ae75ee3201_bf6a6430-6b0c-4565-81b6-a0a4a05f17be.webp?v=1714722442","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c200d9d0e2d6bffa8509f80ed550f94b32cfab1_dcb5eedc-8237-40c1-a625-e9e97a3734b8.webp?v=1714722445","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a2a45646dc765700c9198da896afe808619c50_65c16b00-ea1a-422d-950d-0a1a4d144cf9.webp?v=1714722447","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ee735fd4362253512053ed765a8710ce860e12b_7403814d-7e1e-4d7e-99bd-42e08c20744a.webp?v=1714722449","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eea36c066fe823937509e5c770a9c90120119a33_09aeb8cc-aac3-4a56-8258-176a5ad1c0c5.webp?v=1714722452"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6b0f396ba3a60ec105b5d53b5d6f26b13a59f38_250af145-8132-4e5e-b481-c4beb520c39d.webp?v=1714722428","options":["color"],"media":[{"alt":null,"id":23877460394083,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6b0f396ba3a60ec105b5d53b5d6f26b13a59f38_250af145-8132-4e5e-b481-c4beb520c39d.webp?v=1714722428"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6b0f396ba3a60ec105b5d53b5d6f26b13a59f38_250af145-8132-4e5e-b481-c4beb520c39d.webp?v=1714722428","width":2000},{"alt":null,"id":23877460951139,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b8b10139fe668009295b360bf1be5f0747a876_018a035c-31cb-4fbf-ab5d-fe00eae3eb46.webp?v=1714722431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b8b10139fe668009295b360bf1be5f0747a876_018a035c-31cb-4fbf-ab5d-fe00eae3eb46.webp?v=1714722431","width":2000},{"alt":null,"id":23877461442659,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d9949a63455331762fe8f5add90880ea9b8310f_5ec164b3-c818-4dad-b3c2-ff3774d8da06.webp?v=1714722433"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d9949a63455331762fe8f5add90880ea9b8310f_5ec164b3-c818-4dad-b3c2-ff3774d8da06.webp?v=1714722433","width":2000},{"alt":null,"id":23877461901411,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29f455d1febf8a81383fdbd47ef91aab01af9b79_aa0d4480-ae1e-495c-9ca3-c95023b028fb.webp?v=1714722435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29f455d1febf8a81383fdbd47ef91aab01af9b79_aa0d4480-ae1e-495c-9ca3-c95023b028fb.webp?v=1714722435","width":2000},{"alt":null,"id":23877462818915,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27457950a4d5248857a5b9037df39ef012fbee68_1dbec1a3-776c-4a6c-9676-2aeecfeccb76.webp?v=1714722438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27457950a4d5248857a5b9037df39ef012fbee68_1dbec1a3-776c-4a6c-9676-2aeecfeccb76.webp?v=1714722438","width":2000},{"alt":null,"id":23877463277667,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcd58288311356a7fe9899a2821fec5c3cdd6fde_4d7433b1-c3d9-4b05-ac1a-d438cf65147c.webp?v=1714722440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcd58288311356a7fe9899a2821fec5c3cdd6fde_4d7433b1-c3d9-4b05-ac1a-d438cf65147c.webp?v=1714722440","width":2000},{"alt":null,"id":23877463769187,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/123aabdd757d9479180e880ed337c3ae75ee3201_bf6a6430-6b0c-4565-81b6-a0a4a05f17be.webp?v=1714722442"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/123aabdd757d9479180e880ed337c3ae75ee3201_bf6a6430-6b0c-4565-81b6-a0a4a05f17be.webp?v=1714722442","width":2000},{"alt":null,"id":23877464359011,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c200d9d0e2d6bffa8509f80ed550f94b32cfab1_dcb5eedc-8237-40c1-a625-e9e97a3734b8.webp?v=1714722445"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c200d9d0e2d6bffa8509f80ed550f94b32cfab1_dcb5eedc-8237-40c1-a625-e9e97a3734b8.webp?v=1714722445","width":2000},{"alt":null,"id":23877464948835,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a2a45646dc765700c9198da896afe808619c50_65c16b00-ea1a-422d-950d-0a1a4d144cf9.webp?v=1714722447"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a2a45646dc765700c9198da896afe808619c50_65c16b00-ea1a-422d-950d-0a1a4d144cf9.webp?v=1714722447","width":2000},{"alt":null,"id":23877465440355,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ee735fd4362253512053ed765a8710ce860e12b_7403814d-7e1e-4d7e-99bd-42e08c20744a.webp?v=1714722449"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ee735fd4362253512053ed765a8710ce860e12b_7403814d-7e1e-4d7e-99bd-42e08c20744a.webp?v=1714722449","width":2000},{"alt":null,"id":23877465964643,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eea36c066fe823937509e5c770a9c90120119a33_09aeb8cc-aac3-4a56-8258-176a5ad1c0c5.webp?v=1714722452"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eea36c066fe823937509e5c770a9c90120119a33_09aeb8cc-aac3-4a56-8258-176a5ad1c0c5.webp?v=1714722452","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886671831139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-EO04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472547659875,"product_id":7408542351459,"position":9,"created_at":"2024-05-03T15:47:27+08:00","updated_at":"2024-05-03T15:47:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a2a45646dc765700c9198da896afe808619c50_65c16b00-ea1a-422d-950d-0a1a4d144cf9.webp?v=1714722447","variant_ids":[41886671831139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Weiweiboy - 可愛大王上甜點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-EO04","featured_media":{"alt":null,"id":23877464948835,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a2a45646dc765700c9198da896afe808619c50_65c16b00-ea1a-422d-950d-0a1a4d144cf9.webp?v=1714722447"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886671831139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-EO04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472547659875,"product_id":7408542351459,"position":9,"created_at":"2024-05-03T15:47:27+08:00","updated_at":"2024-05-03T15:47:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a2a45646dc765700c9198da896afe808619c50_65c16b00-ea1a-422d-950d-0a1a4d144cf9.webp?v=1714722447","variant_ids":[41886671831139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Weiweiboy - 可愛大王上甜點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-EO04","featured_media":{"alt":null,"id":23877464948835,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a2a45646dc765700c9198da896afe808619c50_65c16b00-ea1a-422d-950d-0a1a4d144cf9.webp?v=1714722447"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(document).ready(function() { var productImg = $product.images[0]; var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]); var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate') ? [productImg, bumperImg] : [bumperImg, productImg]; window.mergeProductImages(layers).then(function (mergedImg) { $('.merged-img').attr('src', mergedImg); }); }); }; var sellingStatusData window.fetchSellingStatus().then(data => { try { sellingStatusData = data; } catch (error) { sellingStatusData = null console.error('Unable to parse selling status', error) } $(document).ready(function() { handleSellingStatus($defaultVariant.sku); }); }) function handleSellingStatus(currentSku) { if (!sellingStatusData) { console.error('No selling status available!') return } const sellingStatusElement = document.getElementById('selling-status') const addToCartButton = document.getElementById('AddToCart-product-template') const currentProductSku = currentSku.replace(/-(.*)$/, '-') if ($variants) { const flattenedSellingStatus = [...sellingStatusData.pending, ...sellingStatusData.preorder] const matchSellingStatusProduct = flattenedSellingStatus.filter(product => currentProductSku === product.sku) if (matchSellingStatusProduct.length > 0) { const isProductPending = matchSellingStatusProduct[0].status === 'pending' const matchDate = matchSellingStatusProduct[0].date sellingStatus = isProductPending ? "缺貨中" : "預購完成出貨日:" + matchDate sellingStatusElement.textContent = sellingStatus if (sellingStatus.includes("缺貨中")){ addToCartButton.disabled ='true'; addToCartButton.textContent = "缺貨中無法加入購物車" } else { addToCartButton.textContent = "加到購物車" } } else { sellingStatusElement.textContent = '' addToCartButton.textContent = "加到購物車" }; }; }; document.addEventListener('DOMContentLoaded', function () { var currentVariantSelect = document.getElementById('SingleOptionSelector-0') currentVariantSelect.addEventListener('change', function() { var currentSku = $('#current_sku').text() var skuElement = document.getElementById('current-sku') skuElement.textContent = currentSku handleSellingStatus(currentSku) }); });
// Override default values of shop.strings for each template. // Alternate product templates can change values of // add to cart button, sold out, and unavailable states here. theme.productStrings = { addToCart: "加到購物車", soldOut: "售完", unavailable: "停產" }