$product = {"id":7416065982563,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 黑白畫風-蝙蝠俠","handle":"iphone-xs-max-mod-nx-printable-sb12","description":null,"published_at":"2024-06-11T16:51:49+08:00","created_at":"2024-05-06T12:51:47+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","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":41917075062883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31491129770083,"product_id":7416065982563,"position":9,"created_at":"2024-05-06T12:52:08+08:00","updated_at":"2024-05-06T12:52:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d931c1b1f2e4270c18f71c916fc9a25a7310b8_ec7cb610-6b16-4e63-8d47-c8d4aac407cd.webp?v=1714971128","variant_ids":[41917075062883]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 黑白畫風-蝙蝠俠 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-SB12","featured_media":{"alt":null,"id":23896537301091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d931c1b1f2e4270c18f71c916fc9a25a7310b8_ec7cb610-6b16-4e63-8d47-c8d4aac407cd.webp?v=1714971128"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a36e7e0c0543eb2af38ff96a56b600ea725b525c_e107601c-8fc1-4041-8ed9-0ea10a1a3120.webp?v=1714971110","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/721ea0124b3c3b851341920c7e95514a81d9e5ca_11a825fe-4922-41ad-bee3-98ece5a5d5ff.webp?v=1714971112","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20ae74ba2709106a1c19fb983c80d76d1816cfdb_1b27f3c2-f3a4-4e5f-af99-64186a063167.webp?v=1714971114","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bfd6c69993c548a3236f7f688374d41d232cd43_0bd9fcf0-1944-4617-8bcf-618fa7ddfe7a.webp?v=1714971117","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/242cc9fcd867de80cbe19c58d08b662dacad35f1_b1ac848b-99f6-4012-aa56-256cedb71455.webp?v=1714971119","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e2769bd2a7ed620173fc77fc5d4269041c84231_bada6bbf-53ee-4de2-98d2-0b92117156f0.webp?v=1714971121","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d82d5264c4c02ec47d2c45a4fb6bde8ea046cf5_f0c9bc73-19a3-492c-ba14-2fb621db8c51.webp?v=1714971124","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d04f61fe4fc2c790a8986363312e649aa8d12b55_0c22e999-4ae8-460b-8e33-a5420d39f311.webp?v=1714971126","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d931c1b1f2e4270c18f71c916fc9a25a7310b8_ec7cb610-6b16-4e63-8d47-c8d4aac407cd.webp?v=1714971128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e2dfa63e9a3b46b1212646d07028d5aa22d3dc2_8d247773-fc6c-4700-bcd6-cab99861516a.webp?v=1714971131"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a36e7e0c0543eb2af38ff96a56b600ea725b525c_e107601c-8fc1-4041-8ed9-0ea10a1a3120.webp?v=1714971110","options":["color"],"media":[{"alt":null,"id":23896530583651,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a36e7e0c0543eb2af38ff96a56b600ea725b525c_e107601c-8fc1-4041-8ed9-0ea10a1a3120.webp?v=1714971110"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a36e7e0c0543eb2af38ff96a56b600ea725b525c_e107601c-8fc1-4041-8ed9-0ea10a1a3120.webp?v=1714971110","width":2000},{"alt":null,"id":23896531959907,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/721ea0124b3c3b851341920c7e95514a81d9e5ca_11a825fe-4922-41ad-bee3-98ece5a5d5ff.webp?v=1714971112"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/721ea0124b3c3b851341920c7e95514a81d9e5ca_11a825fe-4922-41ad-bee3-98ece5a5d5ff.webp?v=1714971112","width":2000},{"alt":null,"id":23896532516963,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20ae74ba2709106a1c19fb983c80d76d1816cfdb_1b27f3c2-f3a4-4e5f-af99-64186a063167.webp?v=1714971114"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20ae74ba2709106a1c19fb983c80d76d1816cfdb_1b27f3c2-f3a4-4e5f-af99-64186a063167.webp?v=1714971114","width":2000},{"alt":null,"id":23896533008483,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bfd6c69993c548a3236f7f688374d41d232cd43_0bd9fcf0-1944-4617-8bcf-618fa7ddfe7a.webp?v=1714971117"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bfd6c69993c548a3236f7f688374d41d232cd43_0bd9fcf0-1944-4617-8bcf-618fa7ddfe7a.webp?v=1714971117","width":2000},{"alt":null,"id":23896534614115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/242cc9fcd867de80cbe19c58d08b662dacad35f1_b1ac848b-99f6-4012-aa56-256cedb71455.webp?v=1714971119"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/242cc9fcd867de80cbe19c58d08b662dacad35f1_b1ac848b-99f6-4012-aa56-256cedb71455.webp?v=1714971119","width":2000},{"alt":null,"id":23896535367779,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e2769bd2a7ed620173fc77fc5d4269041c84231_bada6bbf-53ee-4de2-98d2-0b92117156f0.webp?v=1714971121"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e2769bd2a7ed620173fc77fc5d4269041c84231_bada6bbf-53ee-4de2-98d2-0b92117156f0.webp?v=1714971121","width":2000},{"alt":null,"id":23896536186979,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d82d5264c4c02ec47d2c45a4fb6bde8ea046cf5_f0c9bc73-19a3-492c-ba14-2fb621db8c51.webp?v=1714971124"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d82d5264c4c02ec47d2c45a4fb6bde8ea046cf5_f0c9bc73-19a3-492c-ba14-2fb621db8c51.webp?v=1714971124","width":2000},{"alt":null,"id":23896536711267,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d04f61fe4fc2c790a8986363312e649aa8d12b55_0c22e999-4ae8-460b-8e33-a5420d39f311.webp?v=1714971126"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d04f61fe4fc2c790a8986363312e649aa8d12b55_0c22e999-4ae8-460b-8e33-a5420d39f311.webp?v=1714971126","width":2000},{"alt":null,"id":23896537301091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d931c1b1f2e4270c18f71c916fc9a25a7310b8_ec7cb610-6b16-4e63-8d47-c8d4aac407cd.webp?v=1714971128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d931c1b1f2e4270c18f71c916fc9a25a7310b8_ec7cb610-6b16-4e63-8d47-c8d4aac407cd.webp?v=1714971128","width":2000},{"alt":null,"id":23896537759843,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e2dfa63e9a3b46b1212646d07028d5aa22d3dc2_8d247773-fc6c-4700-bcd6-cab99861516a.webp?v=1714971131"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e2dfa63e9a3b46b1212646d07028d5aa22d3dc2_8d247773-fc6c-4700-bcd6-cab99861516a.webp?v=1714971131","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41917075062883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31491129770083,"product_id":7416065982563,"position":9,"created_at":"2024-05-06T12:52:08+08:00","updated_at":"2024-05-06T12:52:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d931c1b1f2e4270c18f71c916fc9a25a7310b8_ec7cb610-6b16-4e63-8d47-c8d4aac407cd.webp?v=1714971128","variant_ids":[41917075062883]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 黑白畫風-蝙蝠俠 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-SB12","featured_media":{"alt":null,"id":23896537301091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d931c1b1f2e4270c18f71c916fc9a25a7310b8_ec7cb610-6b16-4e63-8d47-c8d4aac407cd.webp?v=1714971128"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41917075062883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31491129770083,"product_id":7416065982563,"position":9,"created_at":"2024-05-06T12:52:08+08:00","updated_at":"2024-05-06T12:52:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d931c1b1f2e4270c18f71c916fc9a25a7310b8_ec7cb610-6b16-4e63-8d47-c8d4aac407cd.webp?v=1714971128","variant_ids":[41917075062883]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 黑白畫風-蝙蝠俠 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-SB12","featured_media":{"alt":null,"id":23896537301091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d931c1b1f2e4270c18f71c916fc9a25a7310b8_ec7cb610-6b16-4e63-8d47-c8d4aac407cd.webp?v=1714971128"}},"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: "停產" }