$product = {"id":7415897784419,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 原力咒語-光劍系列","handle":"iphone-xs-max-mod-nx-printable-pb72","description":null,"published_at":"2024-06-11T16:47:22+08:00","created_at":"2024-05-06T12:20:52+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 XS 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":41915318501475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB72","requires_shipping":true,"taxable":true,"featured_image":{"id":31490684944483,"product_id":7415897784419,"position":3,"created_at":"2024-05-06T12:20:59+08:00","updated_at":"2024-05-06T12:20:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c96340decd01278ac9ed2bef43f9815410df319_7f9ade17-3a91-420e-80b1-40062d8e9620.webp?v=1714969259","variant_ids":[41915318501475]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-PB72","featured_media":{"alt":null,"id":23896091656291,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c96340decd01278ac9ed2bef43f9815410df319_7f9ade17-3a91-420e-80b1-40062d8e9620.webp?v=1714969259"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4773b6d6d85572036b74f9fdfe37e36ac9e5dd4_1573ae79-13fd-4e28-98eb-fcd701cdda82.webp?v=1714969254","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/627e138f913ac9418f42151da693d676019d45d0_cd9b4472-e99d-4c58-8598-5f0180a14b33.webp?v=1714969257","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c96340decd01278ac9ed2bef43f9815410df319_7f9ade17-3a91-420e-80b1-40062d8e9620.webp?v=1714969259","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01cf00cbe9aa9e7e7a742cf213b3eac754264d70_d7cef68b-871f-4c40-bfc4-769799df32b7.webp?v=1714969262","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e358601ee31d13357ce34fe9fb378dc3154c27c_45c3296b-969f-4aa4-8fe1-3d705105e3fd.webp?v=1714969265","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb3252d3ed5a16a1bb0719ed8c79ab91c1e3d0ee_ff029a9f-cc23-4f81-b25d-6a04f7175828.webp?v=1714969267","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f5f34452a4b555caa200e239af5c384b6afb3d2_89ddfcb0-6167-470d-8a8c-d432503ab2f4.webp?v=1714969269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67160cf1fbe2ed12317fa95d9a85d247cfca3f03_b860d8d4-42a1-4c97-ab17-55bbef665049.webp?v=1714969271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77b1e75200710b8e76bf529e0d0ed2677004088d_dcf6bac3-b3eb-4ef2-8625-9b9cc3eeecb4.webp?v=1714969273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e47b4ca74960b4fa3136030c61dc170ee17d7acc_7c4e0155-e6da-4ccf-a266-3c6883907549.webp?v=1714969276"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4773b6d6d85572036b74f9fdfe37e36ac9e5dd4_1573ae79-13fd-4e28-98eb-fcd701cdda82.webp?v=1714969254","options":["color"],"media":[{"alt":null,"id":23896090968163,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4773b6d6d85572036b74f9fdfe37e36ac9e5dd4_1573ae79-13fd-4e28-98eb-fcd701cdda82.webp?v=1714969254"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4773b6d6d85572036b74f9fdfe37e36ac9e5dd4_1573ae79-13fd-4e28-98eb-fcd701cdda82.webp?v=1714969254","width":2000},{"alt":null,"id":23896091328611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/627e138f913ac9418f42151da693d676019d45d0_cd9b4472-e99d-4c58-8598-5f0180a14b33.webp?v=1714969257"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/627e138f913ac9418f42151da693d676019d45d0_cd9b4472-e99d-4c58-8598-5f0180a14b33.webp?v=1714969257","width":2000},{"alt":null,"id":23896091656291,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c96340decd01278ac9ed2bef43f9815410df319_7f9ade17-3a91-420e-80b1-40062d8e9620.webp?v=1714969259"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c96340decd01278ac9ed2bef43f9815410df319_7f9ade17-3a91-420e-80b1-40062d8e9620.webp?v=1714969259","width":2000},{"alt":null,"id":23896092115043,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01cf00cbe9aa9e7e7a742cf213b3eac754264d70_d7cef68b-871f-4c40-bfc4-769799df32b7.webp?v=1714969262"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01cf00cbe9aa9e7e7a742cf213b3eac754264d70_d7cef68b-871f-4c40-bfc4-769799df32b7.webp?v=1714969262","width":2000},{"alt":null,"id":23896092672099,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e358601ee31d13357ce34fe9fb378dc3154c27c_45c3296b-969f-4aa4-8fe1-3d705105e3fd.webp?v=1714969265"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e358601ee31d13357ce34fe9fb378dc3154c27c_45c3296b-969f-4aa4-8fe1-3d705105e3fd.webp?v=1714969265","width":2000},{"alt":null,"id":23896093163619,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb3252d3ed5a16a1bb0719ed8c79ab91c1e3d0ee_ff029a9f-cc23-4f81-b25d-6a04f7175828.webp?v=1714969267"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb3252d3ed5a16a1bb0719ed8c79ab91c1e3d0ee_ff029a9f-cc23-4f81-b25d-6a04f7175828.webp?v=1714969267","width":2000},{"alt":null,"id":23896093524067,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f5f34452a4b555caa200e239af5c384b6afb3d2_89ddfcb0-6167-470d-8a8c-d432503ab2f4.webp?v=1714969269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f5f34452a4b555caa200e239af5c384b6afb3d2_89ddfcb0-6167-470d-8a8c-d432503ab2f4.webp?v=1714969269","width":2000},{"alt":null,"id":23896093950051,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67160cf1fbe2ed12317fa95d9a85d247cfca3f03_b860d8d4-42a1-4c97-ab17-55bbef665049.webp?v=1714969271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67160cf1fbe2ed12317fa95d9a85d247cfca3f03_b860d8d4-42a1-4c97-ab17-55bbef665049.webp?v=1714969271","width":2000},{"alt":null,"id":23896094408803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77b1e75200710b8e76bf529e0d0ed2677004088d_dcf6bac3-b3eb-4ef2-8625-9b9cc3eeecb4.webp?v=1714969273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77b1e75200710b8e76bf529e0d0ed2677004088d_dcf6bac3-b3eb-4ef2-8625-9b9cc3eeecb4.webp?v=1714969273","width":2000},{"alt":null,"id":23896094736483,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e47b4ca74960b4fa3136030c61dc170ee17d7acc_7c4e0155-e6da-4ccf-a266-3c6883907549.webp?v=1714969276"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e47b4ca74960b4fa3136030c61dc170ee17d7acc_7c4e0155-e6da-4ccf-a266-3c6883907549.webp?v=1714969276","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41915318501475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB72","requires_shipping":true,"taxable":true,"featured_image":{"id":31490684944483,"product_id":7415897784419,"position":3,"created_at":"2024-05-06T12:20:59+08:00","updated_at":"2024-05-06T12:20:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c96340decd01278ac9ed2bef43f9815410df319_7f9ade17-3a91-420e-80b1-40062d8e9620.webp?v=1714969259","variant_ids":[41915318501475]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-PB72","featured_media":{"alt":null,"id":23896091656291,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c96340decd01278ac9ed2bef43f9815410df319_7f9ade17-3a91-420e-80b1-40062d8e9620.webp?v=1714969259"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915318501475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB72","requires_shipping":true,"taxable":true,"featured_image":{"id":31490684944483,"product_id":7415897784419,"position":3,"created_at":"2024-05-06T12:20:59+08:00","updated_at":"2024-05-06T12:20:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c96340decd01278ac9ed2bef43f9815410df319_7f9ade17-3a91-420e-80b1-40062d8e9620.webp?v=1714969259","variant_ids":[41915318501475]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-PB72","featured_media":{"alt":null,"id":23896091656291,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c96340decd01278ac9ed2bef43f9815410df319_7f9ade17-3a91-420e-80b1-40062d8e9620.webp?v=1714969259"}},"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: "停產" }