$product = {"id":7415910989923,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍","handle":"iphone-xs-max-mod-nx-printable-pb32","description":null,"published_at":"2024-06-11T16:47:44+08:00","created_at":"2024-05-06T12:23:16+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":41915454783587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31490711847011,"product_id":7415910989923,"position":1,"created_at":"2024-05-06T12:23:18+08:00","updated_at":"2024-05-06T12:23:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9e1acb3148da4b51e57120203fcc82c978782d_9388e8d9-df5e-45fe-83d9-4d751cdf2f5a.webp?v=1714969398","variant_ids":[41915454783587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB32","featured_media":{"alt":null,"id":23896118624355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9e1acb3148da4b51e57120203fcc82c978782d_9388e8d9-df5e-45fe-83d9-4d751cdf2f5a.webp?v=1714969398"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9e1acb3148da4b51e57120203fcc82c978782d_9388e8d9-df5e-45fe-83d9-4d751cdf2f5a.webp?v=1714969398","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae198be37a224550bfaf6e38c47738c10d7674be_91dafe5b-018c-4d0b-9397-ac8cc9108e23.webp?v=1714969401","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5be08ba5705420f618d3bd5cec66173d60932b9b_74b81571-f814-4ea9-930d-e50ff43d8de0.webp?v=1714969403","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a7b3c91f51c47c60e4ff7aa33195b9f33bc1798_aea0eab3-836c-4d4c-b9b5-1aa5247cacf1.webp?v=1714969406","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4e611caa5811c427c3d030caf609aa84766c5c5_52b49716-966b-4581-ba3d-fa60a31763b2.webp?v=1714969408","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f691a91ea9e04b88d9badab546a03240ca1eac14_6bb1eddb-3d0c-44b6-9884-86b30d34caf3.webp?v=1714969411","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cb97ecff2585f2352a8e02f4f83074c6183c78e_4cd35bf7-5cd6-422f-9598-d392cd40354b.webp?v=1714969414","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c98f21273f333a7bd74b2e4e8666cc662fb787_3c20f0e4-e48e-441b-bd6a-161017a5db61.webp?v=1714969416","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abfc38c3a4f5e46ffdfef70725a9650cf3080f77_0533867f-00c5-4177-83f0-6a74fd9d2c09.webp?v=1714969418","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c225ae60e3db5293404925b6193e7c7ca31ee93_bc90aa0b-62d3-4228-a330-4fe1f5e334d2.webp?v=1714969421"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9e1acb3148da4b51e57120203fcc82c978782d_9388e8d9-df5e-45fe-83d9-4d751cdf2f5a.webp?v=1714969398","options":["color"],"media":[{"alt":null,"id":23896118624355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9e1acb3148da4b51e57120203fcc82c978782d_9388e8d9-df5e-45fe-83d9-4d751cdf2f5a.webp?v=1714969398"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9e1acb3148da4b51e57120203fcc82c978782d_9388e8d9-df5e-45fe-83d9-4d751cdf2f5a.webp?v=1714969398","width":2000},{"alt":null,"id":23896119050339,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae198be37a224550bfaf6e38c47738c10d7674be_91dafe5b-018c-4d0b-9397-ac8cc9108e23.webp?v=1714969401"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae198be37a224550bfaf6e38c47738c10d7674be_91dafe5b-018c-4d0b-9397-ac8cc9108e23.webp?v=1714969401","width":2000},{"alt":null,"id":23896119672931,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5be08ba5705420f618d3bd5cec66173d60932b9b_74b81571-f814-4ea9-930d-e50ff43d8de0.webp?v=1714969403"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5be08ba5705420f618d3bd5cec66173d60932b9b_74b81571-f814-4ea9-930d-e50ff43d8de0.webp?v=1714969403","width":2000},{"alt":null,"id":23896120328291,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a7b3c91f51c47c60e4ff7aa33195b9f33bc1798_aea0eab3-836c-4d4c-b9b5-1aa5247cacf1.webp?v=1714969406"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a7b3c91f51c47c60e4ff7aa33195b9f33bc1798_aea0eab3-836c-4d4c-b9b5-1aa5247cacf1.webp?v=1714969406","width":2000},{"alt":null,"id":23896120819811,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4e611caa5811c427c3d030caf609aa84766c5c5_52b49716-966b-4581-ba3d-fa60a31763b2.webp?v=1714969408"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4e611caa5811c427c3d030caf609aa84766c5c5_52b49716-966b-4581-ba3d-fa60a31763b2.webp?v=1714969408","width":2000},{"alt":null,"id":23896121278563,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f691a91ea9e04b88d9badab546a03240ca1eac14_6bb1eddb-3d0c-44b6-9884-86b30d34caf3.webp?v=1714969411"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f691a91ea9e04b88d9badab546a03240ca1eac14_6bb1eddb-3d0c-44b6-9884-86b30d34caf3.webp?v=1714969411","width":2000},{"alt":null,"id":23896121737315,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cb97ecff2585f2352a8e02f4f83074c6183c78e_4cd35bf7-5cd6-422f-9598-d392cd40354b.webp?v=1714969414"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cb97ecff2585f2352a8e02f4f83074c6183c78e_4cd35bf7-5cd6-422f-9598-d392cd40354b.webp?v=1714969414","width":2000},{"alt":null,"id":23896122228835,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c98f21273f333a7bd74b2e4e8666cc662fb787_3c20f0e4-e48e-441b-bd6a-161017a5db61.webp?v=1714969416"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c98f21273f333a7bd74b2e4e8666cc662fb787_3c20f0e4-e48e-441b-bd6a-161017a5db61.webp?v=1714969416","width":2000},{"alt":null,"id":23896122687587,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abfc38c3a4f5e46ffdfef70725a9650cf3080f77_0533867f-00c5-4177-83f0-6a74fd9d2c09.webp?v=1714969418"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abfc38c3a4f5e46ffdfef70725a9650cf3080f77_0533867f-00c5-4177-83f0-6a74fd9d2c09.webp?v=1714969418","width":2000},{"alt":null,"id":23896123080803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c225ae60e3db5293404925b6193e7c7ca31ee93_bc90aa0b-62d3-4228-a330-4fe1f5e334d2.webp?v=1714969421"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c225ae60e3db5293404925b6193e7c7ca31ee93_bc90aa0b-62d3-4228-a330-4fe1f5e334d2.webp?v=1714969421","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41915454783587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31490711847011,"product_id":7415910989923,"position":1,"created_at":"2024-05-06T12:23:18+08:00","updated_at":"2024-05-06T12:23:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9e1acb3148da4b51e57120203fcc82c978782d_9388e8d9-df5e-45fe-83d9-4d751cdf2f5a.webp?v=1714969398","variant_ids":[41915454783587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB32","featured_media":{"alt":null,"id":23896118624355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9e1acb3148da4b51e57120203fcc82c978782d_9388e8d9-df5e-45fe-83d9-4d751cdf2f5a.webp?v=1714969398"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915454783587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31490711847011,"product_id":7415910989923,"position":1,"created_at":"2024-05-06T12:23:18+08:00","updated_at":"2024-05-06T12:23:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9e1acb3148da4b51e57120203fcc82c978782d_9388e8d9-df5e-45fe-83d9-4d751cdf2f5a.webp?v=1714969398","variant_ids":[41915454783587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB32","featured_media":{"alt":null,"id":23896118624355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9e1acb3148da4b51e57120203fcc82c978782d_9388e8d9-df5e-45fe-83d9-4d751cdf2f5a.webp?v=1714969398"}},"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: "停產" }