$product = {"id":7892688863331,"title":"iPhone XS Mod NX Aaron Chang Waiting for","handle":"iphone-xs-mod-nx-printable-aar08","description":null,"published_at":"2025-10-03T09:39:40+08:00","created_at":"2025-10-02T10:11:58+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-aaronchang","device-iPhone XS","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":43756781568099,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108424-AAR08","requires_shipping":true,"taxable":true,"featured_image":{"id":34543833743459,"product_id":7892688863331,"position":5,"created_at":"2025-10-02T10:12:06+08:00","updated_at":"2025-10-02T10:12:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9858884cdd04a7a9d2fe3ff2c6a73a88dc1e64ee.webp?v=1759371128","variant_ids":[43756781568099]},"available":true,"name":"iPhone XS Mod NX Aaron Chang Waiting for - 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-AAR08","featured_media":{"alt":null,"id":26113588625507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9858884cdd04a7a9d2fe3ff2c6a73a88dc1e64ee.webp?v=1759371128"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a4e3695a5bec91809769b3ffd92412ebb1d8602.webp?v=1759371124","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c33939365ffc50ea6e450c87f34f8ee73fd115a2.webp?v=1759371125","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c3523b43f8e1f4f8b8f7c7103c4194edd3e52dd.webp?v=1759371125","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b90e363006967411178a7b88f10a9bea9768be79.webp?v=1759371126","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9858884cdd04a7a9d2fe3ff2c6a73a88dc1e64ee.webp?v=1759371128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57f2f9ce926ea38e52c059e31108e2bb48d1b195.webp?v=1759371129","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16e31e9f1bed2d3e7916e0e1daf55484a4ddf063.webp?v=1759371130","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3e0755b33390f48c18e6029406906ce7a5bf037.webp?v=1759371130","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/477b85111b47d0fc314bea27f88442cb3b0eee1c.webp?v=1759371131","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce2895a62c686dfa9433588ae3350c855bd65ba9.webp?v=1759371132"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a4e3695a5bec91809769b3ffd92412ebb1d8602.webp?v=1759371124","options":["color"],"media":[{"alt":null,"id":26113587708003,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a4e3695a5bec91809769b3ffd92412ebb1d8602.webp?v=1759371124"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a4e3695a5bec91809769b3ffd92412ebb1d8602.webp?v=1759371124","width":2000},{"alt":null,"id":26113588002915,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c33939365ffc50ea6e450c87f34f8ee73fd115a2.webp?v=1759371125"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c33939365ffc50ea6e450c87f34f8ee73fd115a2.webp?v=1759371125","width":2000},{"alt":null,"id":26113588133987,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c3523b43f8e1f4f8b8f7c7103c4194edd3e52dd.webp?v=1759371125"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c3523b43f8e1f4f8b8f7c7103c4194edd3e52dd.webp?v=1759371125","width":2000},{"alt":null,"id":26113588428899,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b90e363006967411178a7b88f10a9bea9768be79.webp?v=1759371126"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b90e363006967411178a7b88f10a9bea9768be79.webp?v=1759371126","width":2000},{"alt":null,"id":26113588625507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9858884cdd04a7a9d2fe3ff2c6a73a88dc1e64ee.webp?v=1759371128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9858884cdd04a7a9d2fe3ff2c6a73a88dc1e64ee.webp?v=1759371128","width":2000},{"alt":null,"id":26113588723811,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57f2f9ce926ea38e52c059e31108e2bb48d1b195.webp?v=1759371129"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57f2f9ce926ea38e52c059e31108e2bb48d1b195.webp?v=1759371129","width":2000},{"alt":null,"id":26113588887651,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16e31e9f1bed2d3e7916e0e1daf55484a4ddf063.webp?v=1759371130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16e31e9f1bed2d3e7916e0e1daf55484a4ddf063.webp?v=1759371130","width":2000},{"alt":null,"id":26113589051491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3e0755b33390f48c18e6029406906ce7a5bf037.webp?v=1759371130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3e0755b33390f48c18e6029406906ce7a5bf037.webp?v=1759371130","width":2000},{"alt":null,"id":26113589182563,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/477b85111b47d0fc314bea27f88442cb3b0eee1c.webp?v=1759371131"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/477b85111b47d0fc314bea27f88442cb3b0eee1c.webp?v=1759371131","width":2000},{"alt":null,"id":26113589411939,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce2895a62c686dfa9433588ae3350c855bd65ba9.webp?v=1759371132"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce2895a62c686dfa9433588ae3350c855bd65ba9.webp?v=1759371132","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43756781568099,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108424-AAR08","requires_shipping":true,"taxable":true,"featured_image":{"id":34543833743459,"product_id":7892688863331,"position":5,"created_at":"2025-10-02T10:12:06+08:00","updated_at":"2025-10-02T10:12:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9858884cdd04a7a9d2fe3ff2c6a73a88dc1e64ee.webp?v=1759371128","variant_ids":[43756781568099]},"available":true,"name":"iPhone XS Mod NX Aaron Chang Waiting for - 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-AAR08","featured_media":{"alt":null,"id":26113588625507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9858884cdd04a7a9d2fe3ff2c6a73a88dc1e64ee.webp?v=1759371128"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43756781568099,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108424-AAR08","requires_shipping":true,"taxable":true,"featured_image":{"id":34543833743459,"product_id":7892688863331,"position":5,"created_at":"2025-10-02T10:12:06+08:00","updated_at":"2025-10-02T10:12:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9858884cdd04a7a9d2fe3ff2c6a73a88dc1e64ee.webp?v=1759371128","variant_ids":[43756781568099]},"available":true,"name":"iPhone XS Mod NX Aaron Chang Waiting for - 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-AAR08","featured_media":{"alt":null,"id":26113588625507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9858884cdd04a7a9d2fe3ff2c6a73a88dc1e64ee.webp?v=1759371128"}},"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: "停產" }