$product = {"id":7415947165795,"title":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Batman - 小丑拳擊學院","handle":"iphone-xs-mod-nx-printable-sb07","description":null,"published_at":"2024-06-11T16:48:38+08:00","created_at":"2024-05-06T12:29:55+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 XS","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":41915819622499,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490809757795,"product_id":7415947165795,"position":8,"created_at":"2024-05-06T12:30:16+08:00","updated_at":"2024-05-06T12:30:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b304db050c992871d0c1cbbfafe40a0ca40a6d7_c2f84417-e209-4b3a-ba3b-24540fb42924.webp?v=1714969816","variant_ids":[41915819622499]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 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":"NPB0108424-SB07","featured_media":{"alt":null,"id":23896216567907,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b304db050c992871d0c1cbbfafe40a0ca40a6d7_c2f84417-e209-4b3a-ba3b-24540fb42924.webp?v=1714969816"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/842468dedab22240f51095bc13356e0a96288cc4_97b7d25b-2828-4228-869f-f648358dfc72.webp?v=1714969798","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bd062006e31d39d168b4b8dd2052497100cf771_024d6864-a6d5-4934-9723-90bcde08179a.webp?v=1714969800","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb5bb601b5bd8970a4e20a254c9186580fa3e0aa_b05a8a75-6ae6-480f-9315-4c68ede3ad4f.webp?v=1714969803","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e032454ed482441222493daa5051cc451ab82c0d_10c49001-39bf-4789-a456-4848f0c6b91b.webp?v=1714969806","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c1e7afc90b1831a3cc9cdefc00c566ff5d81f22_d930dde1-7383-4cc7-92cc-00780b692bce.webp?v=1714969808","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ab099d00900080500db3a637b30f12b73f3d683_8b96d45e-4225-46d9-9c93-acfe976b0166.webp?v=1714969811","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbd89e3967a863e53275aeb2f1f1192563943336_a35f1695-cffb-4440-92e8-f93f51e674a5.webp?v=1714969813","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b304db050c992871d0c1cbbfafe40a0ca40a6d7_c2f84417-e209-4b3a-ba3b-24540fb42924.webp?v=1714969816","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6015fce556115430befc3d6542295bcf6778a3a3_85a96bf2-31dd-4c2c-831c-1e1158b471e3.webp?v=1714969818","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ac94b5b7933765cadee4f09bbe9b938c8247c69_420577ae-1851-4538-8a80-f515c64d1443.webp?v=1714969821"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/842468dedab22240f51095bc13356e0a96288cc4_97b7d25b-2828-4228-869f-f648358dfc72.webp?v=1714969798","options":["color"],"media":[{"alt":null,"id":23896212832355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/842468dedab22240f51095bc13356e0a96288cc4_97b7d25b-2828-4228-869f-f648358dfc72.webp?v=1714969798"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/842468dedab22240f51095bc13356e0a96288cc4_97b7d25b-2828-4228-869f-f648358dfc72.webp?v=1714969798","width":2000},{"alt":null,"id":23896213356643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bd062006e31d39d168b4b8dd2052497100cf771_024d6864-a6d5-4934-9723-90bcde08179a.webp?v=1714969800"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bd062006e31d39d168b4b8dd2052497100cf771_024d6864-a6d5-4934-9723-90bcde08179a.webp?v=1714969800","width":2000},{"alt":null,"id":23896214077539,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb5bb601b5bd8970a4e20a254c9186580fa3e0aa_b05a8a75-6ae6-480f-9315-4c68ede3ad4f.webp?v=1714969803"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb5bb601b5bd8970a4e20a254c9186580fa3e0aa_b05a8a75-6ae6-480f-9315-4c68ede3ad4f.webp?v=1714969803","width":2000},{"alt":null,"id":23896214798435,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e032454ed482441222493daa5051cc451ab82c0d_10c49001-39bf-4789-a456-4848f0c6b91b.webp?v=1714969806"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e032454ed482441222493daa5051cc451ab82c0d_10c49001-39bf-4789-a456-4848f0c6b91b.webp?v=1714969806","width":2000},{"alt":null,"id":23896215289955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c1e7afc90b1831a3cc9cdefc00c566ff5d81f22_d930dde1-7383-4cc7-92cc-00780b692bce.webp?v=1714969808"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c1e7afc90b1831a3cc9cdefc00c566ff5d81f22_d930dde1-7383-4cc7-92cc-00780b692bce.webp?v=1714969808","width":2000},{"alt":null,"id":23896215552099,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ab099d00900080500db3a637b30f12b73f3d683_8b96d45e-4225-46d9-9c93-acfe976b0166.webp?v=1714969811"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ab099d00900080500db3a637b30f12b73f3d683_8b96d45e-4225-46d9-9c93-acfe976b0166.webp?v=1714969811","width":2000},{"alt":null,"id":23896216305763,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbd89e3967a863e53275aeb2f1f1192563943336_a35f1695-cffb-4440-92e8-f93f51e674a5.webp?v=1714969813"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbd89e3967a863e53275aeb2f1f1192563943336_a35f1695-cffb-4440-92e8-f93f51e674a5.webp?v=1714969813","width":2000},{"alt":null,"id":23896216567907,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b304db050c992871d0c1cbbfafe40a0ca40a6d7_c2f84417-e209-4b3a-ba3b-24540fb42924.webp?v=1714969816"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b304db050c992871d0c1cbbfafe40a0ca40a6d7_c2f84417-e209-4b3a-ba3b-24540fb42924.webp?v=1714969816","width":2000},{"alt":null,"id":23896217288803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6015fce556115430befc3d6542295bcf6778a3a3_85a96bf2-31dd-4c2c-831c-1e1158b471e3.webp?v=1714969818"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6015fce556115430befc3d6542295bcf6778a3a3_85a96bf2-31dd-4c2c-831c-1e1158b471e3.webp?v=1714969818","width":2000},{"alt":null,"id":23896217911395,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ac94b5b7933765cadee4f09bbe9b938c8247c69_420577ae-1851-4538-8a80-f515c64d1443.webp?v=1714969821"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ac94b5b7933765cadee4f09bbe9b938c8247c69_420577ae-1851-4538-8a80-f515c64d1443.webp?v=1714969821","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41915819622499,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490809757795,"product_id":7415947165795,"position":8,"created_at":"2024-05-06T12:30:16+08:00","updated_at":"2024-05-06T12:30:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b304db050c992871d0c1cbbfafe40a0ca40a6d7_c2f84417-e209-4b3a-ba3b-24540fb42924.webp?v=1714969816","variant_ids":[41915819622499]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 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":"NPB0108424-SB07","featured_media":{"alt":null,"id":23896216567907,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b304db050c992871d0c1cbbfafe40a0ca40a6d7_c2f84417-e209-4b3a-ba3b-24540fb42924.webp?v=1714969816"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915819622499,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490809757795,"product_id":7415947165795,"position":8,"created_at":"2024-05-06T12:30:16+08:00","updated_at":"2024-05-06T12:30:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b304db050c992871d0c1cbbfafe40a0ca40a6d7_c2f84417-e209-4b3a-ba3b-24540fb42924.webp?v=1714969816","variant_ids":[41915819622499]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 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":"NPB0108424-SB07","featured_media":{"alt":null,"id":23896216567907,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b304db050c992871d0c1cbbfafe40a0ca40a6d7_c2f84417-e209-4b3a-ba3b-24540fb42924.webp?v=1714969816"}},"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: "停產" }