$product = {"id":7416335597667,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍","handle":"iphone-8-mod-nx-printable-pb32","description":null,"published_at":"2024-06-11T16:56:13+08:00","created_at":"2024-05-06T14:36:50+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 8","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":41918621220963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31491875700835,"product_id":7416335597667,"position":8,"created_at":"2024-05-06T14:37:11+08:00","updated_at":"2024-05-06T14:37:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43bf353c814df9f9f533da4b2350b989d26c2924_c33ac5aa-6b05-4c2b-bd09-c4d445e75919.webp?v=1714977431","variant_ids":[41918621220963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍 - 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":"NPB0105424-PB32","featured_media":{"alt":null,"id":23897288573027,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43bf353c814df9f9f533da4b2350b989d26c2924_c33ac5aa-6b05-4c2b-bd09-c4d445e75919.webp?v=1714977431"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a88f72e0dcb7a915e871615afdafb49493d4f756_327a7bb4-cc95-4ef3-a8d7-2ea38e9bdfb3.webp?v=1714977413","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6e4311809ab1eb0a66d124b078d9e74ee8f1af1_12b7b382-4f92-4ac3-8d99-99083baff38c.webp?v=1714977416","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd3ee7ccfffdbf105f48656ce8f7356f7772fbf0_7ec2f756-7c28-42e2-a707-b8de7dc73af0.webp?v=1714977418","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7568eca9b35d9aef23ad9da38fc2561cd5605414_06f59cc5-2e94-45cd-91fa-38ac8a40bb91.webp?v=1714977421","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/490f8af3ced2cd810d2a2f6e2cdb86a59e79766b_2dd081e7-fe17-442e-a1aa-235dc3b0e252.webp?v=1714977423","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f21302e7362ecd31e152ea9d5c849189318e09ff_f0063f32-30e1-40c6-9524-7b3459289ad4.webp?v=1714977426","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4095308e64bc987e7866ac5c75e5cf37dafc58ca_3ee701c2-60f8-4ed9-a016-ced7f4820fee.webp?v=1714977428","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43bf353c814df9f9f533da4b2350b989d26c2924_c33ac5aa-6b05-4c2b-bd09-c4d445e75919.webp?v=1714977431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecdd16f9ade601ace6ab120a007b1a72182af727_2145003c-cfce-4344-a936-08a07ccae545.webp?v=1714977433","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f711218c9fd134a870fae3a3e9882cbb37182f_d6e15f4f-b1bb-4862-ae02-abb6436ef061.webp?v=1714977436"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a88f72e0dcb7a915e871615afdafb49493d4f756_327a7bb4-cc95-4ef3-a8d7-2ea38e9bdfb3.webp?v=1714977413","options":["color"],"media":[{"alt":null,"id":23897284673635,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a88f72e0dcb7a915e871615afdafb49493d4f756_327a7bb4-cc95-4ef3-a8d7-2ea38e9bdfb3.webp?v=1714977413"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a88f72e0dcb7a915e871615afdafb49493d4f756_327a7bb4-cc95-4ef3-a8d7-2ea38e9bdfb3.webp?v=1714977413","width":2000},{"alt":null,"id":23897285328995,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6e4311809ab1eb0a66d124b078d9e74ee8f1af1_12b7b382-4f92-4ac3-8d99-99083baff38c.webp?v=1714977416"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6e4311809ab1eb0a66d124b078d9e74ee8f1af1_12b7b382-4f92-4ac3-8d99-99083baff38c.webp?v=1714977416","width":2000},{"alt":null,"id":23897285787747,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd3ee7ccfffdbf105f48656ce8f7356f7772fbf0_7ec2f756-7c28-42e2-a707-b8de7dc73af0.webp?v=1714977418"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd3ee7ccfffdbf105f48656ce8f7356f7772fbf0_7ec2f756-7c28-42e2-a707-b8de7dc73af0.webp?v=1714977418","width":2000},{"alt":null,"id":23897286246499,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7568eca9b35d9aef23ad9da38fc2561cd5605414_06f59cc5-2e94-45cd-91fa-38ac8a40bb91.webp?v=1714977421"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7568eca9b35d9aef23ad9da38fc2561cd5605414_06f59cc5-2e94-45cd-91fa-38ac8a40bb91.webp?v=1714977421","width":2000},{"alt":null,"id":23897287032931,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/490f8af3ced2cd810d2a2f6e2cdb86a59e79766b_2dd081e7-fe17-442e-a1aa-235dc3b0e252.webp?v=1714977423"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/490f8af3ced2cd810d2a2f6e2cdb86a59e79766b_2dd081e7-fe17-442e-a1aa-235dc3b0e252.webp?v=1714977423","width":2000},{"alt":null,"id":23897287589987,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f21302e7362ecd31e152ea9d5c849189318e09ff_f0063f32-30e1-40c6-9524-7b3459289ad4.webp?v=1714977426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f21302e7362ecd31e152ea9d5c849189318e09ff_f0063f32-30e1-40c6-9524-7b3459289ad4.webp?v=1714977426","width":2000},{"alt":null,"id":23897288081507,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4095308e64bc987e7866ac5c75e5cf37dafc58ca_3ee701c2-60f8-4ed9-a016-ced7f4820fee.webp?v=1714977428"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4095308e64bc987e7866ac5c75e5cf37dafc58ca_3ee701c2-60f8-4ed9-a016-ced7f4820fee.webp?v=1714977428","width":2000},{"alt":null,"id":23897288573027,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43bf353c814df9f9f533da4b2350b989d26c2924_c33ac5aa-6b05-4c2b-bd09-c4d445e75919.webp?v=1714977431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43bf353c814df9f9f533da4b2350b989d26c2924_c33ac5aa-6b05-4c2b-bd09-c4d445e75919.webp?v=1714977431","width":2000},{"alt":null,"id":23897289064547,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecdd16f9ade601ace6ab120a007b1a72182af727_2145003c-cfce-4344-a936-08a07ccae545.webp?v=1714977433"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecdd16f9ade601ace6ab120a007b1a72182af727_2145003c-cfce-4344-a936-08a07ccae545.webp?v=1714977433","width":2000},{"alt":null,"id":23897289621603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f711218c9fd134a870fae3a3e9882cbb37182f_d6e15f4f-b1bb-4862-ae02-abb6436ef061.webp?v=1714977436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f711218c9fd134a870fae3a3e9882cbb37182f_d6e15f4f-b1bb-4862-ae02-abb6436ef061.webp?v=1714977436","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41918621220963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31491875700835,"product_id":7416335597667,"position":8,"created_at":"2024-05-06T14:37:11+08:00","updated_at":"2024-05-06T14:37:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43bf353c814df9f9f533da4b2350b989d26c2924_c33ac5aa-6b05-4c2b-bd09-c4d445e75919.webp?v=1714977431","variant_ids":[41918621220963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍 - 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":"NPB0105424-PB32","featured_media":{"alt":null,"id":23897288573027,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43bf353c814df9f9f533da4b2350b989d26c2924_c33ac5aa-6b05-4c2b-bd09-c4d445e75919.webp?v=1714977431"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918621220963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31491875700835,"product_id":7416335597667,"position":8,"created_at":"2024-05-06T14:37:11+08:00","updated_at":"2024-05-06T14:37:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43bf353c814df9f9f533da4b2350b989d26c2924_c33ac5aa-6b05-4c2b-bd09-c4d445e75919.webp?v=1714977431","variant_ids":[41918621220963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍 - 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":"NPB0105424-PB32","featured_media":{"alt":null,"id":23897288573027,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43bf353c814df9f9f533da4b2350b989d26c2924_c33ac5aa-6b05-4c2b-bd09-c4d445e75919.webp?v=1714977431"}},"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: "停產" }