$product = {"id":7937799618659,"title":"iPhone 12 \/ 12 Pro Mod NX 進擊的巨人 Attack on Titan 艾蓮","handle":"iphone-12-pro-mod-nx-xu05","description":null,"published_at":"2025-12-12T10:58:26+08:00","created_at":"2025-12-11T15:29:20+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-attack-on-titan","device-iPhone 12 Pro","merge","reseller-attack-on-titan"],"price":90000,"price_min":90000,"price_max":90000,"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":43883938644067,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"NPB01185C1-XU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34932578189411,"product_id":7937799618659,"position":3,"created_at":"2025-12-11T15:29:26+08:00","updated_at":"2025-12-11T15:29:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8155e8107b4c2896c146807e0373ab7ed4ce15ef.webp?v=1765438168","variant_ids":[43883938644067]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 進擊的巨人 Attack on Titan 艾蓮 - Lavender","public_title":"Lavender","options":["Lavender"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01185C1-XU05","featured_media":{"alt":null,"id":26494949982307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8155e8107b4c2896c146807e0373ab7ed4ce15ef.webp?v=1765438168"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883941920867,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"NPB0118569-XU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34932578025571,"product_id":7937799618659,"position":2,"created_at":"2025-12-11T15:29:26+08:00","updated_at":"2025-12-11T15:29:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a37c03a138bf8c8fd3bcf673e2deeee8ad58426b.webp?v=1765438168","variant_ids":[43883941920867]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 進擊的巨人 Attack on Titan 艾蓮 - Graphite","public_title":"Graphite","options":["Graphite"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118569-XU05","featured_media":{"alt":null,"id":26494949818467,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a37c03a138bf8c8fd3bcf673e2deeee8ad58426b.webp?v=1765438168"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883942084707,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118524-XU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34932579532899,"product_id":7937799618659,"position":10,"created_at":"2025-12-11T15:29:30+08:00","updated_at":"2025-12-11T15:29:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69b59b2f08ba51c739ccd017ed14f039ec5c4c7c.webp?v=1765438172","variant_ids":[43883942084707]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 進擊的巨人 Attack on Titan 艾蓮 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118524-XU05","featured_media":{"alt":null,"id":26494951325795,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69b59b2f08ba51c739ccd017ed14f039ec5c4c7c.webp?v=1765438172"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883942150243,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NPB0118504-XU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34932579303523,"product_id":7937799618659,"position":9,"created_at":"2025-12-11T15:29:29+08:00","updated_at":"2025-12-11T15:29:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e3a2929756fcccd3488bf9fa0e4e088091828ed.webp?v=1765438171","variant_ids":[43883942150243]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 進擊的巨人 Attack on Titan 艾蓮 - White","public_title":"White","options":["White"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118504-XU05","featured_media":{"alt":null,"id":26494951096419,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e3a2929756fcccd3488bf9fa0e4e088091828ed.webp?v=1765438171"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883942183011,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"NPB01185J5-XU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34932579696739,"product_id":7937799618659,"position":11,"created_at":"2025-12-11T15:29:30+08:00","updated_at":"2025-12-11T15:29:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cee9476a86dfe4ebfdd2bfaaabc17e3df8ca1d1.webp?v=1765438173","variant_ids":[43883942183011]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 進擊的巨人 Attack on Titan 艾蓮 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01185J5-XU05","featured_media":{"alt":null,"id":26494951653475,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cee9476a86dfe4ebfdd2bfaaabc17e3df8ca1d1.webp?v=1765438173"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1ec1076c1a1a6c3c9acb55746208d9206b8b6c4.webp?v=1765438167","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a37c03a138bf8c8fd3bcf673e2deeee8ad58426b.webp?v=1765438168","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8155e8107b4c2896c146807e0373ab7ed4ce15ef.webp?v=1765438168","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9291e298b56ccf77d51d22f4d86dd461e8dae1c.webp?v=1765438169","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54f5656a8b84f5651bc648b0f1991a5f13c51c6a.webp?v=1765438169","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed4724a3e3a07efeb85cb7c2e2ab07e8a6d9a362.webp?v=1765438170","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f76cde8929d1d089e9996f67059b120412d8f162.webp?v=1765438170","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/711d06400e47c2ea9c715319342b1c4697c6799d.webp?v=1765438171","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e3a2929756fcccd3488bf9fa0e4e088091828ed.webp?v=1765438171","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69b59b2f08ba51c739ccd017ed14f039ec5c4c7c.webp?v=1765438172","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cee9476a86dfe4ebfdd2bfaaabc17e3df8ca1d1.webp?v=1765438173"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1ec1076c1a1a6c3c9acb55746208d9206b8b6c4.webp?v=1765438167","options":["color"],"media":[{"alt":null,"id":26494949621859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1ec1076c1a1a6c3c9acb55746208d9206b8b6c4.webp?v=1765438167"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1ec1076c1a1a6c3c9acb55746208d9206b8b6c4.webp?v=1765438167","width":2000},{"alt":null,"id":26494949818467,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a37c03a138bf8c8fd3bcf673e2deeee8ad58426b.webp?v=1765438168"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a37c03a138bf8c8fd3bcf673e2deeee8ad58426b.webp?v=1765438168","width":2000},{"alt":null,"id":26494949982307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8155e8107b4c2896c146807e0373ab7ed4ce15ef.webp?v=1765438168"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8155e8107b4c2896c146807e0373ab7ed4ce15ef.webp?v=1765438168","width":2000},{"alt":null,"id":26494950080611,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9291e298b56ccf77d51d22f4d86dd461e8dae1c.webp?v=1765438169"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9291e298b56ccf77d51d22f4d86dd461e8dae1c.webp?v=1765438169","width":2000},{"alt":null,"id":26494950342755,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54f5656a8b84f5651bc648b0f1991a5f13c51c6a.webp?v=1765438169"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54f5656a8b84f5651bc648b0f1991a5f13c51c6a.webp?v=1765438169","width":2000},{"alt":null,"id":26494950637667,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed4724a3e3a07efeb85cb7c2e2ab07e8a6d9a362.webp?v=1765438170"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed4724a3e3a07efeb85cb7c2e2ab07e8a6d9a362.webp?v=1765438170","width":2000},{"alt":null,"id":26494950801507,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f76cde8929d1d089e9996f67059b120412d8f162.webp?v=1765438170"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f76cde8929d1d089e9996f67059b120412d8f162.webp?v=1765438170","width":2000},{"alt":null,"id":26494950899811,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/711d06400e47c2ea9c715319342b1c4697c6799d.webp?v=1765438171"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/711d06400e47c2ea9c715319342b1c4697c6799d.webp?v=1765438171","width":2000},{"alt":null,"id":26494951096419,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e3a2929756fcccd3488bf9fa0e4e088091828ed.webp?v=1765438171"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e3a2929756fcccd3488bf9fa0e4e088091828ed.webp?v=1765438171","width":2000},{"alt":null,"id":26494951325795,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69b59b2f08ba51c739ccd017ed14f039ec5c4c7c.webp?v=1765438172"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69b59b2f08ba51c739ccd017ed14f039ec5c4c7c.webp?v=1765438172","width":2000},{"alt":null,"id":26494951653475,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cee9476a86dfe4ebfdd2bfaaabc17e3df8ca1d1.webp?v=1765438173"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cee9476a86dfe4ebfdd2bfaaabc17e3df8ca1d1.webp?v=1765438173","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":43883938644067,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"NPB01185C1-XU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34932578189411,"product_id":7937799618659,"position":3,"created_at":"2025-12-11T15:29:26+08:00","updated_at":"2025-12-11T15:29:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8155e8107b4c2896c146807e0373ab7ed4ce15ef.webp?v=1765438168","variant_ids":[43883938644067]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 進擊的巨人 Attack on Titan 艾蓮 - Lavender","public_title":"Lavender","options":["Lavender"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01185C1-XU05","featured_media":{"alt":null,"id":26494949982307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8155e8107b4c2896c146807e0373ab7ed4ce15ef.webp?v=1765438168"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883941920867,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"NPB0118569-XU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34932578025571,"product_id":7937799618659,"position":2,"created_at":"2025-12-11T15:29:26+08:00","updated_at":"2025-12-11T15:29:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a37c03a138bf8c8fd3bcf673e2deeee8ad58426b.webp?v=1765438168","variant_ids":[43883941920867]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 進擊的巨人 Attack on Titan 艾蓮 - Graphite","public_title":"Graphite","options":["Graphite"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118569-XU05","featured_media":{"alt":null,"id":26494949818467,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a37c03a138bf8c8fd3bcf673e2deeee8ad58426b.webp?v=1765438168"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883942084707,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118524-XU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34932579532899,"product_id":7937799618659,"position":10,"created_at":"2025-12-11T15:29:30+08:00","updated_at":"2025-12-11T15:29:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69b59b2f08ba51c739ccd017ed14f039ec5c4c7c.webp?v=1765438172","variant_ids":[43883942084707]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 進擊的巨人 Attack on Titan 艾蓮 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118524-XU05","featured_media":{"alt":null,"id":26494951325795,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69b59b2f08ba51c739ccd017ed14f039ec5c4c7c.webp?v=1765438172"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883942150243,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NPB0118504-XU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34932579303523,"product_id":7937799618659,"position":9,"created_at":"2025-12-11T15:29:29+08:00","updated_at":"2025-12-11T15:29:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e3a2929756fcccd3488bf9fa0e4e088091828ed.webp?v=1765438171","variant_ids":[43883942150243]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 進擊的巨人 Attack on Titan 艾蓮 - White","public_title":"White","options":["White"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118504-XU05","featured_media":{"alt":null,"id":26494951096419,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e3a2929756fcccd3488bf9fa0e4e088091828ed.webp?v=1765438171"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883942183011,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"NPB01185J5-XU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34932579696739,"product_id":7937799618659,"position":11,"created_at":"2025-12-11T15:29:30+08:00","updated_at":"2025-12-11T15:29:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cee9476a86dfe4ebfdd2bfaaabc17e3df8ca1d1.webp?v=1765438173","variant_ids":[43883942183011]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 進擊的巨人 Attack on Titan 艾蓮 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01185J5-XU05","featured_media":{"alt":null,"id":26494951653475,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cee9476a86dfe4ebfdd2bfaaabc17e3df8ca1d1.webp?v=1765438173"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43883938644067,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"NPB01185C1-XU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34932578189411,"product_id":7937799618659,"position":3,"created_at":"2025-12-11T15:29:26+08:00","updated_at":"2025-12-11T15:29:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8155e8107b4c2896c146807e0373ab7ed4ce15ef.webp?v=1765438168","variant_ids":[43883938644067]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 進擊的巨人 Attack on Titan 艾蓮 - Lavender","public_title":"Lavender","options":["Lavender"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01185C1-XU05","featured_media":{"alt":null,"id":26494949982307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8155e8107b4c2896c146807e0373ab7ed4ce15ef.webp?v=1765438168"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null
var sellingStatus
if ($bumper) {
$(document).ready(function() {
var productImg = $product.images[0]
var bumperVariants = $bumper.variants;
var bumperColors = new Object();
var currentVariant = '';
var productType = '';
bumperVariants.forEach(variant => {
bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src;
});
if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') {
mergeImages(
[productImg, bumperColors[currentVariant]],
{ crossOrigin: 'anonymous' }
).then(mergedImg => {
$('.merged-img').attr('src', mergedImg);
});
} else {
mergeImages(
[bumperColors[currentVariant], productImg],
{ crossOrigin: 'anonymous' }
).then(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: "停產"
}