$product = {"id":7416001200227,"title":"犀牛盾Mod NX手機殼 - iPhone XS - 史迪奇 - 經典系列-史迪奇大臉款","handle":"iphone-xs-mod-nx-printable-yf01","description":null,"published_at":"2024-06-11T16:50:05+08:00","created_at":"2024-05-06T12:40:06+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 XS","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":41916385132643,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-YF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31490959212643,"product_id":7416001200227,"position":10,"created_at":"2024-05-06T12:40:30+08:00","updated_at":"2024-05-06T12:40:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/090894b711f2d0a4532bd1632b882cc922aae03d_67b0c274-0769-4a23-bbf3-e774386c8af3.webp?v=1714970430","variant_ids":[41916385132643]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 史迪奇 - 經典系列-史迪奇大臉款 - 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":"NPB0108424-YF01","featured_media":{"alt":null,"id":23896366284899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/090894b711f2d0a4532bd1632b882cc922aae03d_67b0c274-0769-4a23-bbf3-e774386c8af3.webp?v=1714970430"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff4bdb6c01a46a2dfad43108937b14c3d70b182_f3b4e899-1850-4281-b512-820b43d8253e.webp?v=1714970408","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ca8f88f6e8d4d439679c33f3b150d9a4acf41b6_15478941-1b54-40e2-9356-1bc49001cce5.webp?v=1714970411","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5279cd0df72a5055662012e52740b8455848a0_1cdf839b-4fe5-4cda-9472-412f2b2c5ae9.webp?v=1714970413","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b228425cac48ae9c7209bc303f223bdd2a1c573_e1bb9e42-725c-4980-8438-deaa0b28bffa.webp?v=1714970415","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52b9157e2729ec545ae317a7830c1a08c5330d7c_070d60c2-d5d0-41bb-a93b-0a28aa0cdef3.webp?v=1714970418","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d383ec71db567cc708a7658b8d7e76b065bec89_c3d957b2-f491-4504-a323-b72c2751c07c.webp?v=1714970420","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feb8abe897d0391c17ad5457ba51064ffc8766ba_af87bbe9-1b1c-42bf-bd8c-bf10cb8c5e0c.webp?v=1714970423","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/930c216e8bbc2f77bbb0cea05491e78b39395eff_27b5b3e6-9b41-49fe-b810-8a3e98e0322b.webp?v=1714970425","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd66c933b36c774791559d63a7afa3ccf8ca4c0b_99e4dc2c-3aab-4494-b535-5665f6dc4f02.webp?v=1714970427","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/090894b711f2d0a4532bd1632b882cc922aae03d_67b0c274-0769-4a23-bbf3-e774386c8af3.webp?v=1714970430"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff4bdb6c01a46a2dfad43108937b14c3d70b182_f3b4e899-1850-4281-b512-820b43d8253e.webp?v=1714970408","options":["color"],"media":[{"alt":null,"id":23896361533539,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff4bdb6c01a46a2dfad43108937b14c3d70b182_f3b4e899-1850-4281-b512-820b43d8253e.webp?v=1714970408"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff4bdb6c01a46a2dfad43108937b14c3d70b182_f3b4e899-1850-4281-b512-820b43d8253e.webp?v=1714970408","width":2000},{"alt":null,"id":23896361959523,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ca8f88f6e8d4d439679c33f3b150d9a4acf41b6_15478941-1b54-40e2-9356-1bc49001cce5.webp?v=1714970411"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ca8f88f6e8d4d439679c33f3b150d9a4acf41b6_15478941-1b54-40e2-9356-1bc49001cce5.webp?v=1714970411","width":2000},{"alt":null,"id":23896362483811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5279cd0df72a5055662012e52740b8455848a0_1cdf839b-4fe5-4cda-9472-412f2b2c5ae9.webp?v=1714970413"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5279cd0df72a5055662012e52740b8455848a0_1cdf839b-4fe5-4cda-9472-412f2b2c5ae9.webp?v=1714970413","width":2000},{"alt":null,"id":23896362975331,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b228425cac48ae9c7209bc303f223bdd2a1c573_e1bb9e42-725c-4980-8438-deaa0b28bffa.webp?v=1714970415"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b228425cac48ae9c7209bc303f223bdd2a1c573_e1bb9e42-725c-4980-8438-deaa0b28bffa.webp?v=1714970415","width":2000},{"alt":null,"id":23896363434083,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52b9157e2729ec545ae317a7830c1a08c5330d7c_070d60c2-d5d0-41bb-a93b-0a28aa0cdef3.webp?v=1714970418"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52b9157e2729ec545ae317a7830c1a08c5330d7c_070d60c2-d5d0-41bb-a93b-0a28aa0cdef3.webp?v=1714970418","width":2000},{"alt":null,"id":23896363892835,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d383ec71db567cc708a7658b8d7e76b065bec89_c3d957b2-f491-4504-a323-b72c2751c07c.webp?v=1714970420"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d383ec71db567cc708a7658b8d7e76b065bec89_c3d957b2-f491-4504-a323-b72c2751c07c.webp?v=1714970420","width":2000},{"alt":null,"id":23896364318819,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feb8abe897d0391c17ad5457ba51064ffc8766ba_af87bbe9-1b1c-42bf-bd8c-bf10cb8c5e0c.webp?v=1714970423"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feb8abe897d0391c17ad5457ba51064ffc8766ba_af87bbe9-1b1c-42bf-bd8c-bf10cb8c5e0c.webp?v=1714970423","width":2000},{"alt":null,"id":23896365400163,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/930c216e8bbc2f77bbb0cea05491e78b39395eff_27b5b3e6-9b41-49fe-b810-8a3e98e0322b.webp?v=1714970425"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/930c216e8bbc2f77bbb0cea05491e78b39395eff_27b5b3e6-9b41-49fe-b810-8a3e98e0322b.webp?v=1714970425","width":2000},{"alt":null,"id":23896365858915,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd66c933b36c774791559d63a7afa3ccf8ca4c0b_99e4dc2c-3aab-4494-b535-5665f6dc4f02.webp?v=1714970427"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd66c933b36c774791559d63a7afa3ccf8ca4c0b_99e4dc2c-3aab-4494-b535-5665f6dc4f02.webp?v=1714970427","width":2000},{"alt":null,"id":23896366284899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/090894b711f2d0a4532bd1632b882cc922aae03d_67b0c274-0769-4a23-bbf3-e774386c8af3.webp?v=1714970430"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/090894b711f2d0a4532bd1632b882cc922aae03d_67b0c274-0769-4a23-bbf3-e774386c8af3.webp?v=1714970430","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41916385132643,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-YF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31490959212643,"product_id":7416001200227,"position":10,"created_at":"2024-05-06T12:40:30+08:00","updated_at":"2024-05-06T12:40:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/090894b711f2d0a4532bd1632b882cc922aae03d_67b0c274-0769-4a23-bbf3-e774386c8af3.webp?v=1714970430","variant_ids":[41916385132643]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 史迪奇 - 經典系列-史迪奇大臉款 - 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":"NPB0108424-YF01","featured_media":{"alt":null,"id":23896366284899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/090894b711f2d0a4532bd1632b882cc922aae03d_67b0c274-0769-4a23-bbf3-e774386c8af3.webp?v=1714970430"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916385132643,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-YF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31490959212643,"product_id":7416001200227,"position":10,"created_at":"2024-05-06T12:40:30+08:00","updated_at":"2024-05-06T12:40:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/090894b711f2d0a4532bd1632b882cc922aae03d_67b0c274-0769-4a23-bbf3-e774386c8af3.webp?v=1714970430","variant_ids":[41916385132643]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 史迪奇 - 經典系列-史迪奇大臉款 - 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":"NPB0108424-YF01","featured_media":{"alt":null,"id":23896366284899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/090894b711f2d0a4532bd1632b882cc922aae03d_67b0c274-0769-4a23-bbf3-e774386c8af3.webp?v=1714970430"}},"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: "停產" }