$product = {"id":7892376617059,"title":"iphone-14-plus-solidsuit-classic-to54 - (API Create)","handle":"iphone-14-plus-solidsuit-classic-to54","description":null,"published_at":"2025-10-03T10:12:52+08:00","created_at":"2025-10-01T15:41:35+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":[],"price":0,"price_min":0,"price_max":0,"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":43755485659235,"title":"Neon Orange","option1":"Neon Orange","option2":null,"option3":null,"sku":null,"requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"iphone-14-plus-solidsuit-classic-to54 - (API Create) - Neon Orange","public_title":"Neon Orange","options":["Neon Orange"],"price":0,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":null,"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa005cafe9c004613ced4d5f03b754ffa3f6fde.webp?v=1759304501","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b9fa87941b53109b62b4a68f35a509737f5fb43.webp?v=1759304502","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/219272b7cbc9ab08da8e6778bb7199880f690aad.webp?v=1759304503","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfb100a988e3660a3fbbc22179d214b2d227611.webp?v=1759304504","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/422942229fa6a9f9621b2d52a68c5e204f10429c.webp?v=1759304506","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6799c1109683527cc201997740b8d39e17d9539c.webp?v=1759304506","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a9206f74996d3f82c58983fef599452a477b3d8.webp?v=1759304507","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b897eb3f083316ac2f0d8cddf813d282c59730.webp?v=1759304508","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5790674d40b163744ece7c2150641dffd36fa68d.webp?v=1759304509","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07812bfad4f63da9183183ce789261328aa6771b.webp?v=1759304510"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa005cafe9c004613ced4d5f03b754ffa3f6fde.webp?v=1759304501","options":["color"],"media":[{"alt":null,"id":26111814631523,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa005cafe9c004613ced4d5f03b754ffa3f6fde.webp?v=1759304501"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa005cafe9c004613ced4d5f03b754ffa3f6fde.webp?v=1759304501","width":2000},{"alt":null,"id":26111814828131,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b9fa87941b53109b62b4a68f35a509737f5fb43.webp?v=1759304502"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b9fa87941b53109b62b4a68f35a509737f5fb43.webp?v=1759304502","width":2000},{"alt":null,"id":26111815090275,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/219272b7cbc9ab08da8e6778bb7199880f690aad.webp?v=1759304503"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/219272b7cbc9ab08da8e6778bb7199880f690aad.webp?v=1759304503","width":2000},{"alt":null,"id":26111815352419,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfb100a988e3660a3fbbc22179d214b2d227611.webp?v=1759304504"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfb100a988e3660a3fbbc22179d214b2d227611.webp?v=1759304504","width":2000},{"alt":null,"id":26111815614563,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/422942229fa6a9f9621b2d52a68c5e204f10429c.webp?v=1759304506"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/422942229fa6a9f9621b2d52a68c5e204f10429c.webp?v=1759304506","width":2000},{"alt":null,"id":26111815876707,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6799c1109683527cc201997740b8d39e17d9539c.webp?v=1759304506"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6799c1109683527cc201997740b8d39e17d9539c.webp?v=1759304506","width":2000},{"alt":null,"id":26111816106083,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a9206f74996d3f82c58983fef599452a477b3d8.webp?v=1759304507"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a9206f74996d3f82c58983fef599452a477b3d8.webp?v=1759304507","width":2000},{"alt":null,"id":26111816335459,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b897eb3f083316ac2f0d8cddf813d282c59730.webp?v=1759304508"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b897eb3f083316ac2f0d8cddf813d282c59730.webp?v=1759304508","width":2000},{"alt":null,"id":26111816597603,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5790674d40b163744ece7c2150641dffd36fa68d.webp?v=1759304509"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5790674d40b163744ece7c2150641dffd36fa68d.webp?v=1759304509","width":2000},{"alt":null,"id":26111816859747,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07812bfad4f63da9183183ce789261328aa6771b.webp?v=1759304510"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07812bfad4f63da9183183ce789261328aa6771b.webp?v=1759304510","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43755485659235,"title":"Neon Orange","option1":"Neon Orange","option2":null,"option3":null,"sku":null,"requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"iphone-14-plus-solidsuit-classic-to54 - (API Create) - Neon Orange","public_title":"Neon Orange","options":["Neon Orange"],"price":0,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":null,"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43755485659235,"title":"Neon Orange","option1":"Neon Orange","option2":null,"option3":null,"sku":null,"requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"iphone-14-plus-solidsuit-classic-to54 - (API Create) - Neon Orange","public_title":"Neon Orange","options":["Neon Orange"],"price":0,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":null,"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(document).ready(function() { var productImg = $product.images[0]; var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]); var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate') ? [productImg, bumperImg] : [bumperImg, productImg]; window.mergeProductImages(layers).then(function (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: "停產" }