$product = {"id":7911334543459,"title":"iPhone XS Mod NX PosterLad Arial","handle":"iphone-xs-mod-nx-printable-pos01","description":null,"published_at":"2025-11-05T10:27:21+08:00","created_at":"2025-11-04T10:59:04+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-posterlad","device-iPhone XS","merge","reseller-posterlad"],"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":43812350754915,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108424-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729452339299,"product_id":7911334543459,"position":4,"created_at":"2025-11-04T10:59:09+08:00","updated_at":"2025-11-04T10:59:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412802bc3ed9be9c084137c1667261914d81b87f.webp?v=1762225151","variant_ids":[43812350754915]},"available":true,"name":"iPhone XS Mod NX PosterLad Arial - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-POS01","featured_media":{"alt":null,"id":26297319915619,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412802bc3ed9be9c084137c1667261914d81b87f.webp?v=1762225151"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867cc5bcacc6fbd2825d12822780f7d7de82cb7f.webp?v=1762225148","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ca7613616e968d1e78cf5cd8521461e461bf095.webp?v=1762225149","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf2350d4d753260610c50a7ca8494860b5c135f.webp?v=1762225150","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412802bc3ed9be9c084137c1667261914d81b87f.webp?v=1762225151","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8fe97e42c8d03799433cca7c766d0ff100546c6.webp?v=1762225152","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2968e6735d0cff5102dac74ff726dee8ad17b22.webp?v=1762225153","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/008c93226607b11dc15819ba7706c4e774eb765b.webp?v=1762225153","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a9138cd65ea6fa037a92d76fe15427bf8b74b9a.webp?v=1762225154","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dce9a217ade782f358fbb8b0638f035ff53472c5.webp?v=1762225155","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9792f529f394e4c866a9a277a80c69f2c85f1a79.webp?v=1762225156"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867cc5bcacc6fbd2825d12822780f7d7de82cb7f.webp?v=1762225148","options":["color"],"media":[{"alt":null,"id":26297319030883,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867cc5bcacc6fbd2825d12822780f7d7de82cb7f.webp?v=1762225148"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867cc5bcacc6fbd2825d12822780f7d7de82cb7f.webp?v=1762225148","width":2000},{"alt":null,"id":26297319293027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ca7613616e968d1e78cf5cd8521461e461bf095.webp?v=1762225149"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ca7613616e968d1e78cf5cd8521461e461bf095.webp?v=1762225149","width":2000},{"alt":null,"id":26297319620707,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf2350d4d753260610c50a7ca8494860b5c135f.webp?v=1762225150"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf2350d4d753260610c50a7ca8494860b5c135f.webp?v=1762225150","width":2000},{"alt":null,"id":26297319915619,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412802bc3ed9be9c084137c1667261914d81b87f.webp?v=1762225151"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412802bc3ed9be9c084137c1667261914d81b87f.webp?v=1762225151","width":2000},{"alt":null,"id":26297320177763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8fe97e42c8d03799433cca7c766d0ff100546c6.webp?v=1762225152"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8fe97e42c8d03799433cca7c766d0ff100546c6.webp?v=1762225152","width":2000},{"alt":null,"id":26297320538211,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2968e6735d0cff5102dac74ff726dee8ad17b22.webp?v=1762225153"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2968e6735d0cff5102dac74ff726dee8ad17b22.webp?v=1762225153","width":2000},{"alt":null,"id":26297320800355,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/008c93226607b11dc15819ba7706c4e774eb765b.webp?v=1762225153"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/008c93226607b11dc15819ba7706c4e774eb765b.webp?v=1762225153","width":2000},{"alt":null,"id":26297321062499,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a9138cd65ea6fa037a92d76fe15427bf8b74b9a.webp?v=1762225154"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a9138cd65ea6fa037a92d76fe15427bf8b74b9a.webp?v=1762225154","width":2000},{"alt":null,"id":26297321259107,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dce9a217ade782f358fbb8b0638f035ff53472c5.webp?v=1762225155"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dce9a217ade782f358fbb8b0638f035ff53472c5.webp?v=1762225155","width":2000},{"alt":null,"id":26297321521251,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9792f529f394e4c866a9a277a80c69f2c85f1a79.webp?v=1762225156"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9792f529f394e4c866a9a277a80c69f2c85f1a79.webp?v=1762225156","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43812350754915,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108424-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729452339299,"product_id":7911334543459,"position":4,"created_at":"2025-11-04T10:59:09+08:00","updated_at":"2025-11-04T10:59:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412802bc3ed9be9c084137c1667261914d81b87f.webp?v=1762225151","variant_ids":[43812350754915]},"available":true,"name":"iPhone XS Mod NX PosterLad Arial - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-POS01","featured_media":{"alt":null,"id":26297319915619,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412802bc3ed9be9c084137c1667261914d81b87f.webp?v=1762225151"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43812350754915,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108424-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729452339299,"product_id":7911334543459,"position":4,"created_at":"2025-11-04T10:59:09+08:00","updated_at":"2025-11-04T10:59:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412802bc3ed9be9c084137c1667261914d81b87f.webp?v=1762225151","variant_ids":[43812350754915]},"available":true,"name":"iPhone XS Mod NX PosterLad Arial - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-POS01","featured_media":{"alt":null,"id":26297319915619,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412802bc3ed9be9c084137c1667261914d81b87f.webp?v=1762225151"}},"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: "停產" }