$product = {"id":7823769665635,"title":"iPhone 15 Pro Max SolidX noiinoii 珍奶松鼠","handle":"iphone-15-pro-max-solidx-mw02","description":null,"published_at":"2025-07-01T19:19:04+08:00","created_at":"2025-06-20T10:23:29+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-noiinoii","device-iPhone 15 Pro Max","merge","reseller-noiinoii"],"price":125000,"price_min":125000,"price_max":125000,"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":43472851828835,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-MW02","requires_shipping":true,"taxable":true,"featured_image":{"id":34514961465443,"product_id":7823769665635,"position":5,"created_at":"2025-09-22T16:15:24+08:00","updated_at":"2025-09-22T16:15:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c0f7b66bf7219bc6f3fce5bc0013ae32b02640.webp?v=1758528927","variant_ids":[43472851828835]},"available":true,"name":"iPhone 15 Pro Max SolidX noiinoii 珍奶松鼠 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129852-MW02","featured_media":{"alt":null,"id":26085402050659,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c0f7b66bf7219bc6f3fce5bc0013ae32b02640.webp?v=1758528927"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43472855138403,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129853-MW02","requires_shipping":true,"taxable":true,"featured_image":{"id":34514963431523,"product_id":7823769665635,"position":11,"created_at":"2025-09-22T16:15:28+08:00","updated_at":"2025-09-22T16:15:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6cfe290b5a913bf30c4cd58afe232b13973857.webp?v=1758528930","variant_ids":[43472855138403]},"available":true,"name":"iPhone 15 Pro Max SolidX noiinoii 珍奶松鼠 - White","public_title":"White","options":["White"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129853-MW02","featured_media":{"alt":null,"id":26085404344419,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6cfe290b5a913bf30c4cd58afe232b13973857.webp?v=1758528930"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43472855236707,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"NST01298O8-MW02","requires_shipping":true,"taxable":true,"featured_image":{"id":34514963136611,"product_id":7823769665635,"position":10,"created_at":"2025-09-22T16:15:27+08:00","updated_at":"2025-09-22T16:15:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09a74655c7b72253af98f7fb3f10e2103fed30c5.webp?v=1758528929","variant_ids":[43472855236707]},"available":true,"name":"iPhone 15 Pro Max SolidX noiinoii 珍奶松鼠 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298O8-MW02","featured_media":{"alt":null,"id":26085404049507,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09a74655c7b72253af98f7fb3f10e2103fed30c5.webp?v=1758528929"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43472855269475,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"NST01298Z7-MW02","requires_shipping":true,"taxable":true,"featured_image":{"id":34514964119651,"product_id":7823769665635,"position":12,"created_at":"2025-09-22T16:15:29+08:00","updated_at":"2025-09-22T16:15:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573896f636c577cd60efd0481e8d1e2611542609.webp?v=1758528931","variant_ids":[43472855269475]},"available":true,"name":"iPhone 15 Pro Max SolidX noiinoii 珍奶松鼠 - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298Z7-MW02","featured_media":{"alt":null,"id":26085404999779,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573896f636c577cd60efd0481e8d1e2611542609.webp?v=1758528931"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43494196412515,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NST0129857-MW02","requires_shipping":true,"taxable":true,"featured_image":{"id":34514962219107,"product_id":7823769665635,"position":8,"created_at":"2025-09-22T16:15:26+08:00","updated_at":"2025-09-22T16:15:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3225d9c0c34d507391edb4b42158cac53d5d87c2.webp?v=1758528928","variant_ids":[43494196412515]},"available":true,"name":"iPhone 15 Pro Max SolidX noiinoii 珍奶松鼠 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129857-MW02","featured_media":{"alt":null,"id":26085403132003,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3225d9c0c34d507391edb4b42158cac53d5d87c2.webp?v=1758528928"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-298-MW02.png?v=1750386211","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-295-MW02_09a83e3f-90cb-474e-89b9-c8e65252e422.png?v=1750831777","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c244176d1b2d796bdc66ce7b0aeaa8ffcd7c4502.webp?v=1758528925","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c42d5df76d0719c7b42e752d310adaccf1785a34.webp?v=1758528926","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c0f7b66bf7219bc6f3fce5bc0013ae32b02640.webp?v=1758528927","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d86f89a652516e1fa7e2ad6c8fb7ae54ada49cd.webp?v=1758528927","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34f7a8b6d128e6f73c085a6908781e0cdf06eb16.webp?v=1758528928","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3225d9c0c34d507391edb4b42158cac53d5d87c2.webp?v=1758528928","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9e81a97306c15a6a9b2930e89d4a3488391f717.webp?v=1758528929","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09a74655c7b72253af98f7fb3f10e2103fed30c5.webp?v=1758528929","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6cfe290b5a913bf30c4cd58afe232b13973857.webp?v=1758528930","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573896f636c577cd60efd0481e8d1e2611542609.webp?v=1758528931"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-298-MW02.png?v=1750386211","options":["color"],"media":[{"alt":null,"id":25720326619235,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-298-MW02.png?v=1750386211"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-298-MW02.png?v=1750386211","width":2000},{"alt":null,"id":25736258715747,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-295-MW02_09a83e3f-90cb-474e-89b9-c8e65252e422.png?v=1750831777"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-295-MW02_09a83e3f-90cb-474e-89b9-c8e65252e422.png?v=1750831777","width":2000},{"alt":null,"id":26085401296995,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c244176d1b2d796bdc66ce7b0aeaa8ffcd7c4502.webp?v=1758528925"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c244176d1b2d796bdc66ce7b0aeaa8ffcd7c4502.webp?v=1758528925","width":2000},{"alt":null,"id":26085401395299,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c42d5df76d0719c7b42e752d310adaccf1785a34.webp?v=1758528926"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c42d5df76d0719c7b42e752d310adaccf1785a34.webp?v=1758528926","width":2000},{"alt":null,"id":26085402050659,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c0f7b66bf7219bc6f3fce5bc0013ae32b02640.webp?v=1758528927"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c0f7b66bf7219bc6f3fce5bc0013ae32b02640.webp?v=1758528927","width":2000},{"alt":null,"id":26085402509411,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d86f89a652516e1fa7e2ad6c8fb7ae54ada49cd.webp?v=1758528927"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d86f89a652516e1fa7e2ad6c8fb7ae54ada49cd.webp?v=1758528927","width":2000},{"alt":null,"id":26085402738787,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34f7a8b6d128e6f73c085a6908781e0cdf06eb16.webp?v=1758528928"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34f7a8b6d128e6f73c085a6908781e0cdf06eb16.webp?v=1758528928","width":2000},{"alt":null,"id":26085403132003,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3225d9c0c34d507391edb4b42158cac53d5d87c2.webp?v=1758528928"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3225d9c0c34d507391edb4b42158cac53d5d87c2.webp?v=1758528928","width":2000},{"alt":null,"id":26085403656291,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9e81a97306c15a6a9b2930e89d4a3488391f717.webp?v=1758528929"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9e81a97306c15a6a9b2930e89d4a3488391f717.webp?v=1758528929","width":2000},{"alt":null,"id":26085404049507,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09a74655c7b72253af98f7fb3f10e2103fed30c5.webp?v=1758528929"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09a74655c7b72253af98f7fb3f10e2103fed30c5.webp?v=1758528929","width":2000},{"alt":null,"id":26085404344419,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6cfe290b5a913bf30c4cd58afe232b13973857.webp?v=1758528930"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6cfe290b5a913bf30c4cd58afe232b13973857.webp?v=1758528930","width":2000},{"alt":null,"id":26085404999779,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573896f636c577cd60efd0481e8d1e2611542609.webp?v=1758528931"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573896f636c577cd60efd0481e8d1e2611542609.webp?v=1758528931","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43472851828835,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-MW02","requires_shipping":true,"taxable":true,"featured_image":{"id":34514961465443,"product_id":7823769665635,"position":5,"created_at":"2025-09-22T16:15:24+08:00","updated_at":"2025-09-22T16:15:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c0f7b66bf7219bc6f3fce5bc0013ae32b02640.webp?v=1758528927","variant_ids":[43472851828835]},"available":true,"name":"iPhone 15 Pro Max SolidX noiinoii 珍奶松鼠 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129852-MW02","featured_media":{"alt":null,"id":26085402050659,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c0f7b66bf7219bc6f3fce5bc0013ae32b02640.webp?v=1758528927"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43472855138403,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129853-MW02","requires_shipping":true,"taxable":true,"featured_image":{"id":34514963431523,"product_id":7823769665635,"position":11,"created_at":"2025-09-22T16:15:28+08:00","updated_at":"2025-09-22T16:15:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6cfe290b5a913bf30c4cd58afe232b13973857.webp?v=1758528930","variant_ids":[43472855138403]},"available":true,"name":"iPhone 15 Pro Max SolidX noiinoii 珍奶松鼠 - White","public_title":"White","options":["White"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129853-MW02","featured_media":{"alt":null,"id":26085404344419,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6cfe290b5a913bf30c4cd58afe232b13973857.webp?v=1758528930"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43472855236707,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"NST01298O8-MW02","requires_shipping":true,"taxable":true,"featured_image":{"id":34514963136611,"product_id":7823769665635,"position":10,"created_at":"2025-09-22T16:15:27+08:00","updated_at":"2025-09-22T16:15:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09a74655c7b72253af98f7fb3f10e2103fed30c5.webp?v=1758528929","variant_ids":[43472855236707]},"available":true,"name":"iPhone 15 Pro Max SolidX noiinoii 珍奶松鼠 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298O8-MW02","featured_media":{"alt":null,"id":26085404049507,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09a74655c7b72253af98f7fb3f10e2103fed30c5.webp?v=1758528929"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43472855269475,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"NST01298Z7-MW02","requires_shipping":true,"taxable":true,"featured_image":{"id":34514964119651,"product_id":7823769665635,"position":12,"created_at":"2025-09-22T16:15:29+08:00","updated_at":"2025-09-22T16:15:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573896f636c577cd60efd0481e8d1e2611542609.webp?v=1758528931","variant_ids":[43472855269475]},"available":true,"name":"iPhone 15 Pro Max SolidX noiinoii 珍奶松鼠 - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298Z7-MW02","featured_media":{"alt":null,"id":26085404999779,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/573896f636c577cd60efd0481e8d1e2611542609.webp?v=1758528931"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43494196412515,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NST0129857-MW02","requires_shipping":true,"taxable":true,"featured_image":{"id":34514962219107,"product_id":7823769665635,"position":8,"created_at":"2025-09-22T16:15:26+08:00","updated_at":"2025-09-22T16:15:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3225d9c0c34d507391edb4b42158cac53d5d87c2.webp?v=1758528928","variant_ids":[43494196412515]},"available":true,"name":"iPhone 15 Pro Max SolidX noiinoii 珍奶松鼠 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129857-MW02","featured_media":{"alt":null,"id":26085403132003,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3225d9c0c34d507391edb4b42158cac53d5d87c2.webp?v=1758528928"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43472851828835,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-MW02","requires_shipping":true,"taxable":true,"featured_image":{"id":34514961465443,"product_id":7823769665635,"position":5,"created_at":"2025-09-22T16:15:24+08:00","updated_at":"2025-09-22T16:15:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c0f7b66bf7219bc6f3fce5bc0013ae32b02640.webp?v=1758528927","variant_ids":[43472851828835]},"available":true,"name":"iPhone 15 Pro Max SolidX noiinoii 珍奶松鼠 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129852-MW02","featured_media":{"alt":null,"id":26085402050659,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c0f7b66bf7219bc6f3fce5bc0013ae32b02640.webp?v=1758528927"}},"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: "停產"
}