$product = {"id":7415026253923,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 波巴費特-日文字系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb65","description":null,"published_at":"2024-06-11T17:55:59+08:00","created_at":"2024-05-05T20:08:56+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":41911077830755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB65","requires_shipping":true,"taxable":true,"featured_image":{"id":31487963463779,"product_id":7415026253923,"position":7,"created_at":"2024-05-05T20:09:12+08:00","updated_at":"2024-05-05T20:09:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/886692916ce909506760a156d6f4ea433923756d_662f9e1f-c14c-4430-b66e-f7ded57701eb.webp?v=1714910952","variant_ids":[41911077830755]},"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-PB65","featured_media":{"alt":null,"id":23893307687011,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/886692916ce909506760a156d6f4ea433923756d_662f9e1f-c14c-4430-b66e-f7ded57701eb.webp?v=1714910952"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07169abadadd96b829d63197c42327cbfd35c8a9_6907936d-9661-4f1f-94cd-f5acd773f8e9.webp?v=1714910938","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf2b69ec29cfa5a964e3e4b16172dd1c3da33ecc_4e33ac67-964f-40c9-8a71-e6f703ee27b7.webp?v=1714910941","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3af11967f24df0605350238d2347cf5596b1ddba_e776951c-8a52-4294-9c81-3e580c49b43c.webp?v=1714910943","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f90d7bbb5c723a968f5186687920e331208774fc_9182e0f9-d6f5-468b-a837-0bf5ada1a485.webp?v=1714910945","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90bda81fced03ca2c7cab88986043aa843e432b7_d27c86ab-1f36-41ee-bcca-b4bdd7bf38d2.webp?v=1714910947","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1646eea74b99a086f96216ec877994c1440ebf39_bcd42d94-e15e-484f-bc0c-03e94e032e0b.webp?v=1714910950","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/886692916ce909506760a156d6f4ea433923756d_662f9e1f-c14c-4430-b66e-f7ded57701eb.webp?v=1714910952","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4c581d62b1453b824c73257626b04a626474232_44431abd-634e-4d0c-b980-339e7a2a39ea.webp?v=1714910954","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1cd3391c4c03b5cbd247a428eb131b097e3d84a_0b913d4f-5f95-4da2-a9f9-4a5c903518d9.webp?v=1714910957","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4a8ff51f827454327d78900907be1920410a11d_683e14aa-3ed7-4bbc-9808-a5c101f07a71.webp?v=1714910959","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acdb969a22cd769c6dbd0d0dd7aeb5b6a092c48f_339a5911-99fa-42db-8b99-a5c298767c89.webp?v=1714910961"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07169abadadd96b829d63197c42327cbfd35c8a9_6907936d-9661-4f1f-94cd-f5acd773f8e9.webp?v=1714910938","options":["color"],"media":[{"alt":null,"id":23893304082531,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07169abadadd96b829d63197c42327cbfd35c8a9_6907936d-9661-4f1f-94cd-f5acd773f8e9.webp?v=1714910938"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07169abadadd96b829d63197c42327cbfd35c8a9_6907936d-9661-4f1f-94cd-f5acd773f8e9.webp?v=1714910938","width":2000},{"alt":null,"id":23893305262179,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf2b69ec29cfa5a964e3e4b16172dd1c3da33ecc_4e33ac67-964f-40c9-8a71-e6f703ee27b7.webp?v=1714910941"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf2b69ec29cfa5a964e3e4b16172dd1c3da33ecc_4e33ac67-964f-40c9-8a71-e6f703ee27b7.webp?v=1714910941","width":2000},{"alt":null,"id":23893305622627,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3af11967f24df0605350238d2347cf5596b1ddba_e776951c-8a52-4294-9c81-3e580c49b43c.webp?v=1714910943"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3af11967f24df0605350238d2347cf5596b1ddba_e776951c-8a52-4294-9c81-3e580c49b43c.webp?v=1714910943","width":2000},{"alt":null,"id":23893306114147,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f90d7bbb5c723a968f5186687920e331208774fc_9182e0f9-d6f5-468b-a837-0bf5ada1a485.webp?v=1714910945"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f90d7bbb5c723a968f5186687920e331208774fc_9182e0f9-d6f5-468b-a837-0bf5ada1a485.webp?v=1714910945","width":2000},{"alt":null,"id":23893306605667,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90bda81fced03ca2c7cab88986043aa843e432b7_d27c86ab-1f36-41ee-bcca-b4bdd7bf38d2.webp?v=1714910947"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90bda81fced03ca2c7cab88986043aa843e432b7_d27c86ab-1f36-41ee-bcca-b4bdd7bf38d2.webp?v=1714910947","width":2000},{"alt":null,"id":23893307031651,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1646eea74b99a086f96216ec877994c1440ebf39_bcd42d94-e15e-484f-bc0c-03e94e032e0b.webp?v=1714910950"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1646eea74b99a086f96216ec877994c1440ebf39_bcd42d94-e15e-484f-bc0c-03e94e032e0b.webp?v=1714910950","width":2000},{"alt":null,"id":23893307687011,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/886692916ce909506760a156d6f4ea433923756d_662f9e1f-c14c-4430-b66e-f7ded57701eb.webp?v=1714910952"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/886692916ce909506760a156d6f4ea433923756d_662f9e1f-c14c-4430-b66e-f7ded57701eb.webp?v=1714910952","width":2000},{"alt":null,"id":23893308112995,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4c581d62b1453b824c73257626b04a626474232_44431abd-634e-4d0c-b980-339e7a2a39ea.webp?v=1714910954"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4c581d62b1453b824c73257626b04a626474232_44431abd-634e-4d0c-b980-339e7a2a39ea.webp?v=1714910954","width":2000},{"alt":null,"id":23893308473443,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1cd3391c4c03b5cbd247a428eb131b097e3d84a_0b913d4f-5f95-4da2-a9f9-4a5c903518d9.webp?v=1714910957"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1cd3391c4c03b5cbd247a428eb131b097e3d84a_0b913d4f-5f95-4da2-a9f9-4a5c903518d9.webp?v=1714910957","width":2000},{"alt":null,"id":23893308899427,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4a8ff51f827454327d78900907be1920410a11d_683e14aa-3ed7-4bbc-9808-a5c101f07a71.webp?v=1714910959"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4a8ff51f827454327d78900907be1920410a11d_683e14aa-3ed7-4bbc-9808-a5c101f07a71.webp?v=1714910959","width":2000},{"alt":null,"id":23893309685859,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acdb969a22cd769c6dbd0d0dd7aeb5b6a092c48f_339a5911-99fa-42db-8b99-a5c298767c89.webp?v=1714910961"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acdb969a22cd769c6dbd0d0dd7aeb5b6a092c48f_339a5911-99fa-42db-8b99-a5c298767c89.webp?v=1714910961","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41911077830755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB65","requires_shipping":true,"taxable":true,"featured_image":{"id":31487963463779,"product_id":7415026253923,"position":7,"created_at":"2024-05-05T20:09:12+08:00","updated_at":"2024-05-05T20:09:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/886692916ce909506760a156d6f4ea433923756d_662f9e1f-c14c-4430-b66e-f7ded57701eb.webp?v=1714910952","variant_ids":[41911077830755]},"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-PB65","featured_media":{"alt":null,"id":23893307687011,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/886692916ce909506760a156d6f4ea433923756d_662f9e1f-c14c-4430-b66e-f7ded57701eb.webp?v=1714910952"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911077830755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB65","requires_shipping":true,"taxable":true,"featured_image":{"id":31487963463779,"product_id":7415026253923,"position":7,"created_at":"2024-05-05T20:09:12+08:00","updated_at":"2024-05-05T20:09:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/886692916ce909506760a156d6f4ea433923756d_662f9e1f-c14c-4430-b66e-f7ded57701eb.webp?v=1714910952","variant_ids":[41911077830755]},"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-PB65","featured_media":{"alt":null,"id":23893307687011,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/886692916ce909506760a156d6f4ea433923756d_662f9e1f-c14c-4430-b66e-f7ded57701eb.webp?v=1714910952"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }