$product = {"id":7415944970339,"title":"犀牛盾Mod NX手機殼 - iPhone XS - 史迪奇 - 夏威夷系列-線稿","handle":"iphone-xs-mod-nx-printable-yf03","description":null,"published_at":"2024-06-11T16:48:35+08:00","created_at":"2024-05-06T12:29:30+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":41915790065763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-YF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31490800910435,"product_id":7415944970339,"position":3,"created_at":"2024-05-06T12:29:37+08:00","updated_at":"2024-05-06T12:29:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573b2699851c4078deef7c796357313c03d45efd_3074b283-d955-4c08-b3e2-58030cb5dd75.webp?v=1714969777","variant_ids":[41915790065763]},"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-YF03","featured_media":{"alt":null,"id":23896207720547,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573b2699851c4078deef7c796357313c03d45efd_3074b283-d955-4c08-b3e2-58030cb5dd75.webp?v=1714969777"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c638eaf54449de3ccdcc4d298cb40bb6c377c_e497ab68-7505-4dd6-9c39-6a584c2e95fd.webp?v=1714969772","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9994355622732b4c940aee194d30c2826113a075_b8fea1ef-45d6-40b2-9605-bace2e70cdfd.webp?v=1714969775","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573b2699851c4078deef7c796357313c03d45efd_3074b283-d955-4c08-b3e2-58030cb5dd75.webp?v=1714969777","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54acd04051b1874449a1c7eb318753af6a8e9a99_feabd106-59c5-421c-8641-d6a6b3053fc1.webp?v=1714969779","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d9931411c6374e0ef62a4d186151cf2cfbd290b_0d2251cf-87b9-4da0-b758-6ed7567d92fe.webp?v=1714969782","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc89f316758acde0130a9a15ea649d3cdc4345b4_7502e024-8608-45aa-a7b8-f713eb48a91f.webp?v=1714969784","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50d51cf47ba707de53420d2b4e149037cfde4029_cc2d63ca-1b01-4974-9489-6ad37379300d.webp?v=1714969786","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/443cb62b6a621914552b05988325570d2cff5f65_608a3a85-5b10-4631-810e-11778b9715fe.webp?v=1714969788","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc54c993ea359e81a2fec34f416436c89d836905_17f7db22-5fba-4f76-b713-a668de11faa3.webp?v=1714969791","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2c2dc167be7e2a65ae24331e9494c0099cfa14a_3adac8d1-d30e-411d-a86b-9da5413cc3c0.webp?v=1714969793"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c638eaf54449de3ccdcc4d298cb40bb6c377c_e497ab68-7505-4dd6-9c39-6a584c2e95fd.webp?v=1714969772","options":["color"],"media":[{"alt":null,"id":23896206868579,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c638eaf54449de3ccdcc4d298cb40bb6c377c_e497ab68-7505-4dd6-9c39-6a584c2e95fd.webp?v=1714969772"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c638eaf54449de3ccdcc4d298cb40bb6c377c_e497ab68-7505-4dd6-9c39-6a584c2e95fd.webp?v=1714969772","width":2000},{"alt":null,"id":23896207327331,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9994355622732b4c940aee194d30c2826113a075_b8fea1ef-45d6-40b2-9605-bace2e70cdfd.webp?v=1714969775"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9994355622732b4c940aee194d30c2826113a075_b8fea1ef-45d6-40b2-9605-bace2e70cdfd.webp?v=1714969775","width":2000},{"alt":null,"id":23896207720547,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573b2699851c4078deef7c796357313c03d45efd_3074b283-d955-4c08-b3e2-58030cb5dd75.webp?v=1714969777"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573b2699851c4078deef7c796357313c03d45efd_3074b283-d955-4c08-b3e2-58030cb5dd75.webp?v=1714969777","width":2000},{"alt":null,"id":23896208310371,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54acd04051b1874449a1c7eb318753af6a8e9a99_feabd106-59c5-421c-8641-d6a6b3053fc1.webp?v=1714969779"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54acd04051b1874449a1c7eb318753af6a8e9a99_feabd106-59c5-421c-8641-d6a6b3053fc1.webp?v=1714969779","width":2000},{"alt":null,"id":23896208769123,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d9931411c6374e0ef62a4d186151cf2cfbd290b_0d2251cf-87b9-4da0-b758-6ed7567d92fe.webp?v=1714969782"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d9931411c6374e0ef62a4d186151cf2cfbd290b_0d2251cf-87b9-4da0-b758-6ed7567d92fe.webp?v=1714969782","width":2000},{"alt":null,"id":23896209162339,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc89f316758acde0130a9a15ea649d3cdc4345b4_7502e024-8608-45aa-a7b8-f713eb48a91f.webp?v=1714969784"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc89f316758acde0130a9a15ea649d3cdc4345b4_7502e024-8608-45aa-a7b8-f713eb48a91f.webp?v=1714969784","width":2000},{"alt":null,"id":23896209752163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50d51cf47ba707de53420d2b4e149037cfde4029_cc2d63ca-1b01-4974-9489-6ad37379300d.webp?v=1714969786"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50d51cf47ba707de53420d2b4e149037cfde4029_cc2d63ca-1b01-4974-9489-6ad37379300d.webp?v=1714969786","width":2000},{"alt":null,"id":23896210505827,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/443cb62b6a621914552b05988325570d2cff5f65_608a3a85-5b10-4631-810e-11778b9715fe.webp?v=1714969788"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/443cb62b6a621914552b05988325570d2cff5f65_608a3a85-5b10-4631-810e-11778b9715fe.webp?v=1714969788","width":2000},{"alt":null,"id":23896211030115,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc54c993ea359e81a2fec34f416436c89d836905_17f7db22-5fba-4f76-b713-a668de11faa3.webp?v=1714969791"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc54c993ea359e81a2fec34f416436c89d836905_17f7db22-5fba-4f76-b713-a668de11faa3.webp?v=1714969791","width":2000},{"alt":null,"id":23896211685475,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2c2dc167be7e2a65ae24331e9494c0099cfa14a_3adac8d1-d30e-411d-a86b-9da5413cc3c0.webp?v=1714969793"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2c2dc167be7e2a65ae24331e9494c0099cfa14a_3adac8d1-d30e-411d-a86b-9da5413cc3c0.webp?v=1714969793","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41915790065763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-YF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31490800910435,"product_id":7415944970339,"position":3,"created_at":"2024-05-06T12:29:37+08:00","updated_at":"2024-05-06T12:29:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573b2699851c4078deef7c796357313c03d45efd_3074b283-d955-4c08-b3e2-58030cb5dd75.webp?v=1714969777","variant_ids":[41915790065763]},"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-YF03","featured_media":{"alt":null,"id":23896207720547,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573b2699851c4078deef7c796357313c03d45efd_3074b283-d955-4c08-b3e2-58030cb5dd75.webp?v=1714969777"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915790065763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-YF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31490800910435,"product_id":7415944970339,"position":3,"created_at":"2024-05-06T12:29:37+08:00","updated_at":"2024-05-06T12:29:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573b2699851c4078deef7c796357313c03d45efd_3074b283-d955-4c08-b3e2-58030cb5dd75.webp?v=1714969777","variant_ids":[41915790065763]},"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-YF03","featured_media":{"alt":null,"id":23896207720547,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573b2699851c4078deef7c796357313c03d45efd_3074b283-d955-4c08-b3e2-58030cb5dd75.webp?v=1714969777"}},"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: "停產" }