$product = {"id":7892685520995,"title":"iPhone 12 mini Mod NX Aaron Chang Skaterboy","handle":"iphone-12-mini-mod-nx-printable-aar03","description":null,"published_at":"2025-10-03T09:40:11+08:00","created_at":"2025-10-02T10:11:06+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-aaronchang","device-iPhone 12 Mini","merge","reseller-aaronchang"],"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":43756769083491,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-AAR03","requires_shipping":true,"taxable":true,"featured_image":{"id":34543821095011,"product_id":7892685520995,"position":6,"created_at":"2025-10-02T10:11:16+08:00","updated_at":"2025-10-02T10:11:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df4bc0c59838bd6c9e9e41795c8de2ab3442478.webp?v=1759371078","variant_ids":[43756769083491]},"available":true,"name":"iPhone 12 mini Mod NX Aaron Chang Skaterboy - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-AAR03","featured_media":{"alt":null,"id":26113575977059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df4bc0c59838bd6c9e9e41795c8de2ab3442478.webp?v=1759371078"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/918f3c00edb440de0dc8c738d0372c778a1230e1.webp?v=1759371074","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec6e21470e0659fce3b033366583832bad82cc2.webp?v=1759371076","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50ebbe98af6be4762ded58c41537635f846bcad6.webp?v=1759371076","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64a951dad4e9a5e9c192925bb6e3a7882c4baead.webp?v=1759371078","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22a136e13b8774823a5a4dba9a6a75abc3aabfcf.webp?v=1759371078","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df4bc0c59838bd6c9e9e41795c8de2ab3442478.webp?v=1759371078","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80ccc07cdb117b480fcbfc508b071845820cb2d6.webp?v=1759371079","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa23c688fd0638dc7b01778a85c50c6a2e2535b3.webp?v=1759371080","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/892cee8de7708ebb536ad40f173d3e4209450069.webp?v=1759371081","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a47a200b3e97e154bb7fb5bb6d84098b25978c0.webp?v=1759371082","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5faf38e1dfea5ad973e8211c662853f38fee99af.webp?v=1759371082"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/918f3c00edb440de0dc8c738d0372c778a1230e1.webp?v=1759371074","options":["color"],"media":[{"alt":null,"id":26113574404195,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/918f3c00edb440de0dc8c738d0372c778a1230e1.webp?v=1759371074"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/918f3c00edb440de0dc8c738d0372c778a1230e1.webp?v=1759371074","width":2000},{"alt":null,"id":26113574928483,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec6e21470e0659fce3b033366583832bad82cc2.webp?v=1759371076"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec6e21470e0659fce3b033366583832bad82cc2.webp?v=1759371076","width":2000},{"alt":null,"id":26113575157859,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50ebbe98af6be4762ded58c41537635f846bcad6.webp?v=1759371076"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50ebbe98af6be4762ded58c41537635f846bcad6.webp?v=1759371076","width":2000},{"alt":null,"id":26113575452771,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64a951dad4e9a5e9c192925bb6e3a7882c4baead.webp?v=1759371078"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64a951dad4e9a5e9c192925bb6e3a7882c4baead.webp?v=1759371078","width":2000},{"alt":null,"id":26113575714915,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22a136e13b8774823a5a4dba9a6a75abc3aabfcf.webp?v=1759371078"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22a136e13b8774823a5a4dba9a6a75abc3aabfcf.webp?v=1759371078","width":2000},{"alt":null,"id":26113575977059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df4bc0c59838bd6c9e9e41795c8de2ab3442478.webp?v=1759371078"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df4bc0c59838bd6c9e9e41795c8de2ab3442478.webp?v=1759371078","width":2000},{"alt":null,"id":26113576206435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80ccc07cdb117b480fcbfc508b071845820cb2d6.webp?v=1759371079"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80ccc07cdb117b480fcbfc508b071845820cb2d6.webp?v=1759371079","width":2000},{"alt":null,"id":26113576370275,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa23c688fd0638dc7b01778a85c50c6a2e2535b3.webp?v=1759371080"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa23c688fd0638dc7b01778a85c50c6a2e2535b3.webp?v=1759371080","width":2000},{"alt":null,"id":26113576599651,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/892cee8de7708ebb536ad40f173d3e4209450069.webp?v=1759371081"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/892cee8de7708ebb536ad40f173d3e4209450069.webp?v=1759371081","width":2000},{"alt":null,"id":26113576927331,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a47a200b3e97e154bb7fb5bb6d84098b25978c0.webp?v=1759371082"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a47a200b3e97e154bb7fb5bb6d84098b25978c0.webp?v=1759371082","width":2000},{"alt":null,"id":26113577091171,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5faf38e1dfea5ad973e8211c662853f38fee99af.webp?v=1759371082"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5faf38e1dfea5ad973e8211c662853f38fee99af.webp?v=1759371082","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43756769083491,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-AAR03","requires_shipping":true,"taxable":true,"featured_image":{"id":34543821095011,"product_id":7892685520995,"position":6,"created_at":"2025-10-02T10:11:16+08:00","updated_at":"2025-10-02T10:11:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df4bc0c59838bd6c9e9e41795c8de2ab3442478.webp?v=1759371078","variant_ids":[43756769083491]},"available":true,"name":"iPhone 12 mini Mod NX Aaron Chang Skaterboy - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-AAR03","featured_media":{"alt":null,"id":26113575977059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df4bc0c59838bd6c9e9e41795c8de2ab3442478.webp?v=1759371078"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43756769083491,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-AAR03","requires_shipping":true,"taxable":true,"featured_image":{"id":34543821095011,"product_id":7892685520995,"position":6,"created_at":"2025-10-02T10:11:16+08:00","updated_at":"2025-10-02T10:11:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df4bc0c59838bd6c9e9e41795c8de2ab3442478.webp?v=1759371078","variant_ids":[43756769083491]},"available":true,"name":"iPhone 12 mini Mod NX Aaron Chang Skaterboy - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-AAR03","featured_media":{"alt":null,"id":26113575977059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df4bc0c59838bd6c9e9e41795c8de2ab3442478.webp?v=1759371078"}},"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: "停產" }