$product = {"id":7937570734179,"title":"iPhone 12 mini Mod NX Jin Young Choi 幸運小精靈","handle":"iphone-12-mini-mod-nx-cjy09","description":null,"published_at":"2025-12-12T09:47:54+08:00","created_at":"2025-12-11T09:50:08+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jychoioioi","device-iPhone 12 Mini","merge","reseller-jychoioioi"],"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":43883019436131,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CJY09","requires_shipping":true,"taxable":true,"featured_image":{"id":34930903580771,"product_id":7937570734179,"position":8,"created_at":"2025-12-11T09:50:16+08:00","updated_at":"2025-12-11T09:50:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ff32fff4130123e123e0e266d37824967c6b213.webp?v=1765417818","variant_ids":[43883019436131]},"available":true,"name":"iPhone 12 mini Mod NX Jin Young Choi 幸運小精靈 - 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-CJY09","featured_media":{"alt":null,"id":26493278093411,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ff32fff4130123e123e0e266d37824967c6b213.webp?v=1765417818"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e55f5f8685c17286e9c031bc9b7db499d770630.webp?v=1765417814","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bca286c09a3d6952a826cb8d1cdc882582fbe81c.webp?v=1765417815","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ef8ff059f735d1669259519e0804de9327298ac.webp?v=1765417815","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cecb7450745b1577849a4c5c98f6ef42a70bdc30.webp?v=1765417816","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7323585a85d2b71f34b2d2ac69411927fc5018ea.webp?v=1765417817","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecaaefddf40d537cc384283e1ea477eae55a6784.webp?v=1765417817","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/111171620a11d70ea8b935084ad2b0e715903262.webp?v=1765417818","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ff32fff4130123e123e0e266d37824967c6b213.webp?v=1765417818","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6b0e3b82432e1b200b3d009d516a3cb2beb17d5.webp?v=1765417819","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f498e5ae85eb81b36932a60bbce17f98ad61837.webp?v=1765417819","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/402e232b60891f0532196db2374b019b2d806f11.webp?v=1765417820"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e55f5f8685c17286e9c031bc9b7db499d770630.webp?v=1765417814","options":["color"],"media":[{"alt":null,"id":26493276848227,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e55f5f8685c17286e9c031bc9b7db499d770630.webp?v=1765417814"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e55f5f8685c17286e9c031bc9b7db499d770630.webp?v=1765417814","width":2000},{"alt":null,"id":26493276979299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bca286c09a3d6952a826cb8d1cdc882582fbe81c.webp?v=1765417815"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bca286c09a3d6952a826cb8d1cdc882582fbe81c.webp?v=1765417815","width":2000},{"alt":null,"id":26493277110371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ef8ff059f735d1669259519e0804de9327298ac.webp?v=1765417815"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ef8ff059f735d1669259519e0804de9327298ac.webp?v=1765417815","width":2000},{"alt":null,"id":26493277339747,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cecb7450745b1577849a4c5c98f6ef42a70bdc30.webp?v=1765417816"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cecb7450745b1577849a4c5c98f6ef42a70bdc30.webp?v=1765417816","width":2000},{"alt":null,"id":26493277536355,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7323585a85d2b71f34b2d2ac69411927fc5018ea.webp?v=1765417817"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7323585a85d2b71f34b2d2ac69411927fc5018ea.webp?v=1765417817","width":2000},{"alt":null,"id":26493277732963,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecaaefddf40d537cc384283e1ea477eae55a6784.webp?v=1765417817"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecaaefddf40d537cc384283e1ea477eae55a6784.webp?v=1765417817","width":2000},{"alt":null,"id":26493277929571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/111171620a11d70ea8b935084ad2b0e715903262.webp?v=1765417818"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/111171620a11d70ea8b935084ad2b0e715903262.webp?v=1765417818","width":2000},{"alt":null,"id":26493278093411,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ff32fff4130123e123e0e266d37824967c6b213.webp?v=1765417818"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ff32fff4130123e123e0e266d37824967c6b213.webp?v=1765417818","width":2000},{"alt":null,"id":26493278355555,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6b0e3b82432e1b200b3d009d516a3cb2beb17d5.webp?v=1765417819"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6b0e3b82432e1b200b3d009d516a3cb2beb17d5.webp?v=1765417819","width":2000},{"alt":null,"id":26493278617699,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f498e5ae85eb81b36932a60bbce17f98ad61837.webp?v=1765417819"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f498e5ae85eb81b36932a60bbce17f98ad61837.webp?v=1765417819","width":2000},{"alt":null,"id":26493278748771,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/402e232b60891f0532196db2374b019b2d806f11.webp?v=1765417820"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/402e232b60891f0532196db2374b019b2d806f11.webp?v=1765417820","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43883019436131,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CJY09","requires_shipping":true,"taxable":true,"featured_image":{"id":34930903580771,"product_id":7937570734179,"position":8,"created_at":"2025-12-11T09:50:16+08:00","updated_at":"2025-12-11T09:50:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ff32fff4130123e123e0e266d37824967c6b213.webp?v=1765417818","variant_ids":[43883019436131]},"available":true,"name":"iPhone 12 mini Mod NX Jin Young Choi 幸運小精靈 - 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-CJY09","featured_media":{"alt":null,"id":26493278093411,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ff32fff4130123e123e0e266d37824967c6b213.webp?v=1765417818"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43883019436131,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CJY09","requires_shipping":true,"taxable":true,"featured_image":{"id":34930903580771,"product_id":7937570734179,"position":8,"created_at":"2025-12-11T09:50:16+08:00","updated_at":"2025-12-11T09:50:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ff32fff4130123e123e0e266d37824967c6b213.webp?v=1765417818","variant_ids":[43883019436131]},"available":true,"name":"iPhone 12 mini Mod NX Jin Young Choi 幸運小精靈 - 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-CJY09","featured_media":{"alt":null,"id":26493278093411,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ff32fff4130123e123e0e266d37824967c6b213.webp?v=1765417818"}},"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: "停產" }