$product = {"id":7414981001315,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 戰機-日文字系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb63","description":null,"published_at":"2024-06-11T17:54:45+08:00","created_at":"2024-05-05T20:00:11+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":41910593880163,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB63","requires_shipping":true,"taxable":true,"featured_image":{"id":31487842123875,"product_id":7414981001315,"position":9,"created_at":"2024-05-05T20:00:34+08:00","updated_at":"2024-05-05T20:00:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c56d27a922c903c80e72075b5cb10573d500c8_fe376cf9-263a-4e9b-bdd8-6e9189ff27fe.webp?v=1714910434","variant_ids":[41910593880163]},"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-PB63","featured_media":{"alt":null,"id":23893186150499,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c56d27a922c903c80e72075b5cb10573d500c8_fe376cf9-263a-4e9b-bdd8-6e9189ff27fe.webp?v=1714910434"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45f07b2933e3cb059e52bbb5d11d143804d11403_6e7b6712-25b6-4d29-aeaa-13610547ad58.webp?v=1714910414","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c25ad2c3fdaa560ba2ae12cedc60d9252c8be08e_dce86b4f-225f-4697-a3c8-f2d80ee21696.webp?v=1714910416","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36fb81bd47dc383bf49fcc2a080baf236475815c_f1f7f57c-5241-40b5-ad86-82b719b78fea.webp?v=1714910419","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12fd274977dd731a803ea112ae91573a1a249e9a_0cdda7cc-946c-4182-a153-fdb2a127ecc9.webp?v=1714910421","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e2fd271c017fd6db5de83e957d65816fb63c1f1_5ea1c191-2f8b-4c46-a0d7-f01991eb9a23.webp?v=1714910424","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63e7a97069bb812ca622b17fe8c9fb96f3a9b229_2416edeb-1c0c-4e78-bf27-b595a4d72335.webp?v=1714910426","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b189b1f5f73ce7aa85197710bc2e369b7fab41ec_12150871-b965-4410-87ec-aec0027530b9.webp?v=1714910429","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53e9e38c7fa19ac6d30c12748938eb1512ad8193_1c8fe87f-6e48-4c16-94fa-da9b10bbafba.webp?v=1714910431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c56d27a922c903c80e72075b5cb10573d500c8_fe376cf9-263a-4e9b-bdd8-6e9189ff27fe.webp?v=1714910434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe37584a328fc046469f97e9ebd028c8ae0b4747_99dae314-913d-46a9-84b6-a35e0673a13f.webp?v=1714910436","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2828afc08b63605756cfbfd04467ce5e0b9e5f40_f440a088-cfc4-4072-ba20-b7ee9db89d62.webp?v=1714910438"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45f07b2933e3cb059e52bbb5d11d143804d11403_6e7b6712-25b6-4d29-aeaa-13610547ad58.webp?v=1714910414","options":["color"],"media":[{"alt":null,"id":23893181268067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45f07b2933e3cb059e52bbb5d11d143804d11403_6e7b6712-25b6-4d29-aeaa-13610547ad58.webp?v=1714910414"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45f07b2933e3cb059e52bbb5d11d143804d11403_6e7b6712-25b6-4d29-aeaa-13610547ad58.webp?v=1714910414","width":2000},{"alt":null,"id":23893181956195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c25ad2c3fdaa560ba2ae12cedc60d9252c8be08e_dce86b4f-225f-4697-a3c8-f2d80ee21696.webp?v=1714910416"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c25ad2c3fdaa560ba2ae12cedc60d9252c8be08e_dce86b4f-225f-4697-a3c8-f2d80ee21696.webp?v=1714910416","width":2000},{"alt":null,"id":23893182382179,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36fb81bd47dc383bf49fcc2a080baf236475815c_f1f7f57c-5241-40b5-ad86-82b719b78fea.webp?v=1714910419"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36fb81bd47dc383bf49fcc2a080baf236475815c_f1f7f57c-5241-40b5-ad86-82b719b78fea.webp?v=1714910419","width":2000},{"alt":null,"id":23893182906467,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12fd274977dd731a803ea112ae91573a1a249e9a_0cdda7cc-946c-4182-a153-fdb2a127ecc9.webp?v=1714910421"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12fd274977dd731a803ea112ae91573a1a249e9a_0cdda7cc-946c-4182-a153-fdb2a127ecc9.webp?v=1714910421","width":2000},{"alt":null,"id":23893183660131,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e2fd271c017fd6db5de83e957d65816fb63c1f1_5ea1c191-2f8b-4c46-a0d7-f01991eb9a23.webp?v=1714910424"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e2fd271c017fd6db5de83e957d65816fb63c1f1_5ea1c191-2f8b-4c46-a0d7-f01991eb9a23.webp?v=1714910424","width":2000},{"alt":null,"id":23893184020579,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63e7a97069bb812ca622b17fe8c9fb96f3a9b229_2416edeb-1c0c-4e78-bf27-b595a4d72335.webp?v=1714910426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63e7a97069bb812ca622b17fe8c9fb96f3a9b229_2416edeb-1c0c-4e78-bf27-b595a4d72335.webp?v=1714910426","width":2000},{"alt":null,"id":23893184872547,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b189b1f5f73ce7aa85197710bc2e369b7fab41ec_12150871-b965-4410-87ec-aec0027530b9.webp?v=1714910429"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b189b1f5f73ce7aa85197710bc2e369b7fab41ec_12150871-b965-4410-87ec-aec0027530b9.webp?v=1714910429","width":2000},{"alt":null,"id":23893185495139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53e9e38c7fa19ac6d30c12748938eb1512ad8193_1c8fe87f-6e48-4c16-94fa-da9b10bbafba.webp?v=1714910431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53e9e38c7fa19ac6d30c12748938eb1512ad8193_1c8fe87f-6e48-4c16-94fa-da9b10bbafba.webp?v=1714910431","width":2000},{"alt":null,"id":23893186150499,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c56d27a922c903c80e72075b5cb10573d500c8_fe376cf9-263a-4e9b-bdd8-6e9189ff27fe.webp?v=1714910434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c56d27a922c903c80e72075b5cb10573d500c8_fe376cf9-263a-4e9b-bdd8-6e9189ff27fe.webp?v=1714910434","width":2000},{"alt":null,"id":23893186642019,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe37584a328fc046469f97e9ebd028c8ae0b4747_99dae314-913d-46a9-84b6-a35e0673a13f.webp?v=1714910436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe37584a328fc046469f97e9ebd028c8ae0b4747_99dae314-913d-46a9-84b6-a35e0673a13f.webp?v=1714910436","width":2000},{"alt":null,"id":23893187166307,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2828afc08b63605756cfbfd04467ce5e0b9e5f40_f440a088-cfc4-4072-ba20-b7ee9db89d62.webp?v=1714910438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2828afc08b63605756cfbfd04467ce5e0b9e5f40_f440a088-cfc4-4072-ba20-b7ee9db89d62.webp?v=1714910438","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910593880163,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB63","requires_shipping":true,"taxable":true,"featured_image":{"id":31487842123875,"product_id":7414981001315,"position":9,"created_at":"2024-05-05T20:00:34+08:00","updated_at":"2024-05-05T20:00:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c56d27a922c903c80e72075b5cb10573d500c8_fe376cf9-263a-4e9b-bdd8-6e9189ff27fe.webp?v=1714910434","variant_ids":[41910593880163]},"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-PB63","featured_media":{"alt":null,"id":23893186150499,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c56d27a922c903c80e72075b5cb10573d500c8_fe376cf9-263a-4e9b-bdd8-6e9189ff27fe.webp?v=1714910434"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910593880163,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB63","requires_shipping":true,"taxable":true,"featured_image":{"id":31487842123875,"product_id":7414981001315,"position":9,"created_at":"2024-05-05T20:00:34+08:00","updated_at":"2024-05-05T20:00:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c56d27a922c903c80e72075b5cb10573d500c8_fe376cf9-263a-4e9b-bdd8-6e9189ff27fe.webp?v=1714910434","variant_ids":[41910593880163]},"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-PB63","featured_media":{"alt":null,"id":23893186150499,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c56d27a922c903c80e72075b5cb10573d500c8_fe376cf9-263a-4e9b-bdd8-6e9189ff27fe.webp?v=1714910434"}},"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: "停產" }