$product = {"id":7830875308131,"title":"iPhone 12 \/ 12 Pro Mod NX 不只是情人節:愛的方程式 愛的方程式:心跳(紅)","handle":"iphone-12-pro-mod-nx-bumper-original-design-dk02","description":null,"published_at":"2025-07-04T10:18:41+08:00","created_at":"2025-07-03T16:09:08+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer-valentines-day-collection","device-iPhone 12 Pro","discountable-item","merge","original-design","reseller-valentines-day-collection"],"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":43507338739811,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"NPB01185C1-DK02","requires_shipping":true,"taxable":true,"featured_image":{"id":34116438982755,"product_id":7830875308131,"position":1,"created_at":"2025-07-03T16:09:10+08:00","updated_at":"2025-07-03T16:09:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1725e8342f965c7efa8d36c42573f378287d0f7.webp?v=1751530152","variant_ids":[43507338739811]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 不只是情人節:愛的方程式 愛的方程式:心跳(紅) - 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-DK02","featured_media":{"alt":null,"id":25769455026275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1725e8342f965c7efa8d36c42573f378287d0f7.webp?v=1751530152"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43507340771427,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"NPB01185J5-DK02","requires_shipping":true,"taxable":true,"featured_image":{"id":34116445110371,"product_id":7830875308131,"position":10,"created_at":"2025-07-03T16:09:15+08:00","updated_at":"2025-07-03T16:09:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1afe14a89f871972b95cf8928f1a37ab0fa67d1.webp?v=1751530157","variant_ids":[43507340771427]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 不只是情人節:愛的方程式 愛的方程式:心跳(紅) - 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-DK02","featured_media":{"alt":null,"id":25769458139235,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1afe14a89f871972b95cf8928f1a37ab0fa67d1.webp?v=1751530157"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43507340836963,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"NPB0118569-DK02","requires_shipping":true,"taxable":true,"featured_image":{"id":34116445634659,"product_id":7830875308131,"position":11,"created_at":"2025-07-03T16:09:16+08:00","updated_at":"2025-07-03T16:09:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31bcfc4a30a590ff4c3bfb54544f12c34411ac75.webp?v=1751530158","variant_ids":[43507340836963]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 不只是情人節:愛的方程式 愛的方程式:心跳(紅) - 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-DK02","featured_media":{"alt":null,"id":25769458532451,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31bcfc4a30a590ff4c3bfb54544f12c34411ac75.webp?v=1751530158"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43507340935267,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118524-DK02","requires_shipping":true,"taxable":true,"featured_image":{"id":34116443504739,"product_id":7830875308131,"position":8,"created_at":"2025-07-03T16:09:14+08:00","updated_at":"2025-07-03T16:09:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c2631a7d3bef9bd1e47bf341ecfb0311dfb00f.webp?v=1751530156","variant_ids":[43507340935267]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 不只是情人節:愛的方程式 愛的方程式:心跳(紅) - 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-DK02","featured_media":{"alt":null,"id":25769457123427,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c2631a7d3bef9bd1e47bf341ecfb0311dfb00f.webp?v=1751530156"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43507341066339,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NPB0118504-DK02","requires_shipping":true,"taxable":true,"featured_image":{"id":34116439375971,"product_id":7830875308131,"position":2,"created_at":"2025-07-03T16:09:11+08:00","updated_at":"2025-07-03T16:09:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71824bd4cc9d9215cce7363db65a9a8f1cba7196.webp?v=1751530152","variant_ids":[43507341066339]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 不只是情人節:愛的方程式 愛的方程式:心跳(紅) - 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-DK02","featured_media":{"alt":null,"id":25769455353955,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71824bd4cc9d9215cce7363db65a9a8f1cba7196.webp?v=1751530152"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1725e8342f965c7efa8d36c42573f378287d0f7.webp?v=1751530152","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71824bd4cc9d9215cce7363db65a9a8f1cba7196.webp?v=1751530152","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a36a72827720afd497716a6a8accb8682f31497.webp?v=1751530153","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3456c5d1d4da767966c640c50e9a76a51d7a4b99.webp?v=1751530154","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ddf652d6a146a9dd8ee1008ebfd08e47563b2aa.webp?v=1751530154","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9434263229f32353ecf068e45271c102bd82af6.webp?v=1751530155","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f2c9aba2437eb8abe017b74bd253500cfcdf2e8.webp?v=1751530156","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c2631a7d3bef9bd1e47bf341ecfb0311dfb00f.webp?v=1751530156","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00dcbb5b5fd46da3b0e7d54102044ab66553cbec.webp?v=1751530157","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1afe14a89f871972b95cf8928f1a37ab0fa67d1.webp?v=1751530157","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31bcfc4a30a590ff4c3bfb54544f12c34411ac75.webp?v=1751530158"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1725e8342f965c7efa8d36c42573f378287d0f7.webp?v=1751530152","options":["color"],"media":[{"alt":null,"id":25769455026275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1725e8342f965c7efa8d36c42573f378287d0f7.webp?v=1751530152"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1725e8342f965c7efa8d36c42573f378287d0f7.webp?v=1751530152","width":2000},{"alt":null,"id":25769455353955,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71824bd4cc9d9215cce7363db65a9a8f1cba7196.webp?v=1751530152"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71824bd4cc9d9215cce7363db65a9a8f1cba7196.webp?v=1751530152","width":2000},{"alt":null,"id":25769455583331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a36a72827720afd497716a6a8accb8682f31497.webp?v=1751530153"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a36a72827720afd497716a6a8accb8682f31497.webp?v=1751530153","width":2000},{"alt":null,"id":25769456009315,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3456c5d1d4da767966c640c50e9a76a51d7a4b99.webp?v=1751530154"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3456c5d1d4da767966c640c50e9a76a51d7a4b99.webp?v=1751530154","width":2000},{"alt":null,"id":25769456205923,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ddf652d6a146a9dd8ee1008ebfd08e47563b2aa.webp?v=1751530154"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ddf652d6a146a9dd8ee1008ebfd08e47563b2aa.webp?v=1751530154","width":2000},{"alt":null,"id":25769456468067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9434263229f32353ecf068e45271c102bd82af6.webp?v=1751530155"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9434263229f32353ecf068e45271c102bd82af6.webp?v=1751530155","width":2000},{"alt":null,"id":25769456828515,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f2c9aba2437eb8abe017b74bd253500cfcdf2e8.webp?v=1751530156"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f2c9aba2437eb8abe017b74bd253500cfcdf2e8.webp?v=1751530156","width":2000},{"alt":null,"id":25769457123427,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c2631a7d3bef9bd1e47bf341ecfb0311dfb00f.webp?v=1751530156"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c2631a7d3bef9bd1e47bf341ecfb0311dfb00f.webp?v=1751530156","width":2000},{"alt":null,"id":25769457483875,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00dcbb5b5fd46da3b0e7d54102044ab66553cbec.webp?v=1751530157"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00dcbb5b5fd46da3b0e7d54102044ab66553cbec.webp?v=1751530157","width":2000},{"alt":null,"id":25769458139235,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1afe14a89f871972b95cf8928f1a37ab0fa67d1.webp?v=1751530157"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1afe14a89f871972b95cf8928f1a37ab0fa67d1.webp?v=1751530157","width":2000},{"alt":null,"id":25769458532451,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31bcfc4a30a590ff4c3bfb54544f12c34411ac75.webp?v=1751530158"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31bcfc4a30a590ff4c3bfb54544f12c34411ac75.webp?v=1751530158","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43507338739811,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"NPB01185C1-DK02","requires_shipping":true,"taxable":true,"featured_image":{"id":34116438982755,"product_id":7830875308131,"position":1,"created_at":"2025-07-03T16:09:10+08:00","updated_at":"2025-07-03T16:09:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1725e8342f965c7efa8d36c42573f378287d0f7.webp?v=1751530152","variant_ids":[43507338739811]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 不只是情人節:愛的方程式 愛的方程式:心跳(紅) - 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-DK02","featured_media":{"alt":null,"id":25769455026275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1725e8342f965c7efa8d36c42573f378287d0f7.webp?v=1751530152"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43507340771427,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"NPB01185J5-DK02","requires_shipping":true,"taxable":true,"featured_image":{"id":34116445110371,"product_id":7830875308131,"position":10,"created_at":"2025-07-03T16:09:15+08:00","updated_at":"2025-07-03T16:09:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1afe14a89f871972b95cf8928f1a37ab0fa67d1.webp?v=1751530157","variant_ids":[43507340771427]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 不只是情人節:愛的方程式 愛的方程式:心跳(紅) - 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-DK02","featured_media":{"alt":null,"id":25769458139235,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1afe14a89f871972b95cf8928f1a37ab0fa67d1.webp?v=1751530157"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43507340836963,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"NPB0118569-DK02","requires_shipping":true,"taxable":true,"featured_image":{"id":34116445634659,"product_id":7830875308131,"position":11,"created_at":"2025-07-03T16:09:16+08:00","updated_at":"2025-07-03T16:09:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31bcfc4a30a590ff4c3bfb54544f12c34411ac75.webp?v=1751530158","variant_ids":[43507340836963]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 不只是情人節:愛的方程式 愛的方程式:心跳(紅) - 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-DK02","featured_media":{"alt":null,"id":25769458532451,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31bcfc4a30a590ff4c3bfb54544f12c34411ac75.webp?v=1751530158"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43507340935267,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118524-DK02","requires_shipping":true,"taxable":true,"featured_image":{"id":34116443504739,"product_id":7830875308131,"position":8,"created_at":"2025-07-03T16:09:14+08:00","updated_at":"2025-07-03T16:09:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c2631a7d3bef9bd1e47bf341ecfb0311dfb00f.webp?v=1751530156","variant_ids":[43507340935267]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 不只是情人節:愛的方程式 愛的方程式:心跳(紅) - 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-DK02","featured_media":{"alt":null,"id":25769457123427,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c2631a7d3bef9bd1e47bf341ecfb0311dfb00f.webp?v=1751530156"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43507341066339,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NPB0118504-DK02","requires_shipping":true,"taxable":true,"featured_image":{"id":34116439375971,"product_id":7830875308131,"position":2,"created_at":"2025-07-03T16:09:11+08:00","updated_at":"2025-07-03T16:09:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71824bd4cc9d9215cce7363db65a9a8f1cba7196.webp?v=1751530152","variant_ids":[43507341066339]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 不只是情人節:愛的方程式 愛的方程式:心跳(紅) - 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-DK02","featured_media":{"alt":null,"id":25769455353955,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71824bd4cc9d9215cce7363db65a9a8f1cba7196.webp?v=1751530152"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43507338739811,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"NPB01185C1-DK02","requires_shipping":true,"taxable":true,"featured_image":{"id":34116438982755,"product_id":7830875308131,"position":1,"created_at":"2025-07-03T16:09:10+08:00","updated_at":"2025-07-03T16:09:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1725e8342f965c7efa8d36c42573f378287d0f7.webp?v=1751530152","variant_ids":[43507338739811]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX 不只是情人節:愛的方程式 愛的方程式:心跳(紅) - 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-DK02","featured_media":{"alt":null,"id":25769455026275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1725e8342f965c7efa8d36c42573f378287d0f7.webp?v=1751530152"}},"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: "停產"
}