$product = {"id":7911199801443,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) PosterLad 植物","handle":"iphone-12-mini-mod-nx-magsafe-printable-pos06","description":null,"published_at":"2025-11-05T10:46:35+08:00","created_at":"2025-11-04T10:35:47+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-posterlad","device-iPhone 12 Mini","merge","reseller-posterlad"],"price":110000,"price_min":110000,"price_max":110000,"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":43811967860835,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-POS06","requires_shipping":true,"taxable":true,"featured_image":{"id":34729097166947,"product_id":7911199801443,"position":2,"created_at":"2025-11-04T10:35:50+08:00","updated_at":"2025-11-04T10:35:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e1e9bb1b7bc4d65e55387e69d4d6e14e42894e9.webp?v=1762223752","variant_ids":[43811967860835]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) PosterLad 植物 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-POS06","featured_media":{"alt":null,"id":26296965595235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e1e9bb1b7bc4d65e55387e69d4d6e14e42894e9.webp?v=1762223752"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d60eb50b2aa910594a34d1ada8dbf2f42d18e6c.webp?v=1762223751","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e1e9bb1b7bc4d65e55387e69d4d6e14e42894e9.webp?v=1762223752","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637c377bfa89aa7418c316b253dad546735146ae.webp?v=1762223753","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bcffae6fcaf4fe1477e4b91736ddd6970bade9d.webp?v=1762223754","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b089dc8ccfeeee2abcf3986edc7dbd2f0e20a31.webp?v=1762223754","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6e93b542ec90fac0d415bffe5539fea3ed3222d.webp?v=1762223755","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6c3a1c1836c3e264ff8dc3dc071168e3dc49f9d.webp?v=1762223756","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7fd4638899e6d8285217652bfda455f598a6d6f.webp?v=1762223757","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6ed8e8a98e9e746b704df06ee64378f439cb71a.webp?v=1762223757","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eff2886a0ddc24c4b9f936da5f016a78e54aaf62.webp?v=1762223758","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b41751218ae20ac930012a6a2d4c807146d009df.webp?v=1762223759"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d60eb50b2aa910594a34d1ada8dbf2f42d18e6c.webp?v=1762223751","options":["color"],"media":[{"alt":null,"id":26296965431395,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d60eb50b2aa910594a34d1ada8dbf2f42d18e6c.webp?v=1762223751"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d60eb50b2aa910594a34d1ada8dbf2f42d18e6c.webp?v=1762223751","width":2000},{"alt":null,"id":26296965595235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e1e9bb1b7bc4d65e55387e69d4d6e14e42894e9.webp?v=1762223752"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e1e9bb1b7bc4d65e55387e69d4d6e14e42894e9.webp?v=1762223752","width":2000},{"alt":null,"id":26296965791843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637c377bfa89aa7418c316b253dad546735146ae.webp?v=1762223753"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637c377bfa89aa7418c316b253dad546735146ae.webp?v=1762223753","width":2000},{"alt":null,"id":26296966021219,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bcffae6fcaf4fe1477e4b91736ddd6970bade9d.webp?v=1762223754"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bcffae6fcaf4fe1477e4b91736ddd6970bade9d.webp?v=1762223754","width":2000},{"alt":null,"id":26296966152291,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b089dc8ccfeeee2abcf3986edc7dbd2f0e20a31.webp?v=1762223754"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b089dc8ccfeeee2abcf3986edc7dbd2f0e20a31.webp?v=1762223754","width":2000},{"alt":null,"id":26296966316131,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6e93b542ec90fac0d415bffe5539fea3ed3222d.webp?v=1762223755"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6e93b542ec90fac0d415bffe5539fea3ed3222d.webp?v=1762223755","width":2000},{"alt":null,"id":26296966545507,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6c3a1c1836c3e264ff8dc3dc071168e3dc49f9d.webp?v=1762223756"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6c3a1c1836c3e264ff8dc3dc071168e3dc49f9d.webp?v=1762223756","width":2000},{"alt":null,"id":26296966742115,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7fd4638899e6d8285217652bfda455f598a6d6f.webp?v=1762223757"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7fd4638899e6d8285217652bfda455f598a6d6f.webp?v=1762223757","width":2000},{"alt":null,"id":26296966840419,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6ed8e8a98e9e746b704df06ee64378f439cb71a.webp?v=1762223757"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6ed8e8a98e9e746b704df06ee64378f439cb71a.webp?v=1762223757","width":2000},{"alt":null,"id":26296966905955,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eff2886a0ddc24c4b9f936da5f016a78e54aaf62.webp?v=1762223758"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eff2886a0ddc24c4b9f936da5f016a78e54aaf62.webp?v=1762223758","width":2000},{"alt":null,"id":26296967102563,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b41751218ae20ac930012a6a2d4c807146d009df.webp?v=1762223759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b41751218ae20ac930012a6a2d4c807146d009df.webp?v=1762223759","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43811967860835,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-POS06","requires_shipping":true,"taxable":true,"featured_image":{"id":34729097166947,"product_id":7911199801443,"position":2,"created_at":"2025-11-04T10:35:50+08:00","updated_at":"2025-11-04T10:35:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e1e9bb1b7bc4d65e55387e69d4d6e14e42894e9.webp?v=1762223752","variant_ids":[43811967860835]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) PosterLad 植物 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-POS06","featured_media":{"alt":null,"id":26296965595235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e1e9bb1b7bc4d65e55387e69d4d6e14e42894e9.webp?v=1762223752"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43811967860835,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-POS06","requires_shipping":true,"taxable":true,"featured_image":{"id":34729097166947,"product_id":7911199801443,"position":2,"created_at":"2025-11-04T10:35:50+08:00","updated_at":"2025-11-04T10:35:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e1e9bb1b7bc4d65e55387e69d4d6e14e42894e9.webp?v=1762223752","variant_ids":[43811967860835]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) PosterLad 植物 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-POS06","featured_media":{"alt":null,"id":26296965595235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e1e9bb1b7bc4d65e55387e69d4d6e14e42894e9.webp?v=1762223752"}},"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: "停產" }