$product = {"id":7416013488227,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday","handle":"iphone-xs-max-mod-nx-printable-rl01","description":null,"published_at":"2024-06-11T16:50:25+08:00","created_at":"2024-05-06T12:42:17+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Twenty One Point Five - 21.5","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-twenty-one-point-five","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-twenty-one-point-five","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":41916511387747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-RL01","requires_shipping":true,"taxable":true,"featured_image":{"id":31490985656419,"product_id":7416013488227,"position":1,"created_at":"2024-05-06T12:42:20+08:00","updated_at":"2024-05-06T12:42:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9410f174cd83e9dbb9355999cfc02db258603666_a9ffa660-2c81-4712-b312-bc84ddcd78f5.webp?v=1714970540","variant_ids":[41916511387747]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-RL01","featured_media":{"alt":null,"id":23896392826979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9410f174cd83e9dbb9355999cfc02db258603666_a9ffa660-2c81-4712-b312-bc84ddcd78f5.webp?v=1714970540"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9410f174cd83e9dbb9355999cfc02db258603666_a9ffa660-2c81-4712-b312-bc84ddcd78f5.webp?v=1714970540","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2590050455b00b61be8cd2b9da2c8c823f6c27a_d5468e04-1521-4acb-af94-2d2c3ef01df2.webp?v=1714970542","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddc1b7a484e4bf1d8f2b27e7a6c8e37fa95293e9_1300d971-c2a5-4ade-a6bd-d49d291ff819.webp?v=1714970545","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adc41097c60c24ffb14c526e49dd5c598486135d_4625e3e3-ffe8-4a36-9824-47e87c1e113b.webp?v=1714970547","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4e007c2acf5e521df4df826f8795603ec8ee60_573e52d4-b5eb-4328-8244-889481f74ca2.webp?v=1714970549","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c186563e976daada9e826ceafe1d49bffb4d2ca_a94860fd-f058-4067-80a0-77723cbbd62b.webp?v=1714970552","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a4aa57cff0e8ac0515a9455519701a7a8fe4cb3_7769f476-da9b-4825-8ee5-dfb731fb7e10.webp?v=1714970554","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e575edf82ee780783124fb1ab6daede9988f1518_68254b7a-1f8e-4d1b-93c3-537c8e6b1a7b.webp?v=1714970556","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50b8f3a9d70eb62133fbbbd1891bf45b8722cb2a_d9e06cf1-1b37-4738-b0aa-7bca7c0c5265.webp?v=1714970559","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/918fe0fa4950f354972cc6efa9d9fcd06ff5fc21_1994336c-54f6-40e7-9970-5c1243545ee3.webp?v=1714970561"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9410f174cd83e9dbb9355999cfc02db258603666_a9ffa660-2c81-4712-b312-bc84ddcd78f5.webp?v=1714970540","options":["color"],"media":[{"alt":null,"id":23896392826979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9410f174cd83e9dbb9355999cfc02db258603666_a9ffa660-2c81-4712-b312-bc84ddcd78f5.webp?v=1714970540"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9410f174cd83e9dbb9355999cfc02db258603666_a9ffa660-2c81-4712-b312-bc84ddcd78f5.webp?v=1714970540","width":2000},{"alt":null,"id":23896393220195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2590050455b00b61be8cd2b9da2c8c823f6c27a_d5468e04-1521-4acb-af94-2d2c3ef01df2.webp?v=1714970542"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2590050455b00b61be8cd2b9da2c8c823f6c27a_d5468e04-1521-4acb-af94-2d2c3ef01df2.webp?v=1714970542","width":2000},{"alt":null,"id":23896393744483,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddc1b7a484e4bf1d8f2b27e7a6c8e37fa95293e9_1300d971-c2a5-4ade-a6bd-d49d291ff819.webp?v=1714970545"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddc1b7a484e4bf1d8f2b27e7a6c8e37fa95293e9_1300d971-c2a5-4ade-a6bd-d49d291ff819.webp?v=1714970545","width":2000},{"alt":null,"id":23896394465379,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adc41097c60c24ffb14c526e49dd5c598486135d_4625e3e3-ffe8-4a36-9824-47e87c1e113b.webp?v=1714970547"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adc41097c60c24ffb14c526e49dd5c598486135d_4625e3e3-ffe8-4a36-9824-47e87c1e113b.webp?v=1714970547","width":2000},{"alt":null,"id":23896394956899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4e007c2acf5e521df4df826f8795603ec8ee60_573e52d4-b5eb-4328-8244-889481f74ca2.webp?v=1714970549"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4e007c2acf5e521df4df826f8795603ec8ee60_573e52d4-b5eb-4328-8244-889481f74ca2.webp?v=1714970549","width":2000},{"alt":null,"id":23896395415651,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c186563e976daada9e826ceafe1d49bffb4d2ca_a94860fd-f058-4067-80a0-77723cbbd62b.webp?v=1714970552"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c186563e976daada9e826ceafe1d49bffb4d2ca_a94860fd-f058-4067-80a0-77723cbbd62b.webp?v=1714970552","width":2000},{"alt":null,"id":23896396169315,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a4aa57cff0e8ac0515a9455519701a7a8fe4cb3_7769f476-da9b-4825-8ee5-dfb731fb7e10.webp?v=1714970554"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a4aa57cff0e8ac0515a9455519701a7a8fe4cb3_7769f476-da9b-4825-8ee5-dfb731fb7e10.webp?v=1714970554","width":2000},{"alt":null,"id":23896397119587,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e575edf82ee780783124fb1ab6daede9988f1518_68254b7a-1f8e-4d1b-93c3-537c8e6b1a7b.webp?v=1714970556"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e575edf82ee780783124fb1ab6daede9988f1518_68254b7a-1f8e-4d1b-93c3-537c8e6b1a7b.webp?v=1714970556","width":2000},{"alt":null,"id":23896397480035,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50b8f3a9d70eb62133fbbbd1891bf45b8722cb2a_d9e06cf1-1b37-4738-b0aa-7bca7c0c5265.webp?v=1714970559"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50b8f3a9d70eb62133fbbbd1891bf45b8722cb2a_d9e06cf1-1b37-4738-b0aa-7bca7c0c5265.webp?v=1714970559","width":2000},{"alt":null,"id":23896398102627,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/918fe0fa4950f354972cc6efa9d9fcd06ff5fc21_1994336c-54f6-40e7-9970-5c1243545ee3.webp?v=1714970561"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/918fe0fa4950f354972cc6efa9d9fcd06ff5fc21_1994336c-54f6-40e7-9970-5c1243545ee3.webp?v=1714970561","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916511387747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-RL01","requires_shipping":true,"taxable":true,"featured_image":{"id":31490985656419,"product_id":7416013488227,"position":1,"created_at":"2024-05-06T12:42:20+08:00","updated_at":"2024-05-06T12:42:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9410f174cd83e9dbb9355999cfc02db258603666_a9ffa660-2c81-4712-b312-bc84ddcd78f5.webp?v=1714970540","variant_ids":[41916511387747]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-RL01","featured_media":{"alt":null,"id":23896392826979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9410f174cd83e9dbb9355999cfc02db258603666_a9ffa660-2c81-4712-b312-bc84ddcd78f5.webp?v=1714970540"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916511387747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-RL01","requires_shipping":true,"taxable":true,"featured_image":{"id":31490985656419,"product_id":7416013488227,"position":1,"created_at":"2024-05-06T12:42:20+08:00","updated_at":"2024-05-06T12:42:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9410f174cd83e9dbb9355999cfc02db258603666_a9ffa660-2c81-4712-b312-bc84ddcd78f5.webp?v=1714970540","variant_ids":[41916511387747]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-RL01","featured_media":{"alt":null,"id":23896392826979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9410f174cd83e9dbb9355999cfc02db258603666_a9ffa660-2c81-4712-b312-bc84ddcd78f5.webp?v=1714970540"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(document).ready(function() { var productImg = $product.images[0]; var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]); var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate') ? [productImg, bumperImg] : [bumperImg, productImg]; window.mergeProductImages(layers).then(function (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: "停產" }