$product = {"id":7892697022563,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) Aaron Chang Skaterboy","handle":"iphone-12-mini-mod-nx-magsafe-printable-aar03","description":null,"published_at":"2025-10-03T09:38:20+08:00","created_at":"2025-10-02T10:13:58+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-aaronchang","device-iPhone 12 Mini","merge","reseller-aaronchang"],"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":43756810010723,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-AAR03","requires_shipping":true,"taxable":true,"featured_image":{"id":34543862284387,"product_id":7892697022563,"position":8,"created_at":"2025-10-02T10:14:05+08:00","updated_at":"2025-10-02T10:14:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4bf29a363d7c92123fb4d084b957b7015cd90b.webp?v=1759371247","variant_ids":[43756810010723]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) Aaron Chang Skaterboy - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-AAR03","featured_media":{"alt":null,"id":26113617166435,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4bf29a363d7c92123fb4d084b957b7015cd90b.webp?v=1759371247"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df126c419b9c0a1dc18a039e3e63c2e3c7b9d2cf.webp?v=1759371242","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b25107f066ba3541a038e94f6af3736c1e285ee5.webp?v=1759371244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14a494a084c91a91b3d54a3f780524ba2376248f.webp?v=1759371244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ca4207fafbd84b769e9acc7b45f7f1ac88cbcb7.webp?v=1759371244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7c884a8a95888b2508b0db41b0d25399e6f10a2.webp?v=1759371245","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f688eef7a555b1188b0a73f9aaee4942edf8335.webp?v=1759371246","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93d1e9e9828156179670dcc847137e66079d4158.webp?v=1759371246","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4bf29a363d7c92123fb4d084b957b7015cd90b.webp?v=1759371247","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f506752530f22a8f2b9f2c5273736c75d13770b.webp?v=1759371248","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ece08bef5aa8d7e23aaf49bf1b5d07a24ac6a84e.webp?v=1759371249","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1d32ae633c4af5b8321e02d47be64a080826864.webp?v=1759371249"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df126c419b9c0a1dc18a039e3e63c2e3c7b9d2cf.webp?v=1759371242","options":["color"],"media":[{"alt":null,"id":26113615855715,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df126c419b9c0a1dc18a039e3e63c2e3c7b9d2cf.webp?v=1759371242"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df126c419b9c0a1dc18a039e3e63c2e3c7b9d2cf.webp?v=1759371242","width":2000},{"alt":null,"id":26113616052323,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b25107f066ba3541a038e94f6af3736c1e285ee5.webp?v=1759371244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b25107f066ba3541a038e94f6af3736c1e285ee5.webp?v=1759371244","width":2000},{"alt":null,"id":26113616248931,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14a494a084c91a91b3d54a3f780524ba2376248f.webp?v=1759371244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14a494a084c91a91b3d54a3f780524ba2376248f.webp?v=1759371244","width":2000},{"alt":null,"id":26113616412771,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ca4207fafbd84b769e9acc7b45f7f1ac88cbcb7.webp?v=1759371244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ca4207fafbd84b769e9acc7b45f7f1ac88cbcb7.webp?v=1759371244","width":2000},{"alt":null,"id":26113616609379,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7c884a8a95888b2508b0db41b0d25399e6f10a2.webp?v=1759371245"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7c884a8a95888b2508b0db41b0d25399e6f10a2.webp?v=1759371245","width":2000},{"alt":null,"id":26113616773219,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f688eef7a555b1188b0a73f9aaee4942edf8335.webp?v=1759371246"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f688eef7a555b1188b0a73f9aaee4942edf8335.webp?v=1759371246","width":2000},{"alt":null,"id":26113616969827,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93d1e9e9828156179670dcc847137e66079d4158.webp?v=1759371246"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93d1e9e9828156179670dcc847137e66079d4158.webp?v=1759371246","width":2000},{"alt":null,"id":26113617166435,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4bf29a363d7c92123fb4d084b957b7015cd90b.webp?v=1759371247"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4bf29a363d7c92123fb4d084b957b7015cd90b.webp?v=1759371247","width":2000},{"alt":null,"id":26113617363043,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f506752530f22a8f2b9f2c5273736c75d13770b.webp?v=1759371248"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f506752530f22a8f2b9f2c5273736c75d13770b.webp?v=1759371248","width":2000},{"alt":null,"id":26113617526883,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ece08bef5aa8d7e23aaf49bf1b5d07a24ac6a84e.webp?v=1759371249"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ece08bef5aa8d7e23aaf49bf1b5d07a24ac6a84e.webp?v=1759371249","width":2000},{"alt":null,"id":26113617723491,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1d32ae633c4af5b8321e02d47be64a080826864.webp?v=1759371249"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1d32ae633c4af5b8321e02d47be64a080826864.webp?v=1759371249","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43756810010723,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-AAR03","requires_shipping":true,"taxable":true,"featured_image":{"id":34543862284387,"product_id":7892697022563,"position":8,"created_at":"2025-10-02T10:14:05+08:00","updated_at":"2025-10-02T10:14:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4bf29a363d7c92123fb4d084b957b7015cd90b.webp?v=1759371247","variant_ids":[43756810010723]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) Aaron Chang Skaterboy - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-AAR03","featured_media":{"alt":null,"id":26113617166435,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4bf29a363d7c92123fb4d084b957b7015cd90b.webp?v=1759371247"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43756810010723,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-AAR03","requires_shipping":true,"taxable":true,"featured_image":{"id":34543862284387,"product_id":7892697022563,"position":8,"created_at":"2025-10-02T10:14:05+08:00","updated_at":"2025-10-02T10:14:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4bf29a363d7c92123fb4d084b957b7015cd90b.webp?v=1759371247","variant_ids":[43756810010723]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) Aaron Chang Skaterboy - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-AAR03","featured_media":{"alt":null,"id":26113617166435,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4bf29a363d7c92123fb4d084b957b7015cd90b.webp?v=1759371247"}},"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: "停產" }