$product = {"id":7416177590371,"title":"犀牛盾Mod NX手機殼 - iPhone X - 史迪奇 - 經典系列-Aloha!","handle":"iphone-x-mod-nx-printable-yf08","description":null,"published_at":"2024-06-11T16:52:42+08:00","created_at":"2024-05-06T14:06:10+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone X","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-stitch","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":41917765943395,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31491572662371,"product_id":7416177590371,"position":6,"created_at":"2024-05-06T14:06:24+08:00","updated_at":"2024-05-06T14:06:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c50f60219d5366e3a97b6388f82f47b54427cb_e8bbcaff-b186-40c5-88d7-07221dce9ae7.webp?v=1714975584","variant_ids":[41917765943395]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 史迪奇 - 經典系列-Aloha! - 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":"NPB0106424-YF08","featured_media":{"alt":null,"id":23896984584291,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c50f60219d5366e3a97b6388f82f47b54427cb_e8bbcaff-b186-40c5-88d7-07221dce9ae7.webp?v=1714975584"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1789a8046b04f6631d7339bf652b2faafa68c22_184a7f33-8e35-468b-9e68-f85c1ad85d2a.webp?v=1714975573","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b9a8f319939ba4278ebed739eacb6cd60fa357a_95a10b54-4a68-46c8-87c2-2ecc0acaa5ac.webp?v=1714975575","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8702afd4cb70a57835abbdbf2bf5b2d95ab9ff7_d0b2b152-270a-4e42-a0b5-dc9477ca973e.webp?v=1714975577","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/771cdff7cf71fff07072f0238f217363ff5cd479_987da260-c3e3-425c-822f-9b520a3ffa7b.webp?v=1714975579","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23aa9cf3ce4e3a8cd386f36006d05a21d22a5406_f79e4ed9-072b-4c11-ad72-f5ed096527d8.webp?v=1714975582","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c50f60219d5366e3a97b6388f82f47b54427cb_e8bbcaff-b186-40c5-88d7-07221dce9ae7.webp?v=1714975584","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/809511636225322e65c7b64416459a16dc3c9c14_47d7aab0-92cc-43e5-b406-ba351036b750.webp?v=1714975587","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90a42fcb04e1c7d07fe35b20c00c2909298aa7d8_3f7a022d-4c80-4d58-be90-f3898696c5e0.webp?v=1714975589","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1b5929a7d2f130d13ae0dce3ed41a8ce76281f0_84f84403-640f-4447-a758-3d41da0da2e9.webp?v=1714975592","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6089327dc4ff948da3a1bdeb639e7e4a5d3ee836_c7021860-3ae1-4c1a-b9cf-71fd1a7857aa.webp?v=1714975594"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1789a8046b04f6631d7339bf652b2faafa68c22_184a7f33-8e35-468b-9e68-f85c1ad85d2a.webp?v=1714975573","options":["color"],"media":[{"alt":null,"id":23896979964003,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1789a8046b04f6631d7339bf652b2faafa68c22_184a7f33-8e35-468b-9e68-f85c1ad85d2a.webp?v=1714975573"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1789a8046b04f6631d7339bf652b2faafa68c22_184a7f33-8e35-468b-9e68-f85c1ad85d2a.webp?v=1714975573","width":2000},{"alt":null,"id":23896980586595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b9a8f319939ba4278ebed739eacb6cd60fa357a_95a10b54-4a68-46c8-87c2-2ecc0acaa5ac.webp?v=1714975575"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b9a8f319939ba4278ebed739eacb6cd60fa357a_95a10b54-4a68-46c8-87c2-2ecc0acaa5ac.webp?v=1714975575","width":2000},{"alt":null,"id":23896982650979,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8702afd4cb70a57835abbdbf2bf5b2d95ab9ff7_d0b2b152-270a-4e42-a0b5-dc9477ca973e.webp?v=1714975577"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8702afd4cb70a57835abbdbf2bf5b2d95ab9ff7_d0b2b152-270a-4e42-a0b5-dc9477ca973e.webp?v=1714975577","width":2000},{"alt":null,"id":23896983142499,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/771cdff7cf71fff07072f0238f217363ff5cd479_987da260-c3e3-425c-822f-9b520a3ffa7b.webp?v=1714975579"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/771cdff7cf71fff07072f0238f217363ff5cd479_987da260-c3e3-425c-822f-9b520a3ffa7b.webp?v=1714975579","width":2000},{"alt":null,"id":23896983961699,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23aa9cf3ce4e3a8cd386f36006d05a21d22a5406_f79e4ed9-072b-4c11-ad72-f5ed096527d8.webp?v=1714975582"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23aa9cf3ce4e3a8cd386f36006d05a21d22a5406_f79e4ed9-072b-4c11-ad72-f5ed096527d8.webp?v=1714975582","width":2000},{"alt":null,"id":23896984584291,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c50f60219d5366e3a97b6388f82f47b54427cb_e8bbcaff-b186-40c5-88d7-07221dce9ae7.webp?v=1714975584"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c50f60219d5366e3a97b6388f82f47b54427cb_e8bbcaff-b186-40c5-88d7-07221dce9ae7.webp?v=1714975584","width":2000},{"alt":null,"id":23896985337955,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/809511636225322e65c7b64416459a16dc3c9c14_47d7aab0-92cc-43e5-b406-ba351036b750.webp?v=1714975587"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/809511636225322e65c7b64416459a16dc3c9c14_47d7aab0-92cc-43e5-b406-ba351036b750.webp?v=1714975587","width":2000},{"alt":null,"id":23896985862243,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90a42fcb04e1c7d07fe35b20c00c2909298aa7d8_3f7a022d-4c80-4d58-be90-f3898696c5e0.webp?v=1714975589"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90a42fcb04e1c7d07fe35b20c00c2909298aa7d8_3f7a022d-4c80-4d58-be90-f3898696c5e0.webp?v=1714975589","width":2000},{"alt":null,"id":23896986648675,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1b5929a7d2f130d13ae0dce3ed41a8ce76281f0_84f84403-640f-4447-a758-3d41da0da2e9.webp?v=1714975592"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1b5929a7d2f130d13ae0dce3ed41a8ce76281f0_84f84403-640f-4447-a758-3d41da0da2e9.webp?v=1714975592","width":2000},{"alt":null,"id":23896987336803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6089327dc4ff948da3a1bdeb639e7e4a5d3ee836_c7021860-3ae1-4c1a-b9cf-71fd1a7857aa.webp?v=1714975594"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6089327dc4ff948da3a1bdeb639e7e4a5d3ee836_c7021860-3ae1-4c1a-b9cf-71fd1a7857aa.webp?v=1714975594","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41917765943395,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31491572662371,"product_id":7416177590371,"position":6,"created_at":"2024-05-06T14:06:24+08:00","updated_at":"2024-05-06T14:06:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c50f60219d5366e3a97b6388f82f47b54427cb_e8bbcaff-b186-40c5-88d7-07221dce9ae7.webp?v=1714975584","variant_ids":[41917765943395]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 史迪奇 - 經典系列-Aloha! - 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":"NPB0106424-YF08","featured_media":{"alt":null,"id":23896984584291,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c50f60219d5366e3a97b6388f82f47b54427cb_e8bbcaff-b186-40c5-88d7-07221dce9ae7.webp?v=1714975584"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41917765943395,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31491572662371,"product_id":7416177590371,"position":6,"created_at":"2024-05-06T14:06:24+08:00","updated_at":"2024-05-06T14:06:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c50f60219d5366e3a97b6388f82f47b54427cb_e8bbcaff-b186-40c5-88d7-07221dce9ae7.webp?v=1714975584","variant_ids":[41917765943395]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 史迪奇 - 經典系列-Aloha! - 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":"NPB0106424-YF08","featured_media":{"alt":null,"id":23896984584291,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c50f60219d5366e3a97b6388f82f47b54427cb_e8bbcaff-b186-40c5-88d7-07221dce9ae7.webp?v=1714975584"}},"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: "停產" }