$product = {"id":7922020253795,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 不對勁招財貓","handle":"iphone-12-pro-mod-nx-magsafe-toc09","description":null,"published_at":"2025-11-14T08:11:58+08:00","created_at":"2025-11-13T10:32:48+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":43834929807459,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-TOC09","requires_shipping":true,"taxable":true,"featured_image":{"id":34794358603875,"product_id":7922020253795,"position":10,"created_at":"2025-11-13T10:32:55+08:00","updated_at":"2025-11-13T10:32:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55058cd68e07b8049d09aa987e7193c6fb500f38.webp?v=1763001177","variant_ids":[43834929807459]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 不對勁招財貓 - 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-TOC09","featured_media":{"alt":null,"id":26359777624163,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55058cd68e07b8049d09aa987e7193c6fb500f38.webp?v=1763001177"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834933870691,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-TOC09","requires_shipping":true,"taxable":true,"featured_image":{"id":34794357358691,"product_id":7922020253795,"position":3,"created_at":"2025-11-13T10:32:50+08:00","updated_at":"2025-11-13T10:32:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4102ed1df8aef511e3a96e3700d0968ffd8950.webp?v=1763001172","variant_ids":[43834933870691]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 不對勁招財貓 - 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-TOC09","featured_media":{"alt":null,"id":26359776215139,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4102ed1df8aef511e3a96e3700d0968ffd8950.webp?v=1763001172"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834933903459,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-TOC09","requires_shipping":true,"taxable":true,"featured_image":{"id":34794357882979,"product_id":7922020253795,"position":6,"created_at":"2025-11-13T10:32:52+08:00","updated_at":"2025-11-13T10:32:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6923e80deb388bb3c864c4a944f222652733d677.webp?v=1763001174","variant_ids":[43834933903459]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 不對勁招財貓 - 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-TOC09","featured_media":{"alt":null,"id":26359776739427,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6923e80deb388bb3c864c4a944f222652733d677.webp?v=1763001174"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834934001763,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-TOC09","requires_shipping":true,"taxable":true,"featured_image":{"id":34794358341731,"product_id":7922020253795,"position":9,"created_at":"2025-11-13T10:32:54+08:00","updated_at":"2025-11-13T10:32:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf00fd5e4587ade62263ee39614ebca04cfad3f.webp?v=1763001176","variant_ids":[43834934001763]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 不對勁招財貓 - 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-TOC09","featured_media":{"alt":null,"id":26359777493091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf00fd5e4587ade62263ee39614ebca04cfad3f.webp?v=1763001176"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834934034531,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-TOC09","requires_shipping":true,"taxable":true,"featured_image":{"id":34794358833251,"product_id":7922020253795,"position":11,"created_at":"2025-11-13T10:32:56+08:00","updated_at":"2025-11-13T10:32:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef98eb8167ade116b1d70812d194e3e888d86a7c.webp?v=1763001178","variant_ids":[43834934034531]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 不對勁招財貓 - 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-TOC09","featured_media":{"alt":null,"id":26359777853539,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef98eb8167ade116b1d70812d194e3e888d86a7c.webp?v=1763001178"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fed5f1d7ec5c4c0231d9f21cb4da54e8acb90f52.webp?v=1763001171","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6bcdc6d54eae6db051337240c9b73c16235a0c6.webp?v=1763001172","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4102ed1df8aef511e3a96e3700d0968ffd8950.webp?v=1763001172","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f75b6b66cc2137621d82c6aefbc7a2e4f6d23f7.webp?v=1763001173","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68a1029219c07f510652996af5154ee8546253ea.webp?v=1763001173","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6923e80deb388bb3c864c4a944f222652733d677.webp?v=1763001174","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32936aa2349d24ba457c5f2ae9d02675a7003485.webp?v=1763001175","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda8153b67ac5ce94813d85ebf9aeeba66875d89.webp?v=1763001175","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf00fd5e4587ade62263ee39614ebca04cfad3f.webp?v=1763001176","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55058cd68e07b8049d09aa987e7193c6fb500f38.webp?v=1763001177","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef98eb8167ade116b1d70812d194e3e888d86a7c.webp?v=1763001178"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fed5f1d7ec5c4c0231d9f21cb4da54e8acb90f52.webp?v=1763001171","options":["color"],"media":[{"alt":null,"id":26359775658083,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fed5f1d7ec5c4c0231d9f21cb4da54e8acb90f52.webp?v=1763001171"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fed5f1d7ec5c4c0231d9f21cb4da54e8acb90f52.webp?v=1763001171","width":2000},{"alt":null,"id":26359775920227,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6bcdc6d54eae6db051337240c9b73c16235a0c6.webp?v=1763001172"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6bcdc6d54eae6db051337240c9b73c16235a0c6.webp?v=1763001172","width":2000},{"alt":null,"id":26359776215139,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4102ed1df8aef511e3a96e3700d0968ffd8950.webp?v=1763001172"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4102ed1df8aef511e3a96e3700d0968ffd8950.webp?v=1763001172","width":2000},{"alt":null,"id":26359776411747,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f75b6b66cc2137621d82c6aefbc7a2e4f6d23f7.webp?v=1763001173"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f75b6b66cc2137621d82c6aefbc7a2e4f6d23f7.webp?v=1763001173","width":2000},{"alt":null,"id":26359776608355,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68a1029219c07f510652996af5154ee8546253ea.webp?v=1763001173"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68a1029219c07f510652996af5154ee8546253ea.webp?v=1763001173","width":2000},{"alt":null,"id":26359776739427,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6923e80deb388bb3c864c4a944f222652733d677.webp?v=1763001174"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6923e80deb388bb3c864c4a944f222652733d677.webp?v=1763001174","width":2000},{"alt":null,"id":26359776903267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32936aa2349d24ba457c5f2ae9d02675a7003485.webp?v=1763001175"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32936aa2349d24ba457c5f2ae9d02675a7003485.webp?v=1763001175","width":2000},{"alt":null,"id":26359777034339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda8153b67ac5ce94813d85ebf9aeeba66875d89.webp?v=1763001175"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda8153b67ac5ce94813d85ebf9aeeba66875d89.webp?v=1763001175","width":2000},{"alt":null,"id":26359777493091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf00fd5e4587ade62263ee39614ebca04cfad3f.webp?v=1763001176"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf00fd5e4587ade62263ee39614ebca04cfad3f.webp?v=1763001176","width":2000},{"alt":null,"id":26359777624163,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55058cd68e07b8049d09aa987e7193c6fb500f38.webp?v=1763001177"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55058cd68e07b8049d09aa987e7193c6fb500f38.webp?v=1763001177","width":2000},{"alt":null,"id":26359777853539,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef98eb8167ade116b1d70812d194e3e888d86a7c.webp?v=1763001178"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef98eb8167ade116b1d70812d194e3e888d86a7c.webp?v=1763001178","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43834929807459,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-TOC09","requires_shipping":true,"taxable":true,"featured_image":{"id":34794358603875,"product_id":7922020253795,"position":10,"created_at":"2025-11-13T10:32:55+08:00","updated_at":"2025-11-13T10:32:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55058cd68e07b8049d09aa987e7193c6fb500f38.webp?v=1763001177","variant_ids":[43834929807459]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 不對勁招財貓 - 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-TOC09","featured_media":{"alt":null,"id":26359777624163,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55058cd68e07b8049d09aa987e7193c6fb500f38.webp?v=1763001177"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834933870691,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-TOC09","requires_shipping":true,"taxable":true,"featured_image":{"id":34794357358691,"product_id":7922020253795,"position":3,"created_at":"2025-11-13T10:32:50+08:00","updated_at":"2025-11-13T10:32:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4102ed1df8aef511e3a96e3700d0968ffd8950.webp?v=1763001172","variant_ids":[43834933870691]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 不對勁招財貓 - 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-TOC09","featured_media":{"alt":null,"id":26359776215139,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4102ed1df8aef511e3a96e3700d0968ffd8950.webp?v=1763001172"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834933903459,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-TOC09","requires_shipping":true,"taxable":true,"featured_image":{"id":34794357882979,"product_id":7922020253795,"position":6,"created_at":"2025-11-13T10:32:52+08:00","updated_at":"2025-11-13T10:32:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6923e80deb388bb3c864c4a944f222652733d677.webp?v=1763001174","variant_ids":[43834933903459]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 不對勁招財貓 - 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-TOC09","featured_media":{"alt":null,"id":26359776739427,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6923e80deb388bb3c864c4a944f222652733d677.webp?v=1763001174"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834934001763,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-TOC09","requires_shipping":true,"taxable":true,"featured_image":{"id":34794358341731,"product_id":7922020253795,"position":9,"created_at":"2025-11-13T10:32:54+08:00","updated_at":"2025-11-13T10:32:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf00fd5e4587ade62263ee39614ebca04cfad3f.webp?v=1763001176","variant_ids":[43834934001763]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 不對勁招財貓 - 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-TOC09","featured_media":{"alt":null,"id":26359777493091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf00fd5e4587ade62263ee39614ebca04cfad3f.webp?v=1763001176"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834934034531,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-TOC09","requires_shipping":true,"taxable":true,"featured_image":{"id":34794358833251,"product_id":7922020253795,"position":11,"created_at":"2025-11-13T10:32:56+08:00","updated_at":"2025-11-13T10:32:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef98eb8167ade116b1d70812d194e3e888d86a7c.webp?v=1763001178","variant_ids":[43834934034531]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 不對勁招財貓 - 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-TOC09","featured_media":{"alt":null,"id":26359777853539,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef98eb8167ade116b1d70812d194e3e888d86a7c.webp?v=1763001178"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43834929807459,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-TOC09","requires_shipping":true,"taxable":true,"featured_image":{"id":34794358603875,"product_id":7922020253795,"position":10,"created_at":"2025-11-13T10:32:55+08:00","updated_at":"2025-11-13T10:32:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55058cd68e07b8049d09aa987e7193c6fb500f38.webp?v=1763001177","variant_ids":[43834929807459]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 不對勁招財貓 - 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-TOC09","featured_media":{"alt":null,"id":26359777624163,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55058cd68e07b8049d09aa987e7193c6fb500f38.webp?v=1763001177"}},"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: "停產"
}