$product = {"id":7873276182627,"title":"iPhone 12 mini Mod NX Keigo Beach Volleyball","handle":"iphone-12-mini-mod-nx-printable-kei02","description":null,"published_at":"2025-09-01T10:51:44+08:00","created_at":"2025-09-01T09:41:31+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-keigo","device-iPhone 12 Mini","merge","reseller-keigo"],"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":43658571350115,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-KEI02","requires_shipping":true,"taxable":true,"featured_image":{"id":34409924821091,"product_id":7873276182627,"position":6,"created_at":"2025-09-01T09:41:39+08:00","updated_at":"2025-09-01T09:41:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcc3e00c54a4f3b485a48d4f51e9253dfe0cf292.webp?v=1756690901","variant_ids":[43658571350115]},"available":true,"name":"iPhone 12 mini Mod NX Keigo Beach Volleyball - 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-KEI02","featured_media":{"alt":null,"id":25982239801443,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcc3e00c54a4f3b485a48d4f51e9253dfe0cf292.webp?v=1756690901"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31d48374511a92551bbb010df2d9dd9047c6416e.webp?v=1756690898","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22992a56487b60224c0cf7cba1793fb6e7ffcade.webp?v=1756690898","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fb979b2faeb6eb51446839daf5551f13b395833.webp?v=1756690899","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e105de3cde7176c74f7f29307a30e240fdb54e97.webp?v=1756690899","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adb3a382b23a9f69756c25553b26070f1cddce74.webp?v=1756690900","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcc3e00c54a4f3b485a48d4f51e9253dfe0cf292.webp?v=1756690901","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecbfd30fe05ee19ecfa1b8f99630ce3d8cfafa1b.webp?v=1756690902","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec6556b04f5740336a03b068f57b95657ed338ff.webp?v=1756690903","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1183b51fe1471fbcf5c88fd679f93bc239a679b9.webp?v=1756690903","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bab9426561ce3b6537d1a6ae1ceff92e721105c6.webp?v=1756690904","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b722cd8e319831860660698ed50b35e26e4ac883.webp?v=1756690904"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31d48374511a92551bbb010df2d9dd9047c6416e.webp?v=1756690898","options":["color"],"media":[{"alt":null,"id":25982238785635,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31d48374511a92551bbb010df2d9dd9047c6416e.webp?v=1756690898"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31d48374511a92551bbb010df2d9dd9047c6416e.webp?v=1756690898","width":2000},{"alt":null,"id":25982239015011,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22992a56487b60224c0cf7cba1793fb6e7ffcade.webp?v=1756690898"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22992a56487b60224c0cf7cba1793fb6e7ffcade.webp?v=1756690898","width":2000},{"alt":null,"id":25982239211619,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fb979b2faeb6eb51446839daf5551f13b395833.webp?v=1756690899"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fb979b2faeb6eb51446839daf5551f13b395833.webp?v=1756690899","width":2000},{"alt":null,"id":25982239440995,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e105de3cde7176c74f7f29307a30e240fdb54e97.webp?v=1756690899"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e105de3cde7176c74f7f29307a30e240fdb54e97.webp?v=1756690899","width":2000},{"alt":null,"id":25982239604835,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adb3a382b23a9f69756c25553b26070f1cddce74.webp?v=1756690900"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adb3a382b23a9f69756c25553b26070f1cddce74.webp?v=1756690900","width":2000},{"alt":null,"id":25982239801443,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcc3e00c54a4f3b485a48d4f51e9253dfe0cf292.webp?v=1756690901"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcc3e00c54a4f3b485a48d4f51e9253dfe0cf292.webp?v=1756690901","width":2000},{"alt":null,"id":25982240063587,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecbfd30fe05ee19ecfa1b8f99630ce3d8cfafa1b.webp?v=1756690902"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecbfd30fe05ee19ecfa1b8f99630ce3d8cfafa1b.webp?v=1756690902","width":2000},{"alt":null,"id":25982240358499,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec6556b04f5740336a03b068f57b95657ed338ff.webp?v=1756690903"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec6556b04f5740336a03b068f57b95657ed338ff.webp?v=1756690903","width":2000},{"alt":null,"id":25982240653411,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1183b51fe1471fbcf5c88fd679f93bc239a679b9.webp?v=1756690903"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1183b51fe1471fbcf5c88fd679f93bc239a679b9.webp?v=1756690903","width":2000},{"alt":null,"id":25982240981091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bab9426561ce3b6537d1a6ae1ceff92e721105c6.webp?v=1756690904"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bab9426561ce3b6537d1a6ae1ceff92e721105c6.webp?v=1756690904","width":2000},{"alt":null,"id":25982241243235,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b722cd8e319831860660698ed50b35e26e4ac883.webp?v=1756690904"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b722cd8e319831860660698ed50b35e26e4ac883.webp?v=1756690904","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43658571350115,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-KEI02","requires_shipping":true,"taxable":true,"featured_image":{"id":34409924821091,"product_id":7873276182627,"position":6,"created_at":"2025-09-01T09:41:39+08:00","updated_at":"2025-09-01T09:41:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcc3e00c54a4f3b485a48d4f51e9253dfe0cf292.webp?v=1756690901","variant_ids":[43658571350115]},"available":true,"name":"iPhone 12 mini Mod NX Keigo Beach Volleyball - 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-KEI02","featured_media":{"alt":null,"id":25982239801443,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcc3e00c54a4f3b485a48d4f51e9253dfe0cf292.webp?v=1756690901"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43658571350115,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-KEI02","requires_shipping":true,"taxable":true,"featured_image":{"id":34409924821091,"product_id":7873276182627,"position":6,"created_at":"2025-09-01T09:41:39+08:00","updated_at":"2025-09-01T09:41:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcc3e00c54a4f3b485a48d4f51e9253dfe0cf292.webp?v=1756690901","variant_ids":[43658571350115]},"available":true,"name":"iPhone 12 mini Mod NX Keigo Beach Volleyball - 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-KEI02","featured_media":{"alt":null,"id":25982239801443,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcc3e00c54a4f3b485a48d4f51e9253dfe0cf292.webp?v=1756690901"}},"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: "停產" }