$product = {"id":7408415637603,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 波巴費特-線稿風格白","handle":"iphone-12-pro-max-mod-nx-printable-pb52","description":null,"published_at":"2024-06-11T16:36:36+08:00","created_at":"2024-05-03T15:22:11+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41885227057251,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB52","requires_shipping":true,"taxable":true,"featured_image":{"id":31472212115555,"product_id":7408415637603,"position":2,"created_at":"2024-05-03T15:22:15+08:00","updated_at":"2024-05-03T15:22:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f148a9262e1b7263a57c0a40a129428152565445_cff2e7e0-85aa-4a8a-8b36-f9bad52da247.webp?v=1714720935","variant_ids":[41885227057251]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 波巴費特-線稿風格白 - 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":"NPB0118724-PB52","featured_media":{"alt":null,"id":23877127962723,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f148a9262e1b7263a57c0a40a129428152565445_cff2e7e0-85aa-4a8a-8b36-f9bad52da247.webp?v=1714720935"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9b70185823c1edb4299d568e05b7215fd4e071_1d91551b-35e1-4957-aad7-8503b8fe24c6.webp?v=1714720933","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f148a9262e1b7263a57c0a40a129428152565445_cff2e7e0-85aa-4a8a-8b36-f9bad52da247.webp?v=1714720935","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a97b3ec9546baca9155f70fb1b3dfcb686c8b5de_0fa7b625-9840-4e87-9530-1d129a80c850.webp?v=1714720938","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0218757669a4470347ac03b493a17a4e0b860ce7_6891ac90-4574-4724-9852-cc817a9cbdae.webp?v=1714720940","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a8ab36422ccdae08f636e786314acfa340bc6d3_cb670eb3-bddd-4806-8f80-e1d09b321eec.webp?v=1714720942","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4161494e30628abc8aba20f942bec42648419653_67ea5eb2-8bc4-4b53-9af8-17dc8da169f5.webp?v=1714720944","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de8494a605065f15b6dbeb2c4ec80f47e3a8f34f_15de1611-2faf-4678-a1e2-8e906005dcd6.webp?v=1714720947","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fae16383f91badd014607f6724895ee8d270e637_59813130-8a12-45f6-b363-d5a91721104e.webp?v=1714720949","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d692d076287d8ff27e682b03cd16e8d46373a3c2_3c80bed9-8752-41ac-acf0-725e4a4a13c5.webp?v=1714720951","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc781d2fdcae96e6987ffe54812164a2d3036580_2aae6522-19ea-4204-83ec-cdac621a60c7.webp?v=1714720954"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9b70185823c1edb4299d568e05b7215fd4e071_1d91551b-35e1-4957-aad7-8503b8fe24c6.webp?v=1714720933","options":["color"],"media":[{"alt":null,"id":23877127536739,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9b70185823c1edb4299d568e05b7215fd4e071_1d91551b-35e1-4957-aad7-8503b8fe24c6.webp?v=1714720933"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9b70185823c1edb4299d568e05b7215fd4e071_1d91551b-35e1-4957-aad7-8503b8fe24c6.webp?v=1714720933","width":2000},{"alt":null,"id":23877127962723,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f148a9262e1b7263a57c0a40a129428152565445_cff2e7e0-85aa-4a8a-8b36-f9bad52da247.webp?v=1714720935"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f148a9262e1b7263a57c0a40a129428152565445_cff2e7e0-85aa-4a8a-8b36-f9bad52da247.webp?v=1714720935","width":2000},{"alt":null,"id":23877128454243,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a97b3ec9546baca9155f70fb1b3dfcb686c8b5de_0fa7b625-9840-4e87-9530-1d129a80c850.webp?v=1714720938"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a97b3ec9546baca9155f70fb1b3dfcb686c8b5de_0fa7b625-9840-4e87-9530-1d129a80c850.webp?v=1714720938","width":2000},{"alt":null,"id":23877128814691,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0218757669a4470347ac03b493a17a4e0b860ce7_6891ac90-4574-4724-9852-cc817a9cbdae.webp?v=1714720940"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0218757669a4470347ac03b493a17a4e0b860ce7_6891ac90-4574-4724-9852-cc817a9cbdae.webp?v=1714720940","width":2000},{"alt":null,"id":23877129240675,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a8ab36422ccdae08f636e786314acfa340bc6d3_cb670eb3-bddd-4806-8f80-e1d09b321eec.webp?v=1714720942"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a8ab36422ccdae08f636e786314acfa340bc6d3_cb670eb3-bddd-4806-8f80-e1d09b321eec.webp?v=1714720942","width":2000},{"alt":null,"id":23877129666659,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4161494e30628abc8aba20f942bec42648419653_67ea5eb2-8bc4-4b53-9af8-17dc8da169f5.webp?v=1714720944"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4161494e30628abc8aba20f942bec42648419653_67ea5eb2-8bc4-4b53-9af8-17dc8da169f5.webp?v=1714720944","width":2000},{"alt":null,"id":23877130190947,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de8494a605065f15b6dbeb2c4ec80f47e3a8f34f_15de1611-2faf-4678-a1e2-8e906005dcd6.webp?v=1714720947"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de8494a605065f15b6dbeb2c4ec80f47e3a8f34f_15de1611-2faf-4678-a1e2-8e906005dcd6.webp?v=1714720947","width":2000},{"alt":null,"id":23877130584163,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fae16383f91badd014607f6724895ee8d270e637_59813130-8a12-45f6-b363-d5a91721104e.webp?v=1714720949"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fae16383f91badd014607f6724895ee8d270e637_59813130-8a12-45f6-b363-d5a91721104e.webp?v=1714720949","width":2000},{"alt":null,"id":23877131305059,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d692d076287d8ff27e682b03cd16e8d46373a3c2_3c80bed9-8752-41ac-acf0-725e4a4a13c5.webp?v=1714720951"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d692d076287d8ff27e682b03cd16e8d46373a3c2_3c80bed9-8752-41ac-acf0-725e4a4a13c5.webp?v=1714720951","width":2000},{"alt":null,"id":23877131763811,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc781d2fdcae96e6987ffe54812164a2d3036580_2aae6522-19ea-4204-83ec-cdac621a60c7.webp?v=1714720954"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc781d2fdcae96e6987ffe54812164a2d3036580_2aae6522-19ea-4204-83ec-cdac621a60c7.webp?v=1714720954","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885227057251,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB52","requires_shipping":true,"taxable":true,"featured_image":{"id":31472212115555,"product_id":7408415637603,"position":2,"created_at":"2024-05-03T15:22:15+08:00","updated_at":"2024-05-03T15:22:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f148a9262e1b7263a57c0a40a129428152565445_cff2e7e0-85aa-4a8a-8b36-f9bad52da247.webp?v=1714720935","variant_ids":[41885227057251]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 波巴費特-線稿風格白 - 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":"NPB0118724-PB52","featured_media":{"alt":null,"id":23877127962723,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f148a9262e1b7263a57c0a40a129428152565445_cff2e7e0-85aa-4a8a-8b36-f9bad52da247.webp?v=1714720935"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885227057251,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB52","requires_shipping":true,"taxable":true,"featured_image":{"id":31472212115555,"product_id":7408415637603,"position":2,"created_at":"2024-05-03T15:22:15+08:00","updated_at":"2024-05-03T15:22:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f148a9262e1b7263a57c0a40a129428152565445_cff2e7e0-85aa-4a8a-8b36-f9bad52da247.webp?v=1714720935","variant_ids":[41885227057251]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 波巴費特-線稿風格白 - 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":"NPB0118724-PB52","featured_media":{"alt":null,"id":23877127962723,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f148a9262e1b7263a57c0a40a129428152565445_cff2e7e0-85aa-4a8a-8b36-f9bad52da247.webp?v=1714720935"}},"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: "停產" }