$product = {"id":7416372199523,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 小丑","handle":"iphone-8-mod-nx-printable-sb14","description":null,"published_at":"2024-06-11T16:57:16+08:00","created_at":"2024-05-06T14:44:11+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","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":41919033671779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31491968532579,"product_id":7416372199523,"position":6,"created_at":"2024-05-06T14:44:34+08:00","updated_at":"2024-05-06T14:44:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94726f5099e296caf1aeb862cd7fc3ffb50a5480_565aa436-ae05-4bc1-9757-a8731f43c610.webp?v=1714977874","variant_ids":[41919033671779]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 小丑 - 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-SB14","featured_media":{"alt":null,"id":23897381797987,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94726f5099e296caf1aeb862cd7fc3ffb50a5480_565aa436-ae05-4bc1-9757-a8731f43c610.webp?v=1714977874"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b76eda47e45842e4c8c715e98a356a06eeb4624f_b2cc6f0e-dc1c-4899-b9fb-9e2bd95f7e65.webp?v=1714977854","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88f09a049ac47506dadd3985c2aa1fe58d52a6eb_b3090b18-2140-4a34-aaeb-b2cabb669cc7.webp?v=1714977856","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f42e5d56eda9c13b161418d6f15e2650da857ef_394b6bca-2074-448e-9ec3-df31f0622513.webp?v=1714977867","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef2be9a7ccf9d8a87e44035a999fdef13ba42c24_a3d8c1af-c476-4db5-8bc4-eea2c79c1845.webp?v=1714977869","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31ff479fb58fc1d8ab1ef13f2753d103010f6c9f_8347bd07-cff3-4001-bcee-9c4cb669e9e9.webp?v=1714977872","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94726f5099e296caf1aeb862cd7fc3ffb50a5480_565aa436-ae05-4bc1-9757-a8731f43c610.webp?v=1714977874","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fff66ecffc595c91587820b853b8791546ae8314_d281b330-1764-451a-a480-fba84c5278af.webp?v=1714977885","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d9ef5ac6b31810a32910fd3f58b7191cacbac5a_b6f3f4fb-55ad-4e0f-a475-3e5cb2692de1.webp?v=1714977887","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19366347fdf7074454b869d36c0910fec23689de_243fba5f-0c26-4912-b142-b6ef8cbe00e1.webp?v=1714977890","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b25eed826ae51853ed0b75f89bb917770553a129_781c8334-9243-41a0-b5a0-3811a5b82327.webp?v=1714977892"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b76eda47e45842e4c8c715e98a356a06eeb4624f_b2cc6f0e-dc1c-4899-b9fb-9e2bd95f7e65.webp?v=1714977854","options":["color"],"media":[{"alt":null,"id":23897377996899,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b76eda47e45842e4c8c715e98a356a06eeb4624f_b2cc6f0e-dc1c-4899-b9fb-9e2bd95f7e65.webp?v=1714977854"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b76eda47e45842e4c8c715e98a356a06eeb4624f_b2cc6f0e-dc1c-4899-b9fb-9e2bd95f7e65.webp?v=1714977854","width":2000},{"alt":null,"id":23897378455651,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88f09a049ac47506dadd3985c2aa1fe58d52a6eb_b3090b18-2140-4a34-aaeb-b2cabb669cc7.webp?v=1714977856"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88f09a049ac47506dadd3985c2aa1fe58d52a6eb_b3090b18-2140-4a34-aaeb-b2cabb669cc7.webp?v=1714977856","width":2000},{"alt":null,"id":23897380388963,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f42e5d56eda9c13b161418d6f15e2650da857ef_394b6bca-2074-448e-9ec3-df31f0622513.webp?v=1714977867"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f42e5d56eda9c13b161418d6f15e2650da857ef_394b6bca-2074-448e-9ec3-df31f0622513.webp?v=1714977867","width":2000},{"alt":null,"id":23897380814947,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef2be9a7ccf9d8a87e44035a999fdef13ba42c24_a3d8c1af-c476-4db5-8bc4-eea2c79c1845.webp?v=1714977869"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef2be9a7ccf9d8a87e44035a999fdef13ba42c24_a3d8c1af-c476-4db5-8bc4-eea2c79c1845.webp?v=1714977869","width":2000},{"alt":null,"id":23897381306467,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31ff479fb58fc1d8ab1ef13f2753d103010f6c9f_8347bd07-cff3-4001-bcee-9c4cb669e9e9.webp?v=1714977872"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31ff479fb58fc1d8ab1ef13f2753d103010f6c9f_8347bd07-cff3-4001-bcee-9c4cb669e9e9.webp?v=1714977872","width":2000},{"alt":null,"id":23897381797987,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94726f5099e296caf1aeb862cd7fc3ffb50a5480_565aa436-ae05-4bc1-9757-a8731f43c610.webp?v=1714977874"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94726f5099e296caf1aeb862cd7fc3ffb50a5480_565aa436-ae05-4bc1-9757-a8731f43c610.webp?v=1714977874","width":2000},{"alt":null,"id":23897383895139,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fff66ecffc595c91587820b853b8791546ae8314_d281b330-1764-451a-a480-fba84c5278af.webp?v=1714977885"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fff66ecffc595c91587820b853b8791546ae8314_d281b330-1764-451a-a480-fba84c5278af.webp?v=1714977885","width":2000},{"alt":null,"id":23897384419427,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d9ef5ac6b31810a32910fd3f58b7191cacbac5a_b6f3f4fb-55ad-4e0f-a475-3e5cb2692de1.webp?v=1714977887"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d9ef5ac6b31810a32910fd3f58b7191cacbac5a_b6f3f4fb-55ad-4e0f-a475-3e5cb2692de1.webp?v=1714977887","width":2000},{"alt":null,"id":23897384910947,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19366347fdf7074454b869d36c0910fec23689de_243fba5f-0c26-4912-b142-b6ef8cbe00e1.webp?v=1714977890"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19366347fdf7074454b869d36c0910fec23689de_243fba5f-0c26-4912-b142-b6ef8cbe00e1.webp?v=1714977890","width":2000},{"alt":null,"id":23897385861219,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b25eed826ae51853ed0b75f89bb917770553a129_781c8334-9243-41a0-b5a0-3811a5b82327.webp?v=1714977892"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b25eed826ae51853ed0b75f89bb917770553a129_781c8334-9243-41a0-b5a0-3811a5b82327.webp?v=1714977892","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41919033671779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31491968532579,"product_id":7416372199523,"position":6,"created_at":"2024-05-06T14:44:34+08:00","updated_at":"2024-05-06T14:44:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94726f5099e296caf1aeb862cd7fc3ffb50a5480_565aa436-ae05-4bc1-9757-a8731f43c610.webp?v=1714977874","variant_ids":[41919033671779]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 小丑 - 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-SB14","featured_media":{"alt":null,"id":23897381797987,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94726f5099e296caf1aeb862cd7fc3ffb50a5480_565aa436-ae05-4bc1-9757-a8731f43c610.webp?v=1714977874"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919033671779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31491968532579,"product_id":7416372199523,"position":6,"created_at":"2024-05-06T14:44:34+08:00","updated_at":"2024-05-06T14:44:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94726f5099e296caf1aeb862cd7fc3ffb50a5480_565aa436-ae05-4bc1-9757-a8731f43c610.webp?v=1714977874","variant_ids":[41919033671779]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 小丑 - 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-SB14","featured_media":{"alt":null,"id":23897381797987,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94726f5099e296caf1aeb862cd7fc3ffb50a5480_565aa436-ae05-4bc1-9757-a8731f43c610.webp?v=1714977874"}},"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: "停產" }