$product = {"id":7408385359971,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday","handle":"iphone-12-pro-max-mod-nx-printable-rl01","description":null,"published_at":"2024-06-11T16:35:47+08:00","created_at":"2024-05-03T15:16:05+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Twenty One Point Five - 21.5","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-twenty-one-point-five","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-twenty-one-point-five","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":41884895838307,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-RL01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472123609187,"product_id":7408385359971,"position":1,"created_at":"2024-05-03T15:16:07+08:00","updated_at":"2024-05-03T15:16:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08ec14b16765e91a15ae4719cc3bef03d995de5b_009b2b33-74bb-4fa0-98d5-fb3f46602a88.webp?v=1714720567","variant_ids":[41884895838307]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday - 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":"NPB0118724-RL01","featured_media":{"alt":null,"id":23877039095907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08ec14b16765e91a15ae4719cc3bef03d995de5b_009b2b33-74bb-4fa0-98d5-fb3f46602a88.webp?v=1714720567"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08ec14b16765e91a15ae4719cc3bef03d995de5b_009b2b33-74bb-4fa0-98d5-fb3f46602a88.webp?v=1714720567","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b93f00eebb52569d89166188e2d7497c0b09d59_67eeac28-b318-4315-843d-e401fce50010.webp?v=1714720570","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fed5d5d10dfb3241b3c5ae728aa795241da4ba95_011f2363-c14d-4862-86f7-9e432eb823bd.webp?v=1714720573","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34960523672a16a60ff816d3a3f212ea42cae5c6_a29f0f01-ae8b-4759-8e64-96643bcbd5a6.webp?v=1714720575","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d53ab5eb3fbe9eec53dcafe8674fb7f3d3b412f1_6baf9b09-e81d-4fb9-8f57-226e8082ad22.webp?v=1714720578","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b513be61f8f3677bec89d3608f494b07e8ee97e_5872c934-9de0-4750-89a3-c62d04363107.webp?v=1714720580","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edc5e0908d776959694fb549796ae9c7f86a5df7_0dcfadfb-ba4e-4e9a-a12c-f8f8e67ab3cb.webp?v=1714720583","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f0bb23f1ef5258f594624451cd65de35f711ec_db735594-bd28-4d65-a61e-99bb8dae272c.webp?v=1714720585","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a460a887ec89f3814150870caa3cab4fdc2bea8_06b2642e-0c6e-4e55-bfb7-7e60c242cb30.webp?v=1714720588","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4822a031c5e6bba16a9e535adcecb3612ef1e405_e88810d7-efaa-4f8e-b93e-8c058f418b0d.webp?v=1714720590"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08ec14b16765e91a15ae4719cc3bef03d995de5b_009b2b33-74bb-4fa0-98d5-fb3f46602a88.webp?v=1714720567","options":["color"],"media":[{"alt":null,"id":23877039095907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08ec14b16765e91a15ae4719cc3bef03d995de5b_009b2b33-74bb-4fa0-98d5-fb3f46602a88.webp?v=1714720567"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08ec14b16765e91a15ae4719cc3bef03d995de5b_009b2b33-74bb-4fa0-98d5-fb3f46602a88.webp?v=1714720567","width":2000},{"alt":null,"id":23877039521891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b93f00eebb52569d89166188e2d7497c0b09d59_67eeac28-b318-4315-843d-e401fce50010.webp?v=1714720570"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b93f00eebb52569d89166188e2d7497c0b09d59_67eeac28-b318-4315-843d-e401fce50010.webp?v=1714720570","width":2000},{"alt":null,"id":23877040013411,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fed5d5d10dfb3241b3c5ae728aa795241da4ba95_011f2363-c14d-4862-86f7-9e432eb823bd.webp?v=1714720573"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fed5d5d10dfb3241b3c5ae728aa795241da4ba95_011f2363-c14d-4862-86f7-9e432eb823bd.webp?v=1714720573","width":2000},{"alt":null,"id":23877040603235,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34960523672a16a60ff816d3a3f212ea42cae5c6_a29f0f01-ae8b-4759-8e64-96643bcbd5a6.webp?v=1714720575"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34960523672a16a60ff816d3a3f212ea42cae5c6_a29f0f01-ae8b-4759-8e64-96643bcbd5a6.webp?v=1714720575","width":2000},{"alt":null,"id":23877041094755,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d53ab5eb3fbe9eec53dcafe8674fb7f3d3b412f1_6baf9b09-e81d-4fb9-8f57-226e8082ad22.webp?v=1714720578"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d53ab5eb3fbe9eec53dcafe8674fb7f3d3b412f1_6baf9b09-e81d-4fb9-8f57-226e8082ad22.webp?v=1714720578","width":2000},{"alt":null,"id":23877041651811,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b513be61f8f3677bec89d3608f494b07e8ee97e_5872c934-9de0-4750-89a3-c62d04363107.webp?v=1714720580"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b513be61f8f3677bec89d3608f494b07e8ee97e_5872c934-9de0-4750-89a3-c62d04363107.webp?v=1714720580","width":2000},{"alt":null,"id":23877042274403,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edc5e0908d776959694fb549796ae9c7f86a5df7_0dcfadfb-ba4e-4e9a-a12c-f8f8e67ab3cb.webp?v=1714720583"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edc5e0908d776959694fb549796ae9c7f86a5df7_0dcfadfb-ba4e-4e9a-a12c-f8f8e67ab3cb.webp?v=1714720583","width":2000},{"alt":null,"id":23877042864227,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f0bb23f1ef5258f594624451cd65de35f711ec_db735594-bd28-4d65-a61e-99bb8dae272c.webp?v=1714720585"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f0bb23f1ef5258f594624451cd65de35f711ec_db735594-bd28-4d65-a61e-99bb8dae272c.webp?v=1714720585","width":2000},{"alt":null,"id":23877043257443,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a460a887ec89f3814150870caa3cab4fdc2bea8_06b2642e-0c6e-4e55-bfb7-7e60c242cb30.webp?v=1714720588"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a460a887ec89f3814150870caa3cab4fdc2bea8_06b2642e-0c6e-4e55-bfb7-7e60c242cb30.webp?v=1714720588","width":2000},{"alt":null,"id":23877043814499,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4822a031c5e6bba16a9e535adcecb3612ef1e405_e88810d7-efaa-4f8e-b93e-8c058f418b0d.webp?v=1714720590"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4822a031c5e6bba16a9e535adcecb3612ef1e405_e88810d7-efaa-4f8e-b93e-8c058f418b0d.webp?v=1714720590","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41884895838307,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-RL01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472123609187,"product_id":7408385359971,"position":1,"created_at":"2024-05-03T15:16:07+08:00","updated_at":"2024-05-03T15:16:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08ec14b16765e91a15ae4719cc3bef03d995de5b_009b2b33-74bb-4fa0-98d5-fb3f46602a88.webp?v=1714720567","variant_ids":[41884895838307]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday - 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":"NPB0118724-RL01","featured_media":{"alt":null,"id":23877039095907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08ec14b16765e91a15ae4719cc3bef03d995de5b_009b2b33-74bb-4fa0-98d5-fb3f46602a88.webp?v=1714720567"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41884895838307,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-RL01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472123609187,"product_id":7408385359971,"position":1,"created_at":"2024-05-03T15:16:07+08:00","updated_at":"2024-05-03T15:16:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08ec14b16765e91a15ae4719cc3bef03d995de5b_009b2b33-74bb-4fa0-98d5-fb3f46602a88.webp?v=1714720567","variant_ids":[41884895838307]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday - 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":"NPB0118724-RL01","featured_media":{"alt":null,"id":23877039095907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08ec14b16765e91a15ae4719cc3bef03d995de5b_009b2b33-74bb-4fa0-98d5-fb3f46602a88.webp?v=1714720567"}},"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: "停產" }