$product = {"id":7995405959267,"title":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人","handle":"iphone-13-mini-solidsuit-classic-magsafe-oo163","description":null,"published_at":"2026-04-15T15:08:27+08:00","created_at":"2026-04-14T10:20:30+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-harry-potter","device-iPhone 13 Mini","merge","reseller-harry-potter"],"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":44115752714339,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"MST0122857-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643137294435,"product_id":7995405959267,"position":3,"created_at":"2026-04-14T10:21:08+08:00","updated_at":"2026-04-14T10:21:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f282f51cc27d7159118ea79ceaa043dacf6a811.webp?v=1776133270","variant_ids":[44115752714339]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - 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":"MST0122857-OO163","featured_media":{"alt":null,"id":27171816177763,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f282f51cc27d7159118ea79ceaa043dacf6a811.webp?v=1776133270"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44115766575203,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST012280E-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643136933987,"product_id":7995405959267,"position":2,"created_at":"2026-04-14T10:21:07+08:00","updated_at":"2026-04-14T10:21:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c2055f7d5cd6e182f8baeccef899a6b0d6dce48.webp?v=1776133270","variant_ids":[44115766575203]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - Parakeet Green","public_title":"Parakeet Green","options":["Parakeet Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012280E-OO163","featured_media":{"alt":null,"id":27171815817315,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c2055f7d5cd6e182f8baeccef899a6b0d6dce48.webp?v=1776133270"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44115766870115,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"MST012280B-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643138179171,"product_id":7995405959267,"position":7,"created_at":"2026-04-14T10:21:11+08:00","updated_at":"2026-04-14T10:21:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8d1b3c7f0676146e137212fa5c6274c5d0a6d5.webp?v=1776133273","variant_ids":[44115766870115]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012280B-OO163","featured_media":{"alt":null,"id":27171817062499,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8d1b3c7f0676146e137212fa5c6274c5d0a6d5.webp?v=1776133273"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44115767197795,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01228Z9-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643137589347,"product_id":7995405959267,"position":4,"created_at":"2026-04-14T10:21:09+08:00","updated_at":"2026-04-14T10:21:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5db8669bea21c1e09e18e521279277443a692aae.webp?v=1776133271","variant_ids":[44115767197795]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z9-OO163","featured_media":{"alt":null,"id":27171816472675,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5db8669bea21c1e09e18e521279277443a692aae.webp?v=1776133271"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44115767394403,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643137818723,"product_id":7995405959267,"position":5,"created_at":"2026-04-14T10:21:09+08:00","updated_at":"2026-04-14T10:21:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/724f2da86a87f62f8ab89265cd9870d136803d1f.webp?v=1776133273","variant_ids":[44115767394403]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-OO163","featured_media":{"alt":null,"id":27171816702051,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/724f2da86a87f62f8ab89265cd9870d136803d1f.webp?v=1776133273"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44115767787619,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643138015331,"product_id":7995405959267,"position":6,"created_at":"2026-04-14T10:21:10+08:00","updated_at":"2026-04-14T10:21:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b72ff5a5bbf7fd0d95c475589813a6cc4d187cc8.webp?v=1776133272","variant_ids":[44115767787619]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-OO163","featured_media":{"alt":null,"id":27171816898659,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b72ff5a5bbf7fd0d95c475589813a6cc4d187cc8.webp?v=1776133272"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82c0b5fcef62c76ab38ed3fdff85563629c0a529.webp?v=1776133269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c2055f7d5cd6e182f8baeccef899a6b0d6dce48.webp?v=1776133270","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f282f51cc27d7159118ea79ceaa043dacf6a811.webp?v=1776133270","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5db8669bea21c1e09e18e521279277443a692aae.webp?v=1776133271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/724f2da86a87f62f8ab89265cd9870d136803d1f.webp?v=1776133273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b72ff5a5bbf7fd0d95c475589813a6cc4d187cc8.webp?v=1776133272","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8d1b3c7f0676146e137212fa5c6274c5d0a6d5.webp?v=1776133273"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82c0b5fcef62c76ab38ed3fdff85563629c0a529.webp?v=1776133269","options":["color"],"media":[{"alt":null,"id":27171815424099,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82c0b5fcef62c76ab38ed3fdff85563629c0a529.webp?v=1776133269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82c0b5fcef62c76ab38ed3fdff85563629c0a529.webp?v=1776133269","width":2000},{"alt":null,"id":27171815817315,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c2055f7d5cd6e182f8baeccef899a6b0d6dce48.webp?v=1776133270"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c2055f7d5cd6e182f8baeccef899a6b0d6dce48.webp?v=1776133270","width":2000},{"alt":null,"id":27171816177763,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f282f51cc27d7159118ea79ceaa043dacf6a811.webp?v=1776133270"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f282f51cc27d7159118ea79ceaa043dacf6a811.webp?v=1776133270","width":2000},{"alt":null,"id":27171816472675,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5db8669bea21c1e09e18e521279277443a692aae.webp?v=1776133271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5db8669bea21c1e09e18e521279277443a692aae.webp?v=1776133271","width":2000},{"alt":null,"id":27171816702051,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/724f2da86a87f62f8ab89265cd9870d136803d1f.webp?v=1776133273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/724f2da86a87f62f8ab89265cd9870d136803d1f.webp?v=1776133273","width":2000},{"alt":null,"id":27171816898659,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b72ff5a5bbf7fd0d95c475589813a6cc4d187cc8.webp?v=1776133272"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b72ff5a5bbf7fd0d95c475589813a6cc4d187cc8.webp?v=1776133272","width":2000},{"alt":null,"id":27171817062499,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8d1b3c7f0676146e137212fa5c6274c5d0a6d5.webp?v=1776133273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8d1b3c7f0676146e137212fa5c6274c5d0a6d5.webp?v=1776133273","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":44115752714339,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"MST0122857-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643137294435,"product_id":7995405959267,"position":3,"created_at":"2026-04-14T10:21:08+08:00","updated_at":"2026-04-14T10:21:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f282f51cc27d7159118ea79ceaa043dacf6a811.webp?v=1776133270","variant_ids":[44115752714339]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - 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":"MST0122857-OO163","featured_media":{"alt":null,"id":27171816177763,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f282f51cc27d7159118ea79ceaa043dacf6a811.webp?v=1776133270"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44115766575203,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST012280E-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643136933987,"product_id":7995405959267,"position":2,"created_at":"2026-04-14T10:21:07+08:00","updated_at":"2026-04-14T10:21:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c2055f7d5cd6e182f8baeccef899a6b0d6dce48.webp?v=1776133270","variant_ids":[44115766575203]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - Parakeet Green","public_title":"Parakeet Green","options":["Parakeet Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012280E-OO163","featured_media":{"alt":null,"id":27171815817315,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c2055f7d5cd6e182f8baeccef899a6b0d6dce48.webp?v=1776133270"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44115766870115,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"MST012280B-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643138179171,"product_id":7995405959267,"position":7,"created_at":"2026-04-14T10:21:11+08:00","updated_at":"2026-04-14T10:21:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8d1b3c7f0676146e137212fa5c6274c5d0a6d5.webp?v=1776133273","variant_ids":[44115766870115]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012280B-OO163","featured_media":{"alt":null,"id":27171817062499,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8d1b3c7f0676146e137212fa5c6274c5d0a6d5.webp?v=1776133273"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44115767197795,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01228Z9-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643137589347,"product_id":7995405959267,"position":4,"created_at":"2026-04-14T10:21:09+08:00","updated_at":"2026-04-14T10:21:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5db8669bea21c1e09e18e521279277443a692aae.webp?v=1776133271","variant_ids":[44115767197795]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z9-OO163","featured_media":{"alt":null,"id":27171816472675,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5db8669bea21c1e09e18e521279277443a692aae.webp?v=1776133271"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44115767394403,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643137818723,"product_id":7995405959267,"position":5,"created_at":"2026-04-14T10:21:09+08:00","updated_at":"2026-04-14T10:21:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/724f2da86a87f62f8ab89265cd9870d136803d1f.webp?v=1776133273","variant_ids":[44115767394403]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-OO163","featured_media":{"alt":null,"id":27171816702051,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/724f2da86a87f62f8ab89265cd9870d136803d1f.webp?v=1776133273"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44115767787619,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643138015331,"product_id":7995405959267,"position":6,"created_at":"2026-04-14T10:21:10+08:00","updated_at":"2026-04-14T10:21:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b72ff5a5bbf7fd0d95c475589813a6cc4d187cc8.webp?v=1776133272","variant_ids":[44115767787619]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-OO163","featured_media":{"alt":null,"id":27171816898659,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b72ff5a5bbf7fd0d95c475589813a6cc4d187cc8.webp?v=1776133272"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":44115752714339,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"MST0122857-OO163","requires_shipping":true,"taxable":true,"featured_image":{"id":35643137294435,"product_id":7995405959267,"position":3,"created_at":"2026-04-14T10:21:08+08:00","updated_at":"2026-04-14T10:21:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f282f51cc27d7159118ea79ceaa043dacf6a811.webp?v=1776133270","variant_ids":[44115752714339]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Harry Potter 哈利波特-食死人 - 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":"MST0122857-OO163","featured_media":{"alt":null,"id":27171816177763,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f282f51cc27d7159118ea79ceaa043dacf6a811.webp?v=1776133270"}},"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: "停產"
}