$product = {"id":7416341659747,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Twenty One Point Five - 21.5 - Miracles Take Time","handle":"iphone-8-mod-nx-printable-rl02","description":null,"published_at":"2024-06-11T16:56:24+08:00","created_at":"2024-05-06T14:38:04+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 8","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":41918695473251,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-RL02","requires_shipping":true,"taxable":true,"featured_image":{"id":31491890053219,"product_id":7416341659747,"position":3,"created_at":"2024-05-06T14:38:11+08:00","updated_at":"2024-05-06T14:38:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dfe29c7d91d6e3459b31bfa1f865019cd371ea4_19c8f0f5-a7b5-40ed-8082-ec908cfb2085.webp?v=1714977491","variant_ids":[41918695473251]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Twenty One Point Five - 21.5 - Miracles Take Time - 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":"NPB0105424-RL02","featured_media":{"alt":null,"id":23897302892643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dfe29c7d91d6e3459b31bfa1f865019cd371ea4_19c8f0f5-a7b5-40ed-8082-ec908cfb2085.webp?v=1714977491"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a849c9f9c5bd375dacaccecc7c80fd1e05e64e67_f89d4be0-95d7-4b1a-baa5-377d5bd3e4b7.webp?v=1714977486","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e1e11e0692aa3a89650809d44795ade584ffc56_8d76aae6-eb3f-4637-9ecc-148df62b86e4.webp?v=1714977489","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dfe29c7d91d6e3459b31bfa1f865019cd371ea4_19c8f0f5-a7b5-40ed-8082-ec908cfb2085.webp?v=1714977491","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d50fcf0d62f732b9908303dac801eb33d3519a6_66260dcb-7a32-4bde-8bb5-427183fc9a53.webp?v=1714977494","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e942d2d217027e9b121d313a3cf235eb7ddd7213_381e118c-79ce-4079-acf7-3ac4693b3a04.webp?v=1714977496","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94c44f291664896a84e16a1f2ac24be8bf729a55_1de466b7-d502-415f-96c0-fb566cd3233d.webp?v=1714977499","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a398c860b07d832f10dc3226ec9842bcc531c3a7_6867b0f8-594a-4865-aa86-0c8192d244dd.webp?v=1714977509","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88ba69255a5a583aa318f4b733f2927ab1747374_d600008d-83a9-40e2-9da8-2a1f52adb394.webp?v=1714977511","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/038262304a813b2fa8d42b81a333bd68851f749b_cb18238f-552a-49c0-a59b-78b9872c65f3.webp?v=1714977514","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28584fe520b534479bc9f41aeee02c1b5362db51_646f2d52-9ea3-43fe-b14e-6e298e695ae5.webp?v=1714977516"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a849c9f9c5bd375dacaccecc7c80fd1e05e64e67_f89d4be0-95d7-4b1a-baa5-377d5bd3e4b7.webp?v=1714977486","options":["color"],"media":[{"alt":null,"id":23897301942371,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a849c9f9c5bd375dacaccecc7c80fd1e05e64e67_f89d4be0-95d7-4b1a-baa5-377d5bd3e4b7.webp?v=1714977486"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a849c9f9c5bd375dacaccecc7c80fd1e05e64e67_f89d4be0-95d7-4b1a-baa5-377d5bd3e4b7.webp?v=1714977486","width":2000},{"alt":null,"id":23897302499427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e1e11e0692aa3a89650809d44795ade584ffc56_8d76aae6-eb3f-4637-9ecc-148df62b86e4.webp?v=1714977489"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e1e11e0692aa3a89650809d44795ade584ffc56_8d76aae6-eb3f-4637-9ecc-148df62b86e4.webp?v=1714977489","width":2000},{"alt":null,"id":23897302892643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dfe29c7d91d6e3459b31bfa1f865019cd371ea4_19c8f0f5-a7b5-40ed-8082-ec908cfb2085.webp?v=1714977491"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dfe29c7d91d6e3459b31bfa1f865019cd371ea4_19c8f0f5-a7b5-40ed-8082-ec908cfb2085.webp?v=1714977491","width":2000},{"alt":null,"id":23897303351395,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d50fcf0d62f732b9908303dac801eb33d3519a6_66260dcb-7a32-4bde-8bb5-427183fc9a53.webp?v=1714977494"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d50fcf0d62f732b9908303dac801eb33d3519a6_66260dcb-7a32-4bde-8bb5-427183fc9a53.webp?v=1714977494","width":2000},{"alt":null,"id":23897303744611,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e942d2d217027e9b121d313a3cf235eb7ddd7213_381e118c-79ce-4079-acf7-3ac4693b3a04.webp?v=1714977496"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e942d2d217027e9b121d313a3cf235eb7ddd7213_381e118c-79ce-4079-acf7-3ac4693b3a04.webp?v=1714977496","width":2000},{"alt":null,"id":23897304137827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94c44f291664896a84e16a1f2ac24be8bf729a55_1de466b7-d502-415f-96c0-fb566cd3233d.webp?v=1714977499"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94c44f291664896a84e16a1f2ac24be8bf729a55_1de466b7-d502-415f-96c0-fb566cd3233d.webp?v=1714977499","width":2000},{"alt":null,"id":23897305907299,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a398c860b07d832f10dc3226ec9842bcc531c3a7_6867b0f8-594a-4865-aa86-0c8192d244dd.webp?v=1714977509"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a398c860b07d832f10dc3226ec9842bcc531c3a7_6867b0f8-594a-4865-aa86-0c8192d244dd.webp?v=1714977509","width":2000},{"alt":null,"id":23897306464355,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88ba69255a5a583aa318f4b733f2927ab1747374_d600008d-83a9-40e2-9da8-2a1f52adb394.webp?v=1714977511"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88ba69255a5a583aa318f4b733f2927ab1747374_d600008d-83a9-40e2-9da8-2a1f52adb394.webp?v=1714977511","width":2000},{"alt":null,"id":23897306955875,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/038262304a813b2fa8d42b81a333bd68851f749b_cb18238f-552a-49c0-a59b-78b9872c65f3.webp?v=1714977514"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/038262304a813b2fa8d42b81a333bd68851f749b_cb18238f-552a-49c0-a59b-78b9872c65f3.webp?v=1714977514","width":2000},{"alt":null,"id":23897307512931,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28584fe520b534479bc9f41aeee02c1b5362db51_646f2d52-9ea3-43fe-b14e-6e298e695ae5.webp?v=1714977516"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28584fe520b534479bc9f41aeee02c1b5362db51_646f2d52-9ea3-43fe-b14e-6e298e695ae5.webp?v=1714977516","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41918695473251,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-RL02","requires_shipping":true,"taxable":true,"featured_image":{"id":31491890053219,"product_id":7416341659747,"position":3,"created_at":"2024-05-06T14:38:11+08:00","updated_at":"2024-05-06T14:38:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dfe29c7d91d6e3459b31bfa1f865019cd371ea4_19c8f0f5-a7b5-40ed-8082-ec908cfb2085.webp?v=1714977491","variant_ids":[41918695473251]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Twenty One Point Five - 21.5 - Miracles Take Time - 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":"NPB0105424-RL02","featured_media":{"alt":null,"id":23897302892643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dfe29c7d91d6e3459b31bfa1f865019cd371ea4_19c8f0f5-a7b5-40ed-8082-ec908cfb2085.webp?v=1714977491"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918695473251,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-RL02","requires_shipping":true,"taxable":true,"featured_image":{"id":31491890053219,"product_id":7416341659747,"position":3,"created_at":"2024-05-06T14:38:11+08:00","updated_at":"2024-05-06T14:38:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dfe29c7d91d6e3459b31bfa1f865019cd371ea4_19c8f0f5-a7b5-40ed-8082-ec908cfb2085.webp?v=1714977491","variant_ids":[41918695473251]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Twenty One Point Five - 21.5 - Miracles Take Time - 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":"NPB0105424-RL02","featured_media":{"alt":null,"id":23897302892643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dfe29c7d91d6e3459b31bfa1f865019cd371ea4_19c8f0f5-a7b5-40ed-8082-ec908cfb2085.webp?v=1714977491"}},"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: "停產" }