$product = {"id":7416245223523,"title":"犀牛盾Mod NX手機殼 - iPhone X - 【獨家設計款】 - 來自空中的情書(底片版)","handle":"iphone-x-mod-nx-printable-ae05","description":null,"published_at":"2024-06-11T16:54:07+08:00","created_at":"2024-05-06T14:16:19+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone X","discountable-item","member","merge","mod-nx-printable","new-modnx-sku","reseller","reseller-modnx-chi-po-lin-series","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":41918358257763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-AE05","requires_shipping":true,"taxable":true,"featured_image":{"id":31491723133027,"product_id":7416245223523,"position":4,"created_at":"2024-05-06T14:16:28+08:00","updated_at":"2024-05-06T14:16:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2443160e87be901cb8acf0b10360136a7850d62c_a63696b1-5636-4cfd-99c9-4930f8346e79.webp?v=1714976188","variant_ids":[41918358257763]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 【獨家設計款】 - 來自空中的情書(底片版) - 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-AE05","featured_media":{"alt":null,"id":23897135317091,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2443160e87be901cb8acf0b10360136a7850d62c_a63696b1-5636-4cfd-99c9-4930f8346e79.webp?v=1714976188"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0c4c7a57fe5d8cd536302c5a39496bafd5ba6e5_fe4c5f12-10f9-41e9-be8a-d3c60b34b76f.webp?v=1714976181","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfb463b66fc8940e2e04855b782fe0fcaef8d17e_9582123a-e6dc-4cfa-920e-fd19c7c31461.webp?v=1714976184","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d943e8cd019521eef4c4b9a3f8b18b685694b61e_8840bf46-546b-4616-abc3-3eecbf611c82.webp?v=1714976186","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2443160e87be901cb8acf0b10360136a7850d62c_a63696b1-5636-4cfd-99c9-4930f8346e79.webp?v=1714976188","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/651fa2c2b1fe699efb490de5412eff917ca1c60e_d68a248c-4a76-44a8-ad13-e0cf46c6711a.webp?v=1714976191","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16bc258967075a30f4de89efd7625fc39e157953_addf587b-273f-45c7-b8e2-1f967d67c4d1.webp?v=1714976193","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb85e99ec21f943da2d24416cbf1babf6486e268_1a65d664-e441-4f2e-8680-661b8df4d1f6.webp?v=1714976196","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/663f91ab533e1aeed66a69a5abff7ff5274185ab_54624707-5c74-420b-803e-9d872d817434.webp?v=1714976199","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a075ad47adf796de531e52ad7e06702a64334ad1_01132978-6166-4f6b-81ee-f6ed1ef9365b.webp?v=1714976201","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93103eaec9d97519c7e135a8fa84ebb137223571_30ba6b29-2c13-4778-874a-bb987cb772a1.webp?v=1714976203"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0c4c7a57fe5d8cd536302c5a39496bafd5ba6e5_fe4c5f12-10f9-41e9-be8a-d3c60b34b76f.webp?v=1714976181","options":["color"],"media":[{"alt":null,"id":23897133645923,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0c4c7a57fe5d8cd536302c5a39496bafd5ba6e5_fe4c5f12-10f9-41e9-be8a-d3c60b34b76f.webp?v=1714976181"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0c4c7a57fe5d8cd536302c5a39496bafd5ba6e5_fe4c5f12-10f9-41e9-be8a-d3c60b34b76f.webp?v=1714976181","width":2000},{"alt":null,"id":23897134235747,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfb463b66fc8940e2e04855b782fe0fcaef8d17e_9582123a-e6dc-4cfa-920e-fd19c7c31461.webp?v=1714976184"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfb463b66fc8940e2e04855b782fe0fcaef8d17e_9582123a-e6dc-4cfa-920e-fd19c7c31461.webp?v=1714976184","width":2000},{"alt":null,"id":23897134792803,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d943e8cd019521eef4c4b9a3f8b18b685694b61e_8840bf46-546b-4616-abc3-3eecbf611c82.webp?v=1714976186"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d943e8cd019521eef4c4b9a3f8b18b685694b61e_8840bf46-546b-4616-abc3-3eecbf611c82.webp?v=1714976186","width":2000},{"alt":null,"id":23897135317091,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2443160e87be901cb8acf0b10360136a7850d62c_a63696b1-5636-4cfd-99c9-4930f8346e79.webp?v=1714976188"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2443160e87be901cb8acf0b10360136a7850d62c_a63696b1-5636-4cfd-99c9-4930f8346e79.webp?v=1714976188","width":2000},{"alt":null,"id":23897135743075,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/651fa2c2b1fe699efb490de5412eff917ca1c60e_d68a248c-4a76-44a8-ad13-e0cf46c6711a.webp?v=1714976191"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/651fa2c2b1fe699efb490de5412eff917ca1c60e_d68a248c-4a76-44a8-ad13-e0cf46c6711a.webp?v=1714976191","width":2000},{"alt":null,"id":23897136267363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16bc258967075a30f4de89efd7625fc39e157953_addf587b-273f-45c7-b8e2-1f967d67c4d1.webp?v=1714976193"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16bc258967075a30f4de89efd7625fc39e157953_addf587b-273f-45c7-b8e2-1f967d67c4d1.webp?v=1714976193","width":2000},{"alt":null,"id":23897136791651,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb85e99ec21f943da2d24416cbf1babf6486e268_1a65d664-e441-4f2e-8680-661b8df4d1f6.webp?v=1714976196"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb85e99ec21f943da2d24416cbf1babf6486e268_1a65d664-e441-4f2e-8680-661b8df4d1f6.webp?v=1714976196","width":2000},{"alt":null,"id":23897137283171,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/663f91ab533e1aeed66a69a5abff7ff5274185ab_54624707-5c74-420b-803e-9d872d817434.webp?v=1714976199"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/663f91ab533e1aeed66a69a5abff7ff5274185ab_54624707-5c74-420b-803e-9d872d817434.webp?v=1714976199","width":2000},{"alt":null,"id":23897137905763,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a075ad47adf796de531e52ad7e06702a64334ad1_01132978-6166-4f6b-81ee-f6ed1ef9365b.webp?v=1714976201"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a075ad47adf796de531e52ad7e06702a64334ad1_01132978-6166-4f6b-81ee-f6ed1ef9365b.webp?v=1714976201","width":2000},{"alt":null,"id":23897138364515,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93103eaec9d97519c7e135a8fa84ebb137223571_30ba6b29-2c13-4778-874a-bb987cb772a1.webp?v=1714976203"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93103eaec9d97519c7e135a8fa84ebb137223571_30ba6b29-2c13-4778-874a-bb987cb772a1.webp?v=1714976203","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41918358257763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-AE05","requires_shipping":true,"taxable":true,"featured_image":{"id":31491723133027,"product_id":7416245223523,"position":4,"created_at":"2024-05-06T14:16:28+08:00","updated_at":"2024-05-06T14:16:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2443160e87be901cb8acf0b10360136a7850d62c_a63696b1-5636-4cfd-99c9-4930f8346e79.webp?v=1714976188","variant_ids":[41918358257763]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 【獨家設計款】 - 來自空中的情書(底片版) - 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-AE05","featured_media":{"alt":null,"id":23897135317091,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2443160e87be901cb8acf0b10360136a7850d62c_a63696b1-5636-4cfd-99c9-4930f8346e79.webp?v=1714976188"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918358257763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-AE05","requires_shipping":true,"taxable":true,"featured_image":{"id":31491723133027,"product_id":7416245223523,"position":4,"created_at":"2024-05-06T14:16:28+08:00","updated_at":"2024-05-06T14:16:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2443160e87be901cb8acf0b10360136a7850d62c_a63696b1-5636-4cfd-99c9-4930f8346e79.webp?v=1714976188","variant_ids":[41918358257763]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 【獨家設計款】 - 來自空中的情書(底片版) - 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-AE05","featured_media":{"alt":null,"id":23897135317091,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2443160e87be901cb8acf0b10360136a7850d62c_a63696b1-5636-4cfd-99c9-4930f8346e79.webp?v=1714976188"}},"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: "停產" }