$product = {"id":7903446466659,"title":"iPhone 12 mini Mod NX 變種吉娃娃 Godgwawa 吉藍海域","handle":"iphone-12-mini-mod-nx-printable-it38","description":null,"published_at":"2025-10-20T09:40:07+08:00","created_at":"2025-10-20T09:30:50+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-godgwawa","device-iPhone 12 Mini","merge","reseller-godgwawa"],"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":43786684399715,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-IT38","requires_shipping":true,"taxable":true,"featured_image":{"id":34672987177059,"product_id":7903446466659,"position":4,"created_at":"2025-10-20T09:30:58+08:00","updated_at":"2025-10-20T09:31:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5d737ee8bc367e75000096a7736cbd6900c0c6.webp?v=1760923860","variant_ids":[43786684399715]},"available":true,"name":"iPhone 12 mini Mod NX 變種吉娃娃 Godgwawa 吉藍海域 - 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-IT38","featured_media":{"alt":null,"id":26242246115427,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5d737ee8bc367e75000096a7736cbd6900c0c6.webp?v=1760923860"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b92253f365a7d16c4bdea9b3cd0645c4cea8dbe7.webp?v=1760923859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebfc989d3211a344acdcda4311177e57f00c78c6.webp?v=1760923859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98921de78c4d79271301860300a08a3e20835db0.webp?v=1760923860","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5d737ee8bc367e75000096a7736cbd6900c0c6.webp?v=1760923860","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76c420384a53ef8ca1fff847bd0ce2a35519bc20.webp?v=1760923861","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32c9688abe428778d93db1ba15e579e69f7e31e3.webp?v=1760923862","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd842006111c1ea094390be3dbef81ae2fe60866.webp?v=1760923863","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44c4abda80183e27e0333b7e92ab9b8eb2ccad6.webp?v=1760923864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c805a5a797396f546ec30dac04d8a1a51d46ea1d.webp?v=1760923864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6744d4f3ccdb1397c898a7add659f72a0ce4fe6a.webp?v=1760923865","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9480e1a26b004078c36279d0a8b1c840a50441a4.webp?v=1760923865"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b92253f365a7d16c4bdea9b3cd0645c4cea8dbe7.webp?v=1760923859","options":["color"],"media":[{"alt":null,"id":26242245165155,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b92253f365a7d16c4bdea9b3cd0645c4cea8dbe7.webp?v=1760923859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b92253f365a7d16c4bdea9b3cd0645c4cea8dbe7.webp?v=1760923859","width":2000},{"alt":null,"id":26242245492835,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebfc989d3211a344acdcda4311177e57f00c78c6.webp?v=1760923859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebfc989d3211a344acdcda4311177e57f00c78c6.webp?v=1760923859","width":2000},{"alt":null,"id":26242245754979,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98921de78c4d79271301860300a08a3e20835db0.webp?v=1760923860"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98921de78c4d79271301860300a08a3e20835db0.webp?v=1760923860","width":2000},{"alt":null,"id":26242246115427,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5d737ee8bc367e75000096a7736cbd6900c0c6.webp?v=1760923860"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5d737ee8bc367e75000096a7736cbd6900c0c6.webp?v=1760923860","width":2000},{"alt":null,"id":26242246312035,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76c420384a53ef8ca1fff847bd0ce2a35519bc20.webp?v=1760923861"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76c420384a53ef8ca1fff847bd0ce2a35519bc20.webp?v=1760923861","width":2000},{"alt":null,"id":26242246574179,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32c9688abe428778d93db1ba15e579e69f7e31e3.webp?v=1760923862"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32c9688abe428778d93db1ba15e579e69f7e31e3.webp?v=1760923862","width":2000},{"alt":null,"id":26242246869091,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd842006111c1ea094390be3dbef81ae2fe60866.webp?v=1760923863"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd842006111c1ea094390be3dbef81ae2fe60866.webp?v=1760923863","width":2000},{"alt":null,"id":26242247098467,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44c4abda80183e27e0333b7e92ab9b8eb2ccad6.webp?v=1760923864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44c4abda80183e27e0333b7e92ab9b8eb2ccad6.webp?v=1760923864","width":2000},{"alt":null,"id":26242247327843,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c805a5a797396f546ec30dac04d8a1a51d46ea1d.webp?v=1760923864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c805a5a797396f546ec30dac04d8a1a51d46ea1d.webp?v=1760923864","width":2000},{"alt":null,"id":26242247458915,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6744d4f3ccdb1397c898a7add659f72a0ce4fe6a.webp?v=1760923865"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6744d4f3ccdb1397c898a7add659f72a0ce4fe6a.webp?v=1760923865","width":2000},{"alt":null,"id":26242247688291,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9480e1a26b004078c36279d0a8b1c840a50441a4.webp?v=1760923865"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9480e1a26b004078c36279d0a8b1c840a50441a4.webp?v=1760923865","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43786684399715,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-IT38","requires_shipping":true,"taxable":true,"featured_image":{"id":34672987177059,"product_id":7903446466659,"position":4,"created_at":"2025-10-20T09:30:58+08:00","updated_at":"2025-10-20T09:31:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5d737ee8bc367e75000096a7736cbd6900c0c6.webp?v=1760923860","variant_ids":[43786684399715]},"available":true,"name":"iPhone 12 mini Mod NX 變種吉娃娃 Godgwawa 吉藍海域 - 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-IT38","featured_media":{"alt":null,"id":26242246115427,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5d737ee8bc367e75000096a7736cbd6900c0c6.webp?v=1760923860"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43786684399715,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-IT38","requires_shipping":true,"taxable":true,"featured_image":{"id":34672987177059,"product_id":7903446466659,"position":4,"created_at":"2025-10-20T09:30:58+08:00","updated_at":"2025-10-20T09:31:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5d737ee8bc367e75000096a7736cbd6900c0c6.webp?v=1760923860","variant_ids":[43786684399715]},"available":true,"name":"iPhone 12 mini Mod NX 變種吉娃娃 Godgwawa 吉藍海域 - 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-IT38","featured_media":{"alt":null,"id":26242246115427,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5d737ee8bc367e75000096a7736cbd6900c0c6.webp?v=1760923860"}},"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: "停產" }