$product = {"id":7911332413539,"title":"iPhone XS Mod NX PosterLad NOW","handle":"iphone-xs-mod-nx-printable-pos05","description":null,"published_at":"2025-11-05T10:27:37+08:00","created_at":"2025-11-04T10:58:42+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":43812342464611,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108424-POS05","requires_shipping":true,"taxable":true,"featured_image":{"id":34729445884003,"product_id":7911332413539,"position":5,"created_at":"2025-11-04T10:58:48+08:00","updated_at":"2025-11-04T10:58:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80630c72fdc71fb4b608ad959d218e7276ef4986.webp?v=1762225130","variant_ids":[43812342464611]},"available":true,"name":"iPhone XS Mod NX PosterLad NOW - 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-POS05","featured_media":{"alt":null,"id":26297313460323,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80630c72fdc71fb4b608ad959d218e7276ef4986.webp?v=1762225130"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/660c8bd05cbcd8951a83b2e666529c731e81e272.webp?v=1762225126","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be6228d3a2e8326929b27012608bda2799efdb92.webp?v=1762225127","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bacc298058ab546a065830044c8b5cc3b394b264.webp?v=1762225128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f67c13186edaf1048c75b3950839ca0414e9351.webp?v=1762225129","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80630c72fdc71fb4b608ad959d218e7276ef4986.webp?v=1762225130","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49c6f38035a4093107ca05f14115351df488add5.webp?v=1762225131","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/439c1f5472be98b9b87dc56146a3d62ec1d5a341.webp?v=1762225132","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/797bf80b793276cfd33b42eea84111087d9af631.webp?v=1762225132","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ceeee662356b2487e00c5eb4e68c57ead1513563.webp?v=1762225133","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/759286f52ae2afd84929ce4e04d6776a45a606ad.webp?v=1762225134"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/660c8bd05cbcd8951a83b2e666529c731e81e272.webp?v=1762225126","options":["color"],"media":[{"alt":null,"id":26297312510051,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/660c8bd05cbcd8951a83b2e666529c731e81e272.webp?v=1762225126"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/660c8bd05cbcd8951a83b2e666529c731e81e272.webp?v=1762225126","width":2000},{"alt":null,"id":26297312739427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be6228d3a2e8326929b27012608bda2799efdb92.webp?v=1762225127"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be6228d3a2e8326929b27012608bda2799efdb92.webp?v=1762225127","width":2000},{"alt":null,"id":26297312968803,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bacc298058ab546a065830044c8b5cc3b394b264.webp?v=1762225128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bacc298058ab546a065830044c8b5cc3b394b264.webp?v=1762225128","width":2000},{"alt":null,"id":26297313230947,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f67c13186edaf1048c75b3950839ca0414e9351.webp?v=1762225129"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f67c13186edaf1048c75b3950839ca0414e9351.webp?v=1762225129","width":2000},{"alt":null,"id":26297313460323,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80630c72fdc71fb4b608ad959d218e7276ef4986.webp?v=1762225130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80630c72fdc71fb4b608ad959d218e7276ef4986.webp?v=1762225130","width":2000},{"alt":null,"id":26297313755235,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49c6f38035a4093107ca05f14115351df488add5.webp?v=1762225131"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49c6f38035a4093107ca05f14115351df488add5.webp?v=1762225131","width":2000},{"alt":null,"id":26297314181219,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/439c1f5472be98b9b87dc56146a3d62ec1d5a341.webp?v=1762225132"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/439c1f5472be98b9b87dc56146a3d62ec1d5a341.webp?v=1762225132","width":2000},{"alt":null,"id":26297314508899,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/797bf80b793276cfd33b42eea84111087d9af631.webp?v=1762225132"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/797bf80b793276cfd33b42eea84111087d9af631.webp?v=1762225132","width":2000},{"alt":null,"id":26297314836579,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ceeee662356b2487e00c5eb4e68c57ead1513563.webp?v=1762225133"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ceeee662356b2487e00c5eb4e68c57ead1513563.webp?v=1762225133","width":2000},{"alt":null,"id":26297315229795,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/759286f52ae2afd84929ce4e04d6776a45a606ad.webp?v=1762225134"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/759286f52ae2afd84929ce4e04d6776a45a606ad.webp?v=1762225134","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43812342464611,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108424-POS05","requires_shipping":true,"taxable":true,"featured_image":{"id":34729445884003,"product_id":7911332413539,"position":5,"created_at":"2025-11-04T10:58:48+08:00","updated_at":"2025-11-04T10:58:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80630c72fdc71fb4b608ad959d218e7276ef4986.webp?v=1762225130","variant_ids":[43812342464611]},"available":true,"name":"iPhone XS Mod NX PosterLad NOW - 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-POS05","featured_media":{"alt":null,"id":26297313460323,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80630c72fdc71fb4b608ad959d218e7276ef4986.webp?v=1762225130"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43812342464611,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108424-POS05","requires_shipping":true,"taxable":true,"featured_image":{"id":34729445884003,"product_id":7911332413539,"position":5,"created_at":"2025-11-04T10:58:48+08:00","updated_at":"2025-11-04T10:58:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80630c72fdc71fb4b608ad959d218e7276ef4986.webp?v=1762225130","variant_ids":[43812342464611]},"available":true,"name":"iPhone XS Mod NX PosterLad NOW - 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-POS05","featured_media":{"alt":null,"id":26297313460323,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80630c72fdc71fb4b608ad959d218e7276ef4986.webp?v=1762225130"}},"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: "停產" }