$product = {"id":7838027186275,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) BOUNCE Hello 棒小兔","handle":"iphone-12-pro-mod-nx-magsafe-hk67","description":null,"published_at":"2025-07-16T12:01:28+08:00","created_at":"2025-07-16T09:37:52+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-bounce","device-iPhone 12 Pro","merge","reseller-bounce"],"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":43528525676643,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-HK67","requires_shipping":true,"taxable":true,"featured_image":{"id":34193062101091,"product_id":7838027186275,"position":9,"created_at":"2025-07-16T09:38:02+08:00","updated_at":"2025-07-16T09:38:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb0313c0ec958ab4a57890600d3f6d45b17851c.webp?v=1752629884","variant_ids":[43528525676643]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) BOUNCE Hello 棒小兔 - 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-HK67","featured_media":{"alt":null,"id":25827252076643,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb0313c0ec958ab4a57890600d3f6d45b17851c.webp?v=1752629884"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43528528789603,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-HK67","requires_shipping":true,"taxable":true,"featured_image":{"id":34193058955363,"product_id":7838027186275,"position":3,"created_at":"2025-07-16T09:37:59+08:00","updated_at":"2025-07-16T09:38:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/033f1789e09c2640a4c26dcf6efea9b2740fe618.webp?v=1752629881","variant_ids":[43528528789603]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) BOUNCE Hello 棒小兔 - 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-HK67","featured_media":{"alt":null,"id":25827250372707,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/033f1789e09c2640a4c26dcf6efea9b2740fe618.webp?v=1752629881"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43528528822371,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-HK67","requires_shipping":true,"taxable":true,"featured_image":{"id":34193059414115,"product_id":7838027186275,"position":4,"created_at":"2025-07-16T09:37:59+08:00","updated_at":"2025-07-16T09:38:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0adf3a0b7deda623961a91014541785e8eb3bfa.webp?v=1752629881","variant_ids":[43528528822371]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) BOUNCE Hello 棒小兔 - 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-HK67","featured_media":{"alt":null,"id":25827250569315,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0adf3a0b7deda623961a91014541785e8eb3bfa.webp?v=1752629881"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43528528920675,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-HK67","requires_shipping":true,"taxable":true,"featured_image":{"id":34193060397155,"product_id":7838027186275,"position":6,"created_at":"2025-07-16T09:38:00+08:00","updated_at":"2025-07-16T09:38:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78b94251b3a8623c1db47f61697fff06fbb0f3eb.webp?v=1752629882","variant_ids":[43528528920675]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) BOUNCE Hello 棒小兔 - 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-HK67","featured_media":{"alt":null,"id":25827251093603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78b94251b3a8623c1db47f61697fff06fbb0f3eb.webp?v=1752629882"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43528529084515,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-HK67","requires_shipping":true,"taxable":true,"featured_image":{"id":34193062985827,"product_id":7838027186275,"position":11,"created_at":"2025-07-16T09:38:03+08:00","updated_at":"2025-07-16T09:38:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c1e0a3b01c957047ea2dcb6fad01a48fba80894.webp?v=1752629885","variant_ids":[43528529084515]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) BOUNCE Hello 棒小兔 - 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-HK67","featured_media":{"alt":null,"id":25827252666467,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c1e0a3b01c957047ea2dcb6fad01a48fba80894.webp?v=1752629885"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7ef1bd7e03bdd8fcae38da798ca04eb6a600790.webp?v=1752629880","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3f6ca2c736a2ee2907e7adad094e9a56cef839e.webp?v=1752629880","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/033f1789e09c2640a4c26dcf6efea9b2740fe618.webp?v=1752629881","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0adf3a0b7deda623961a91014541785e8eb3bfa.webp?v=1752629881","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4ee8e0dee1ce64437bd1e3b1eff37b9ca0527d7.webp?v=1752629882","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78b94251b3a8623c1db47f61697fff06fbb0f3eb.webp?v=1752629882","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89e007c2914b83f0d01c4a78f59407a423dc84a5.webp?v=1752629883","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ff544cc8f57df8c086d40d3fa70401a9d1aaac3.webp?v=1752629883","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb0313c0ec958ab4a57890600d3f6d45b17851c.webp?v=1752629884","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c737aa00d9cb56a4e9e532b845da5359fa69238e.webp?v=1752629884","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c1e0a3b01c957047ea2dcb6fad01a48fba80894.webp?v=1752629885"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7ef1bd7e03bdd8fcae38da798ca04eb6a600790.webp?v=1752629880","options":["color"],"media":[{"alt":null,"id":25827249946723,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7ef1bd7e03bdd8fcae38da798ca04eb6a600790.webp?v=1752629880"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7ef1bd7e03bdd8fcae38da798ca04eb6a600790.webp?v=1752629880","width":2000},{"alt":null,"id":25827250208867,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3f6ca2c736a2ee2907e7adad094e9a56cef839e.webp?v=1752629880"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3f6ca2c736a2ee2907e7adad094e9a56cef839e.webp?v=1752629880","width":2000},{"alt":null,"id":25827250372707,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/033f1789e09c2640a4c26dcf6efea9b2740fe618.webp?v=1752629881"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/033f1789e09c2640a4c26dcf6efea9b2740fe618.webp?v=1752629881","width":2000},{"alt":null,"id":25827250569315,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0adf3a0b7deda623961a91014541785e8eb3bfa.webp?v=1752629881"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0adf3a0b7deda623961a91014541785e8eb3bfa.webp?v=1752629881","width":2000},{"alt":null,"id":25827250864227,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4ee8e0dee1ce64437bd1e3b1eff37b9ca0527d7.webp?v=1752629882"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4ee8e0dee1ce64437bd1e3b1eff37b9ca0527d7.webp?v=1752629882","width":2000},{"alt":null,"id":25827251093603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78b94251b3a8623c1db47f61697fff06fbb0f3eb.webp?v=1752629882"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78b94251b3a8623c1db47f61697fff06fbb0f3eb.webp?v=1752629882","width":2000},{"alt":null,"id":25827251421283,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89e007c2914b83f0d01c4a78f59407a423dc84a5.webp?v=1752629883"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89e007c2914b83f0d01c4a78f59407a423dc84a5.webp?v=1752629883","width":2000},{"alt":null,"id":25827251748963,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ff544cc8f57df8c086d40d3fa70401a9d1aaac3.webp?v=1752629883"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ff544cc8f57df8c086d40d3fa70401a9d1aaac3.webp?v=1752629883","width":2000},{"alt":null,"id":25827252076643,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb0313c0ec958ab4a57890600d3f6d45b17851c.webp?v=1752629884"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb0313c0ec958ab4a57890600d3f6d45b17851c.webp?v=1752629884","width":2000},{"alt":null,"id":25827252437091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c737aa00d9cb56a4e9e532b845da5359fa69238e.webp?v=1752629884"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c737aa00d9cb56a4e9e532b845da5359fa69238e.webp?v=1752629884","width":2000},{"alt":null,"id":25827252666467,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c1e0a3b01c957047ea2dcb6fad01a48fba80894.webp?v=1752629885"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c1e0a3b01c957047ea2dcb6fad01a48fba80894.webp?v=1752629885","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43528525676643,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-HK67","requires_shipping":true,"taxable":true,"featured_image":{"id":34193062101091,"product_id":7838027186275,"position":9,"created_at":"2025-07-16T09:38:02+08:00","updated_at":"2025-07-16T09:38:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb0313c0ec958ab4a57890600d3f6d45b17851c.webp?v=1752629884","variant_ids":[43528525676643]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) BOUNCE Hello 棒小兔 - 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-HK67","featured_media":{"alt":null,"id":25827252076643,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb0313c0ec958ab4a57890600d3f6d45b17851c.webp?v=1752629884"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43528528789603,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-HK67","requires_shipping":true,"taxable":true,"featured_image":{"id":34193058955363,"product_id":7838027186275,"position":3,"created_at":"2025-07-16T09:37:59+08:00","updated_at":"2025-07-16T09:38:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/033f1789e09c2640a4c26dcf6efea9b2740fe618.webp?v=1752629881","variant_ids":[43528528789603]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) BOUNCE Hello 棒小兔 - 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-HK67","featured_media":{"alt":null,"id":25827250372707,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/033f1789e09c2640a4c26dcf6efea9b2740fe618.webp?v=1752629881"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43528528822371,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-HK67","requires_shipping":true,"taxable":true,"featured_image":{"id":34193059414115,"product_id":7838027186275,"position":4,"created_at":"2025-07-16T09:37:59+08:00","updated_at":"2025-07-16T09:38:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0adf3a0b7deda623961a91014541785e8eb3bfa.webp?v=1752629881","variant_ids":[43528528822371]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) BOUNCE Hello 棒小兔 - 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-HK67","featured_media":{"alt":null,"id":25827250569315,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0adf3a0b7deda623961a91014541785e8eb3bfa.webp?v=1752629881"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43528528920675,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-HK67","requires_shipping":true,"taxable":true,"featured_image":{"id":34193060397155,"product_id":7838027186275,"position":6,"created_at":"2025-07-16T09:38:00+08:00","updated_at":"2025-07-16T09:38:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78b94251b3a8623c1db47f61697fff06fbb0f3eb.webp?v=1752629882","variant_ids":[43528528920675]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) BOUNCE Hello 棒小兔 - 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-HK67","featured_media":{"alt":null,"id":25827251093603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78b94251b3a8623c1db47f61697fff06fbb0f3eb.webp?v=1752629882"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43528529084515,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-HK67","requires_shipping":true,"taxable":true,"featured_image":{"id":34193062985827,"product_id":7838027186275,"position":11,"created_at":"2025-07-16T09:38:03+08:00","updated_at":"2025-07-16T09:38:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c1e0a3b01c957047ea2dcb6fad01a48fba80894.webp?v=1752629885","variant_ids":[43528529084515]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) BOUNCE Hello 棒小兔 - 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-HK67","featured_media":{"alt":null,"id":25827252666467,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c1e0a3b01c957047ea2dcb6fad01a48fba80894.webp?v=1752629885"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43528525676643,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-HK67","requires_shipping":true,"taxable":true,"featured_image":{"id":34193062101091,"product_id":7838027186275,"position":9,"created_at":"2025-07-16T09:38:02+08:00","updated_at":"2025-07-16T09:38:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb0313c0ec958ab4a57890600d3f6d45b17851c.webp?v=1752629884","variant_ids":[43528525676643]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) BOUNCE Hello 棒小兔 - 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-HK67","featured_media":{"alt":null,"id":25827252076643,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb0313c0ec958ab4a57890600d3f6d45b17851c.webp?v=1752629884"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$type = "";
var sellingStatus
if ($isMerge) {
$(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: "停產"
}