$product = {"id":7415928914019,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceships-漫畫系列","handle":"iphone-xs-max-mod-nx-printable-pb85","description":null,"published_at":"2024-06-11T16:48:10+08:00","created_at":"2024-05-06T12:26:41+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":41915627372643,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB85","requires_shipping":true,"taxable":true,"featured_image":{"id":31490762178659,"product_id":7415928914019,"position":5,"created_at":"2024-05-06T12:26:53+08:00","updated_at":"2024-05-06T12:26:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe51fdcecdf68cdcc536b1a339998fa43fd63791_7892b5b4-ba71-4a71-9163-21fd1effdb19.webp?v=1714969613","variant_ids":[41915627372643]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceships-漫畫系列 - 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-PB85","featured_media":{"alt":null,"id":23896169021539,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe51fdcecdf68cdcc536b1a339998fa43fd63791_7892b5b4-ba71-4a71-9163-21fd1effdb19.webp?v=1714969613"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dec47a18d823581e5b712787e463277f82c2bbf5_ff55e3d6-4eea-492d-b2b1-af561e2ab82f.webp?v=1714969603","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee623f24f0631db8d3eb2483a22c44634d862be_3606acf7-a0cb-45e7-bd92-3a18a0798d54.webp?v=1714969605","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d86cd51eee3704f5ffc038109750ce72ac6f92eb_bbd435e1-c434-40a3-82ea-0c780f3285a4.webp?v=1714969608","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b6d98bc468c0f9a842b9f989d408b52e53af7cc_eeba68e6-842c-44bf-98d5-dc4a14d0b167.webp?v=1714969610","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe51fdcecdf68cdcc536b1a339998fa43fd63791_7892b5b4-ba71-4a71-9163-21fd1effdb19.webp?v=1714969613","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82ce68b1d8f6a812574899392e1cf815c678eeae_9fbabe82-ce5b-4095-b5c0-fdc6f3a0a16c.webp?v=1714969615","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e40b6f4a27b5ce8fcb2cce7954a555035b6048e6_6d73e893-f62e-41a1-8037-0323ad2f7406.webp?v=1714969618","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abd25df7c9ca6cc1dc180e4b64a90a5cfe3f9288_e57f740a-77ca-4551-a93c-82d69770c1b5.webp?v=1714969621","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97e4492cf67f6172565ebbe346db90e4b44953d4_13de4af3-a37e-4a72-8079-1fc8471b704c.webp?v=1714969623","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/420c4799235c0899e0b363c1a8030e13681dc2e0_94434f8d-1a00-4bb2-88ad-814ddf90f207.webp?v=1714969626"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dec47a18d823581e5b712787e463277f82c2bbf5_ff55e3d6-4eea-492d-b2b1-af561e2ab82f.webp?v=1714969603","options":["color"],"media":[{"alt":null,"id":23896165843043,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dec47a18d823581e5b712787e463277f82c2bbf5_ff55e3d6-4eea-492d-b2b1-af561e2ab82f.webp?v=1714969603"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dec47a18d823581e5b712787e463277f82c2bbf5_ff55e3d6-4eea-492d-b2b1-af561e2ab82f.webp?v=1714969603","width":2000},{"alt":null,"id":23896166367331,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee623f24f0631db8d3eb2483a22c44634d862be_3606acf7-a0cb-45e7-bd92-3a18a0798d54.webp?v=1714969605"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee623f24f0631db8d3eb2483a22c44634d862be_3606acf7-a0cb-45e7-bd92-3a18a0798d54.webp?v=1714969605","width":2000},{"alt":null,"id":23896166793315,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d86cd51eee3704f5ffc038109750ce72ac6f92eb_bbd435e1-c434-40a3-82ea-0c780f3285a4.webp?v=1714969608"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d86cd51eee3704f5ffc038109750ce72ac6f92eb_bbd435e1-c434-40a3-82ea-0c780f3285a4.webp?v=1714969608","width":2000},{"alt":null,"id":23896167645283,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b6d98bc468c0f9a842b9f989d408b52e53af7cc_eeba68e6-842c-44bf-98d5-dc4a14d0b167.webp?v=1714969610"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b6d98bc468c0f9a842b9f989d408b52e53af7cc_eeba68e6-842c-44bf-98d5-dc4a14d0b167.webp?v=1714969610","width":2000},{"alt":null,"id":23896169021539,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe51fdcecdf68cdcc536b1a339998fa43fd63791_7892b5b4-ba71-4a71-9163-21fd1effdb19.webp?v=1714969613"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe51fdcecdf68cdcc536b1a339998fa43fd63791_7892b5b4-ba71-4a71-9163-21fd1effdb19.webp?v=1714969613","width":2000},{"alt":null,"id":23896169578595,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82ce68b1d8f6a812574899392e1cf815c678eeae_9fbabe82-ce5b-4095-b5c0-fdc6f3a0a16c.webp?v=1714969615"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82ce68b1d8f6a812574899392e1cf815c678eeae_9fbabe82-ce5b-4095-b5c0-fdc6f3a0a16c.webp?v=1714969615","width":2000},{"alt":null,"id":23896170004579,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e40b6f4a27b5ce8fcb2cce7954a555035b6048e6_6d73e893-f62e-41a1-8037-0323ad2f7406.webp?v=1714969618"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e40b6f4a27b5ce8fcb2cce7954a555035b6048e6_6d73e893-f62e-41a1-8037-0323ad2f7406.webp?v=1714969618","width":2000},{"alt":null,"id":23896171216995,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abd25df7c9ca6cc1dc180e4b64a90a5cfe3f9288_e57f740a-77ca-4551-a93c-82d69770c1b5.webp?v=1714969621"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abd25df7c9ca6cc1dc180e4b64a90a5cfe3f9288_e57f740a-77ca-4551-a93c-82d69770c1b5.webp?v=1714969621","width":2000},{"alt":null,"id":23896171511907,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97e4492cf67f6172565ebbe346db90e4b44953d4_13de4af3-a37e-4a72-8079-1fc8471b704c.webp?v=1714969623"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97e4492cf67f6172565ebbe346db90e4b44953d4_13de4af3-a37e-4a72-8079-1fc8471b704c.webp?v=1714969623","width":2000},{"alt":null,"id":23896171970659,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/420c4799235c0899e0b363c1a8030e13681dc2e0_94434f8d-1a00-4bb2-88ad-814ddf90f207.webp?v=1714969626"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/420c4799235c0899e0b363c1a8030e13681dc2e0_94434f8d-1a00-4bb2-88ad-814ddf90f207.webp?v=1714969626","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41915627372643,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB85","requires_shipping":true,"taxable":true,"featured_image":{"id":31490762178659,"product_id":7415928914019,"position":5,"created_at":"2024-05-06T12:26:53+08:00","updated_at":"2024-05-06T12:26:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe51fdcecdf68cdcc536b1a339998fa43fd63791_7892b5b4-ba71-4a71-9163-21fd1effdb19.webp?v=1714969613","variant_ids":[41915627372643]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceships-漫畫系列 - 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-PB85","featured_media":{"alt":null,"id":23896169021539,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe51fdcecdf68cdcc536b1a339998fa43fd63791_7892b5b4-ba71-4a71-9163-21fd1effdb19.webp?v=1714969613"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915627372643,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB85","requires_shipping":true,"taxable":true,"featured_image":{"id":31490762178659,"product_id":7415928914019,"position":5,"created_at":"2024-05-06T12:26:53+08:00","updated_at":"2024-05-06T12:26:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe51fdcecdf68cdcc536b1a339998fa43fd63791_7892b5b4-ba71-4a71-9163-21fd1effdb19.webp?v=1714969613","variant_ids":[41915627372643]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceships-漫畫系列 - 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-PB85","featured_media":{"alt":null,"id":23896169021539,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe51fdcecdf68cdcc536b1a339998fa43fd63791_7892b5b4-ba71-4a71-9163-21fd1effdb19.webp?v=1714969613"}},"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: "停產" }