$product = {"id":7408606412899,"title":"犀牛盾Mod NX手機殼 - iPhone 11 Pro Max - 【聯名設計款】 - Batman - 經典Logo","handle":"iphone-11-pro-max-mod-nx-printable-sb11","description":"","published_at":"2024-06-11T16:41:52+08:00","created_at":"2024-05-03T17:11:46+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 11 Pro Max","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":41887327879267,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0114924-SB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472973348963,"product_id":7408606412899,"position":6,"created_at":"2024-05-03T17:12:04+08:00","updated_at":"2025-01-22T14:52:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6182ddc1ca3d4c9df4e92f048aa5423390cd6faf_089c9653-26bb-4739-a302-576b0f164328.webp?v=1737528760","variant_ids":[41887327879267]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 11 Pro Max - 【聯名設計款】 - Batman - 經典Logo - 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":"NPB0114924-SB11","featured_media":{"alt":null,"id":23877895028835,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6182ddc1ca3d4c9df4e92f048aa5423390cd6faf_089c9653-26bb-4739-a302-576b0f164328.webp?v=1737528760"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c9174a37cede6a6892ee2e8d893a4e09ae69696_3640ac6b-ecd1-4a57-94bd-0e0a5c719fbf.webp?v=1737528759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5733058af1f6f8f4c6411afaa56c4c523481a884_0517d361-eb0e-405f-9ab1-896cd53a23ba.webp?v=1737528759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcbdc5eacecc606a4cbc15aa93b262d74cf9164f_5fb0c782-4015-45c6-8277-4e5583439be7.webp?v=1737528759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04cfddb7775956c95a02ed51ae6ef68e780ebe7_997fd166-7f01-4f00-a324-bde36f8c90f1.webp?v=1737528759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7d18d8469bd7ac9da801c7cd372c3cea863e8f4_3f33f79f-2c74-48e2-9148-c4f17dc5a8d3.webp?v=1737528759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6182ddc1ca3d4c9df4e92f048aa5423390cd6faf_089c9653-26bb-4739-a302-576b0f164328.webp?v=1737528760","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8359e2370dfaacb54232d8a59e54acd76d8245d9_938b9f6a-41dc-401b-90df-eee531de2421.webp?v=1737528760","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f47f3f04d940976a5a7df7d553b370d5dae6cfa_ee68b87c-26f9-4ba2-983e-d2403996df23.webp?v=1737528760"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c9174a37cede6a6892ee2e8d893a4e09ae69696_3640ac6b-ecd1-4a57-94bd-0e0a5c719fbf.webp?v=1737528759","options":["color"],"media":[{"alt":null,"id":23877890998371,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c9174a37cede6a6892ee2e8d893a4e09ae69696_3640ac6b-ecd1-4a57-94bd-0e0a5c719fbf.webp?v=1737528759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c9174a37cede6a6892ee2e8d893a4e09ae69696_3640ac6b-ecd1-4a57-94bd-0e0a5c719fbf.webp?v=1737528759","width":2000},{"alt":null,"id":23877891588195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5733058af1f6f8f4c6411afaa56c4c523481a884_0517d361-eb0e-405f-9ab1-896cd53a23ba.webp?v=1737528759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5733058af1f6f8f4c6411afaa56c4c523481a884_0517d361-eb0e-405f-9ab1-896cd53a23ba.webp?v=1737528759","width":2000},{"alt":null,"id":23877892145251,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcbdc5eacecc606a4cbc15aa93b262d74cf9164f_5fb0c782-4015-45c6-8277-4e5583439be7.webp?v=1737528759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcbdc5eacecc606a4cbc15aa93b262d74cf9164f_5fb0c782-4015-45c6-8277-4e5583439be7.webp?v=1737528759","width":2000},{"alt":null,"id":23877892735075,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04cfddb7775956c95a02ed51ae6ef68e780ebe7_997fd166-7f01-4f00-a324-bde36f8c90f1.webp?v=1737528759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04cfddb7775956c95a02ed51ae6ef68e780ebe7_997fd166-7f01-4f00-a324-bde36f8c90f1.webp?v=1737528759","width":2000},{"alt":null,"id":23877893259363,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7d18d8469bd7ac9da801c7cd372c3cea863e8f4_3f33f79f-2c74-48e2-9148-c4f17dc5a8d3.webp?v=1737528759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7d18d8469bd7ac9da801c7cd372c3cea863e8f4_3f33f79f-2c74-48e2-9148-c4f17dc5a8d3.webp?v=1737528759","width":2000},{"alt":null,"id":23877895028835,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6182ddc1ca3d4c9df4e92f048aa5423390cd6faf_089c9653-26bb-4739-a302-576b0f164328.webp?v=1737528760"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6182ddc1ca3d4c9df4e92f048aa5423390cd6faf_089c9653-26bb-4739-a302-576b0f164328.webp?v=1737528760","width":2000},{"alt":null,"id":23877895553123,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8359e2370dfaacb54232d8a59e54acd76d8245d9_938b9f6a-41dc-401b-90df-eee531de2421.webp?v=1737528760"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8359e2370dfaacb54232d8a59e54acd76d8245d9_938b9f6a-41dc-401b-90df-eee531de2421.webp?v=1737528760","width":2000},{"alt":null,"id":23877896241251,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f47f3f04d940976a5a7df7d553b370d5dae6cfa_ee68b87c-26f9-4ba2-983e-d2403996df23.webp?v=1737528760"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f47f3f04d940976a5a7df7d553b370d5dae6cfa_ee68b87c-26f9-4ba2-983e-d2403996df23.webp?v=1737528760","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":""}; $bumper = null; $variants = [{"id":41887327879267,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0114924-SB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472973348963,"product_id":7408606412899,"position":6,"created_at":"2024-05-03T17:12:04+08:00","updated_at":"2025-01-22T14:52:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6182ddc1ca3d4c9df4e92f048aa5423390cd6faf_089c9653-26bb-4739-a302-576b0f164328.webp?v=1737528760","variant_ids":[41887327879267]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 11 Pro Max - 【聯名設計款】 - Batman - 經典Logo - 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":"NPB0114924-SB11","featured_media":{"alt":null,"id":23877895028835,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6182ddc1ca3d4c9df4e92f048aa5423390cd6faf_089c9653-26bb-4739-a302-576b0f164328.webp?v=1737528760"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41887327879267,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0114924-SB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472973348963,"product_id":7408606412899,"position":6,"created_at":"2024-05-03T17:12:04+08:00","updated_at":"2025-01-22T14:52:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6182ddc1ca3d4c9df4e92f048aa5423390cd6faf_089c9653-26bb-4739-a302-576b0f164328.webp?v=1737528760","variant_ids":[41887327879267]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 11 Pro Max - 【聯名設計款】 - Batman - 經典Logo - 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":"NPB0114924-SB11","featured_media":{"alt":null,"id":23877895028835,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6182ddc1ca3d4c9df4e92f048aa5423390cd6faf_089c9653-26bb-4739-a302-576b0f164328.webp?v=1737528760"}},"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: "停產" }