$product = {"id":7938045411427,"title":"iPhone 12 Pro Max Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 全員集結","handle":"iphone-12-pro-max-mod-nx-magsafe-xw08","description":null,"published_at":"2025-12-12T10:06:51+08:00","created_at":"2025-12-11T16:50:28+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-attack-on-titan","device-iPhone 12 Pro Max","merge","reseller-attack-on-titan"],"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":43884892029027,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118724-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933622734947,"product_id":7938045411427,"position":6,"created_at":"2025-12-11T16:50:37+08:00","updated_at":"2025-12-11T16:50:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38083ee83487da52b670ec84c13d5c3c39f6caf7.webp?v=1765443039","variant_ids":[43884892029027]},"available":true,"name":"iPhone 12 Pro Max Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 全員集結 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-XW08","featured_media":{"alt":null,"id":26495992823907,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38083ee83487da52b670ec84c13d5c3c39f6caf7.webp?v=1765443039"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d6fefc5dd8238cb9818adeb9abffdcdcd85cdfb.webp?v=1765443035","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8da03159ab9b4c690e54f2e1f3fdba755bab781d.webp?v=1765443035","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/324f2860a13102df2d33c477706ad08a3d19df83.webp?v=1765443035","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1394fbd9ff0776b41b3b90589f05ec92b4710e44.webp?v=1765443036","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67295e1ff00f75a7c0d45e0cef91fc23e685d577.webp?v=1765443039","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38083ee83487da52b670ec84c13d5c3c39f6caf7.webp?v=1765443039","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/245fde8f363a0c3030f43da58e0cb737e7ebc10f.webp?v=1765443040","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c65be79f7efac13d57945e8b972badc68b3fff91.webp?v=1765443040","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f1766d0dc360ca277d0c9eea9685850984c0536.webp?v=1765443041"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d6fefc5dd8238cb9818adeb9abffdcdcd85cdfb.webp?v=1765443035","options":["color"],"media":[{"alt":null,"id":26495991808099,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d6fefc5dd8238cb9818adeb9abffdcdcd85cdfb.webp?v=1765443035"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d6fefc5dd8238cb9818adeb9abffdcdcd85cdfb.webp?v=1765443035","width":2000},{"alt":null,"id":26495991906403,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8da03159ab9b4c690e54f2e1f3fdba755bab781d.webp?v=1765443035"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8da03159ab9b4c690e54f2e1f3fdba755bab781d.webp?v=1765443035","width":2000},{"alt":null,"id":26495992037475,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/324f2860a13102df2d33c477706ad08a3d19df83.webp?v=1765443035"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/324f2860a13102df2d33c477706ad08a3d19df83.webp?v=1765443035","width":2000},{"alt":null,"id":26495992135779,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1394fbd9ff0776b41b3b90589f05ec92b4710e44.webp?v=1765443036"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1394fbd9ff0776b41b3b90589f05ec92b4710e44.webp?v=1765443036","width":2000},{"alt":null,"id":26495992430691,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67295e1ff00f75a7c0d45e0cef91fc23e685d577.webp?v=1765443039"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67295e1ff00f75a7c0d45e0cef91fc23e685d577.webp?v=1765443039","width":2000},{"alt":null,"id":26495992823907,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38083ee83487da52b670ec84c13d5c3c39f6caf7.webp?v=1765443039"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38083ee83487da52b670ec84c13d5c3c39f6caf7.webp?v=1765443039","width":2000},{"alt":null,"id":26495993020515,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/245fde8f363a0c3030f43da58e0cb737e7ebc10f.webp?v=1765443040"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/245fde8f363a0c3030f43da58e0cb737e7ebc10f.webp?v=1765443040","width":2000},{"alt":null,"id":26495993282659,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c65be79f7efac13d57945e8b972badc68b3fff91.webp?v=1765443040"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c65be79f7efac13d57945e8b972badc68b3fff91.webp?v=1765443040","width":2000},{"alt":null,"id":26495993380963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f1766d0dc360ca277d0c9eea9685850984c0536.webp?v=1765443041"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f1766d0dc360ca277d0c9eea9685850984c0536.webp?v=1765443041","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43884892029027,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118724-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933622734947,"product_id":7938045411427,"position":6,"created_at":"2025-12-11T16:50:37+08:00","updated_at":"2025-12-11T16:50:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38083ee83487da52b670ec84c13d5c3c39f6caf7.webp?v=1765443039","variant_ids":[43884892029027]},"available":true,"name":"iPhone 12 Pro Max Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 全員集結 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-XW08","featured_media":{"alt":null,"id":26495992823907,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38083ee83487da52b670ec84c13d5c3c39f6caf7.webp?v=1765443039"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43884892029027,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118724-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933622734947,"product_id":7938045411427,"position":6,"created_at":"2025-12-11T16:50:37+08:00","updated_at":"2025-12-11T16:50:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38083ee83487da52b670ec84c13d5c3c39f6caf7.webp?v=1765443039","variant_ids":[43884892029027]},"available":true,"name":"iPhone 12 Pro Max Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 全員集結 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-XW08","featured_media":{"alt":null,"id":26495992823907,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38083ee83487da52b670ec84c13d5c3c39f6caf7.webp?v=1765443039"}},"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: "停產" }