$product = {"id":7921958191203,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 飛走的UFO貓","handle":"iphone-12-pro-mod-nx-magsafe-toc06","description":null,"published_at":"2025-11-14T08:22:54+08:00","created_at":"2025-11-13T10:17:37+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-tocorocomugi","device-iPhone 12 Pro","merge","reseller-tocorocomugi"],"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":43834687717475,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-TOC06","requires_shipping":true,"taxable":true,"featured_image":{"id":34794092724323,"product_id":7921958191203,"position":6,"created_at":"2025-11-13T10:17:45+08:00","updated_at":"2025-11-13T10:17:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8d7b39f74ad6921217d2c65eae477c70e6afc3.webp?v=1763000266","variant_ids":[43834687717475]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 飛走的UFO貓 - Lavender","public_title":"Lavender","options":["Lavender"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185C1-TOC06","featured_media":{"alt":null,"id":26359512432739,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8d7b39f74ad6921217d2c65eae477c70e6afc3.webp?v=1763000266"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834689945699,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-TOC06","requires_shipping":true,"taxable":true,"featured_image":{"id":34794092265571,"product_id":7921958191203,"position":3,"created_at":"2025-11-13T10:17:42+08:00","updated_at":"2025-11-13T10:17:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00d111a55417407cbac40546279b7d64dac6e7ee.webp?v=1763000264","variant_ids":[43834689945699]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 飛走的UFO貓 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185J5-TOC06","featured_media":{"alt":null,"id":26359511941219,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00d111a55417407cbac40546279b7d64dac6e7ee.webp?v=1763000264"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834689978467,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-TOC06","requires_shipping":true,"taxable":true,"featured_image":{"id":34794092593251,"product_id":7921958191203,"position":5,"created_at":"2025-11-13T10:17:44+08:00","updated_at":"2025-11-13T10:17:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/550b76b98bf339350dc743e8ca1f09d743573bf8.webp?v=1763000266","variant_ids":[43834689978467]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 飛走的UFO貓 - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118504-TOC06","featured_media":{"alt":null,"id":26359512268899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/550b76b98bf339350dc743e8ca1f09d743573bf8.webp?v=1763000266"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834690076771,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-TOC06","requires_shipping":true,"taxable":true,"featured_image":{"id":34794093019235,"product_id":7921958191203,"position":7,"created_at":"2025-11-13T10:17:45+08:00","updated_at":"2025-11-13T10:17:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de3522cd5d0091c61b27fb213fcdf2bbe8ee232d.webp?v=1763000267","variant_ids":[43834690076771]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 飛走的UFO貓 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118524-TOC06","featured_media":{"alt":null,"id":26359512694883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de3522cd5d0091c61b27fb213fcdf2bbe8ee232d.webp?v=1763000267"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834690109539,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-TOC06","requires_shipping":true,"taxable":true,"featured_image":{"id":34794093346915,"product_id":7921958191203,"position":9,"created_at":"2025-11-13T10:17:47+08:00","updated_at":"2025-11-13T10:17:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a678b1fea7d6dd9439442257f4e17537ca71cd.webp?v=1763000269","variant_ids":[43834690109539]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 飛走的UFO貓 - Graphite","public_title":"Graphite","options":["Graphite"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118569-TOC06","featured_media":{"alt":null,"id":26359513120867,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a678b1fea7d6dd9439442257f4e17537ca71cd.webp?v=1763000269"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3964f3b501bc81d83bb570ffd37e417405269d2f.webp?v=1763000263","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11634725076faa16050c83f661eac8db42a5476a.webp?v=1763000264","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00d111a55417407cbac40546279b7d64dac6e7ee.webp?v=1763000264","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9519e0d1fdac44270c33a4f5c62ecb1249c9ef85.webp?v=1763000265","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/550b76b98bf339350dc743e8ca1f09d743573bf8.webp?v=1763000266","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8d7b39f74ad6921217d2c65eae477c70e6afc3.webp?v=1763000266","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de3522cd5d0091c61b27fb213fcdf2bbe8ee232d.webp?v=1763000267","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a70b413323e0e8ced8e2c50a515b64a945e13a.webp?v=1763000269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a678b1fea7d6dd9439442257f4e17537ca71cd.webp?v=1763000269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f385240cfae70c0fa4f9418485d3128ff775e414.webp?v=1763000271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02cbf5155272909037b13476a2c3acf205afe8ec.webp?v=1763000271"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3964f3b501bc81d83bb570ffd37e417405269d2f.webp?v=1763000263","options":["color"],"media":[{"alt":null,"id":26359511482467,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3964f3b501bc81d83bb570ffd37e417405269d2f.webp?v=1763000263"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3964f3b501bc81d83bb570ffd37e417405269d2f.webp?v=1763000263","width":2000},{"alt":null,"id":26359511810147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11634725076faa16050c83f661eac8db42a5476a.webp?v=1763000264"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11634725076faa16050c83f661eac8db42a5476a.webp?v=1763000264","width":2000},{"alt":null,"id":26359511941219,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00d111a55417407cbac40546279b7d64dac6e7ee.webp?v=1763000264"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00d111a55417407cbac40546279b7d64dac6e7ee.webp?v=1763000264","width":2000},{"alt":null,"id":26359512072291,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9519e0d1fdac44270c33a4f5c62ecb1249c9ef85.webp?v=1763000265"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9519e0d1fdac44270c33a4f5c62ecb1249c9ef85.webp?v=1763000265","width":2000},{"alt":null,"id":26359512268899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/550b76b98bf339350dc743e8ca1f09d743573bf8.webp?v=1763000266"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/550b76b98bf339350dc743e8ca1f09d743573bf8.webp?v=1763000266","width":2000},{"alt":null,"id":26359512432739,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8d7b39f74ad6921217d2c65eae477c70e6afc3.webp?v=1763000266"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8d7b39f74ad6921217d2c65eae477c70e6afc3.webp?v=1763000266","width":2000},{"alt":null,"id":26359512694883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de3522cd5d0091c61b27fb213fcdf2bbe8ee232d.webp?v=1763000267"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de3522cd5d0091c61b27fb213fcdf2bbe8ee232d.webp?v=1763000267","width":2000},{"alt":null,"id":26359513055331,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a70b413323e0e8ced8e2c50a515b64a945e13a.webp?v=1763000269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a70b413323e0e8ced8e2c50a515b64a945e13a.webp?v=1763000269","width":2000},{"alt":null,"id":26359513120867,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a678b1fea7d6dd9439442257f4e17537ca71cd.webp?v=1763000269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a678b1fea7d6dd9439442257f4e17537ca71cd.webp?v=1763000269","width":2000},{"alt":null,"id":26359513251939,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f385240cfae70c0fa4f9418485d3128ff775e414.webp?v=1763000271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f385240cfae70c0fa4f9418485d3128ff775e414.webp?v=1763000271","width":2000},{"alt":null,"id":26359513383011,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02cbf5155272909037b13476a2c3acf205afe8ec.webp?v=1763000271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02cbf5155272909037b13476a2c3acf205afe8ec.webp?v=1763000271","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43834687717475,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-TOC06","requires_shipping":true,"taxable":true,"featured_image":{"id":34794092724323,"product_id":7921958191203,"position":6,"created_at":"2025-11-13T10:17:45+08:00","updated_at":"2025-11-13T10:17:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8d7b39f74ad6921217d2c65eae477c70e6afc3.webp?v=1763000266","variant_ids":[43834687717475]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 飛走的UFO貓 - Lavender","public_title":"Lavender","options":["Lavender"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185C1-TOC06","featured_media":{"alt":null,"id":26359512432739,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8d7b39f74ad6921217d2c65eae477c70e6afc3.webp?v=1763000266"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834689945699,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-TOC06","requires_shipping":true,"taxable":true,"featured_image":{"id":34794092265571,"product_id":7921958191203,"position":3,"created_at":"2025-11-13T10:17:42+08:00","updated_at":"2025-11-13T10:17:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00d111a55417407cbac40546279b7d64dac6e7ee.webp?v=1763000264","variant_ids":[43834689945699]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 飛走的UFO貓 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185J5-TOC06","featured_media":{"alt":null,"id":26359511941219,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00d111a55417407cbac40546279b7d64dac6e7ee.webp?v=1763000264"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834689978467,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-TOC06","requires_shipping":true,"taxable":true,"featured_image":{"id":34794092593251,"product_id":7921958191203,"position":5,"created_at":"2025-11-13T10:17:44+08:00","updated_at":"2025-11-13T10:17:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/550b76b98bf339350dc743e8ca1f09d743573bf8.webp?v=1763000266","variant_ids":[43834689978467]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 飛走的UFO貓 - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118504-TOC06","featured_media":{"alt":null,"id":26359512268899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/550b76b98bf339350dc743e8ca1f09d743573bf8.webp?v=1763000266"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834690076771,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-TOC06","requires_shipping":true,"taxable":true,"featured_image":{"id":34794093019235,"product_id":7921958191203,"position":7,"created_at":"2025-11-13T10:17:45+08:00","updated_at":"2025-11-13T10:17:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de3522cd5d0091c61b27fb213fcdf2bbe8ee232d.webp?v=1763000267","variant_ids":[43834690076771]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 飛走的UFO貓 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118524-TOC06","featured_media":{"alt":null,"id":26359512694883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de3522cd5d0091c61b27fb213fcdf2bbe8ee232d.webp?v=1763000267"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834690109539,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-TOC06","requires_shipping":true,"taxable":true,"featured_image":{"id":34794093346915,"product_id":7921958191203,"position":9,"created_at":"2025-11-13T10:17:47+08:00","updated_at":"2025-11-13T10:17:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a678b1fea7d6dd9439442257f4e17537ca71cd.webp?v=1763000269","variant_ids":[43834690109539]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 飛走的UFO貓 - Graphite","public_title":"Graphite","options":["Graphite"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118569-TOC06","featured_media":{"alt":null,"id":26359513120867,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a678b1fea7d6dd9439442257f4e17537ca71cd.webp?v=1763000269"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43834687717475,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-TOC06","requires_shipping":true,"taxable":true,"featured_image":{"id":34794092724323,"product_id":7921958191203,"position":6,"created_at":"2025-11-13T10:17:45+08:00","updated_at":"2025-11-13T10:17:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8d7b39f74ad6921217d2c65eae477c70e6afc3.webp?v=1763000266","variant_ids":[43834687717475]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 飛走的UFO貓 - Lavender","public_title":"Lavender","options":["Lavender"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185C1-TOC06","featured_media":{"alt":null,"id":26359512432739,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8d7b39f74ad6921217d2c65eae477c70e6afc3.webp?v=1763000266"}},"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: "停產"
}