$product = {"id":7414946758755,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-黑白條紋","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb20","description":null,"published_at":"2024-06-11T17:53:49+08:00","created_at":"2024-05-05T19:53:53+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41910227566691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31487753355363,"product_id":7414946758755,"position":9,"created_at":"2024-05-05T19:54:14+08:00","updated_at":"2024-05-05T19:54:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdb23e72bde878fd9b59b95c932179b10ad4aa10_c7c0cd83-1021-4397-b8c0-21d0f1ae9b93.webp?v=1714910054","variant_ids":[41910227566691]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-黑白條紋 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB20","featured_media":{"alt":null,"id":23893097218147,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdb23e72bde878fd9b59b95c932179b10ad4aa10_c7c0cd83-1021-4397-b8c0-21d0f1ae9b93.webp?v=1714910054"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d1cac9d7fc2b3b7a281da0c1353aa28cc0bf1e0_d720e751-cecc-4c31-af78-0e6ace4a13cb.webp?v=1714910035","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e23a7277d0c234c1eeee4d7e4b169e966351320_5ecd47c1-788f-4947-a846-d46607a9fde5.webp?v=1714910038","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6693a6a46f706fb09b41835e48c7a74bf0053c88_d294ace3-7267-4bed-8510-cd60179240eb.webp?v=1714910040","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86cea432b9eb99c62edc6f75db2ab2d1ee5d0040_277822fe-b11b-42b2-878c-7968dc2a5939.webp?v=1714910042","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/911392c2de2b4f92339b20115ae9e0caefacadc5_9b359027-5cc3-47be-a625-e87a3cfd3b09.webp?v=1714910045","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b244b717885d22cea4fb06e957622a2d3bde4ef7_abe39b30-91b3-4427-b957-1b281613db35.webp?v=1714910047","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7067efefb47df74e17f63cee79a9a4a1239045f2_f2730b80-cb77-4b27-9c06-86d95b62f190.webp?v=1714910050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee975b14474e5a9890af604137dcd62fc6d3b082_7a134731-9cd2-4fa8-9631-b6e657dac28b.webp?v=1714910052","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdb23e72bde878fd9b59b95c932179b10ad4aa10_c7c0cd83-1021-4397-b8c0-21d0f1ae9b93.webp?v=1714910054","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/037f4f4ddbb77a294d857a464e7c5bbed0adaec8_9b0f2954-aa98-436c-bf40-5fb74c61cc43.webp?v=1714910056","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12c27836d322c114eacb5dc2ebdc2c745741a7fd_15f16811-2784-44da-a32a-2c66fb5caff6.webp?v=1714910059"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d1cac9d7fc2b3b7a281da0c1353aa28cc0bf1e0_d720e751-cecc-4c31-af78-0e6ace4a13cb.webp?v=1714910035","options":["color"],"media":[{"alt":null,"id":23893092728931,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d1cac9d7fc2b3b7a281da0c1353aa28cc0bf1e0_d720e751-cecc-4c31-af78-0e6ace4a13cb.webp?v=1714910035"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d1cac9d7fc2b3b7a281da0c1353aa28cc0bf1e0_d720e751-cecc-4c31-af78-0e6ace4a13cb.webp?v=1714910035","width":2000},{"alt":null,"id":23893093285987,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e23a7277d0c234c1eeee4d7e4b169e966351320_5ecd47c1-788f-4947-a846-d46607a9fde5.webp?v=1714910038"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e23a7277d0c234c1eeee4d7e4b169e966351320_5ecd47c1-788f-4947-a846-d46607a9fde5.webp?v=1714910038","width":2000},{"alt":null,"id":23893093974115,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6693a6a46f706fb09b41835e48c7a74bf0053c88_d294ace3-7267-4bed-8510-cd60179240eb.webp?v=1714910040"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6693a6a46f706fb09b41835e48c7a74bf0053c88_d294ace3-7267-4bed-8510-cd60179240eb.webp?v=1714910040","width":2000},{"alt":null,"id":23893094400099,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86cea432b9eb99c62edc6f75db2ab2d1ee5d0040_277822fe-b11b-42b2-878c-7968dc2a5939.webp?v=1714910042"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86cea432b9eb99c62edc6f75db2ab2d1ee5d0040_277822fe-b11b-42b2-878c-7968dc2a5939.webp?v=1714910042","width":2000},{"alt":null,"id":23893095120995,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/911392c2de2b4f92339b20115ae9e0caefacadc5_9b359027-5cc3-47be-a625-e87a3cfd3b09.webp?v=1714910045"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/911392c2de2b4f92339b20115ae9e0caefacadc5_9b359027-5cc3-47be-a625-e87a3cfd3b09.webp?v=1714910045","width":2000},{"alt":null,"id":23893095678051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b244b717885d22cea4fb06e957622a2d3bde4ef7_abe39b30-91b3-4427-b957-1b281613db35.webp?v=1714910047"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b244b717885d22cea4fb06e957622a2d3bde4ef7_abe39b30-91b3-4427-b957-1b281613db35.webp?v=1714910047","width":2000},{"alt":null,"id":23893096333411,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7067efefb47df74e17f63cee79a9a4a1239045f2_f2730b80-cb77-4b27-9c06-86d95b62f190.webp?v=1714910050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7067efefb47df74e17f63cee79a9a4a1239045f2_f2730b80-cb77-4b27-9c06-86d95b62f190.webp?v=1714910050","width":2000},{"alt":null,"id":23893096890467,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee975b14474e5a9890af604137dcd62fc6d3b082_7a134731-9cd2-4fa8-9631-b6e657dac28b.webp?v=1714910052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee975b14474e5a9890af604137dcd62fc6d3b082_7a134731-9cd2-4fa8-9631-b6e657dac28b.webp?v=1714910052","width":2000},{"alt":null,"id":23893097218147,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdb23e72bde878fd9b59b95c932179b10ad4aa10_c7c0cd83-1021-4397-b8c0-21d0f1ae9b93.webp?v=1714910054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdb23e72bde878fd9b59b95c932179b10ad4aa10_c7c0cd83-1021-4397-b8c0-21d0f1ae9b93.webp?v=1714910054","width":2000},{"alt":null,"id":23893097906275,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/037f4f4ddbb77a294d857a464e7c5bbed0adaec8_9b0f2954-aa98-436c-bf40-5fb74c61cc43.webp?v=1714910056"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/037f4f4ddbb77a294d857a464e7c5bbed0adaec8_9b0f2954-aa98-436c-bf40-5fb74c61cc43.webp?v=1714910056","width":2000},{"alt":null,"id":23893098266723,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12c27836d322c114eacb5dc2ebdc2c745741a7fd_15f16811-2784-44da-a32a-2c66fb5caff6.webp?v=1714910059"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12c27836d322c114eacb5dc2ebdc2c745741a7fd_15f16811-2784-44da-a32a-2c66fb5caff6.webp?v=1714910059","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910227566691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31487753355363,"product_id":7414946758755,"position":9,"created_at":"2024-05-05T19:54:14+08:00","updated_at":"2024-05-05T19:54:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdb23e72bde878fd9b59b95c932179b10ad4aa10_c7c0cd83-1021-4397-b8c0-21d0f1ae9b93.webp?v=1714910054","variant_ids":[41910227566691]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-黑白條紋 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB20","featured_media":{"alt":null,"id":23893097218147,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdb23e72bde878fd9b59b95c932179b10ad4aa10_c7c0cd83-1021-4397-b8c0-21d0f1ae9b93.webp?v=1714910054"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910227566691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31487753355363,"product_id":7414946758755,"position":9,"created_at":"2024-05-05T19:54:14+08:00","updated_at":"2024-05-05T19:54:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdb23e72bde878fd9b59b95c932179b10ad4aa10_c7c0cd83-1021-4397-b8c0-21d0f1ae9b93.webp?v=1714910054","variant_ids":[41910227566691]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-黑白條紋 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB20","featured_media":{"alt":null,"id":23893097218147,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdb23e72bde878fd9b59b95c932179b10ad4aa10_c7c0cd83-1021-4397-b8c0-21d0f1ae9b93.webp?v=1714910054"}},"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: "停產" }