Home
›
iPhone 13 mini SolidSuit (MagSafe 兼容) OSAMU GOODS 經典復古系列-Cat
$product = {"id":7836768469091,"title":"iPhone 13 mini SolidSuit (MagSafe 兼容) OSAMU GOODS 經典復古系列-Cat","handle":"iphone-13-mini-solidsuit-magsafe-bumper-back-crossover-design-yn29","description":null,"published_at":"2025-07-14T16:16:36+08:00","created_at":"2025-07-14T09:42:58+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-osamugoods","device-iPhone 13 Mini","merge","reseller-osamugoods"],"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":43524847206499,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-YN29","requires_shipping":true,"taxable":true,"featured_image":{"id":34180147839075,"product_id":7836768469091,"position":16,"created_at":"2025-07-14T15:02:18+08:00","updated_at":"2025-07-14T15:02:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a4df46e28d04600bf76ccbdf238413833fe153_4462b646-297f-41dd-af26-b853f8dbce73.webp?v=1752476540","variant_ids":[43524847206499]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) OSAMU GOODS 經典復古系列-Cat - 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-YN29","featured_media":{"alt":null,"id":25817203146851,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a4df46e28d04600bf76ccbdf238413833fe153_4462b646-297f-41dd-af26-b853f8dbce73.webp?v=1752476540"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43524847239267,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01228Z9-YN29","requires_shipping":true,"taxable":true,"featured_image":{"id":34177951826019,"product_id":7836768469091,"position":2,"created_at":"2025-07-14T09:43:04+08:00","updated_at":"2025-07-14T09:43:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77add1b36b2dccf359cba6872a5bc3154759d78d.webp?v=1752457386","variant_ids":[43524847239267]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) OSAMU GOODS 經典復古系列-Cat - 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-YN29","featured_media":{"alt":null,"id":25815742054499,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77add1b36b2dccf359cba6872a5bc3154759d78d.webp?v=1752457386"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43524847304803,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-YN29","requires_shipping":true,"taxable":true,"featured_image":{"id":34177951236195,"product_id":7836768469091,"position":1,"created_at":"2025-07-14T09:43:03+08:00","updated_at":"2025-07-14T09:43:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67dac37b4712ee0226a7289d7aed7c450e73566.webp?v=1752457385","variant_ids":[43524847304803]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) OSAMU GOODS 經典復古系列-Cat - 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-YN29","featured_media":{"alt":null,"id":25815741530211,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67dac37b4712ee0226a7289d7aed7c450e73566.webp?v=1752457385"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67dac37b4712ee0226a7289d7aed7c450e73566.webp?v=1752457385","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77add1b36b2dccf359cba6872a5bc3154759d78d.webp?v=1752457386","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a912fe7d323c8be06e0a2f60aa922b4f12baa464.webp?v=1752457386","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09b58f5758e9fcc77ae31e15b626af23b23defcb.webp?v=1752457386","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/435d1085a61db40e4f72ccc910a985038f6fa6fb.webp?v=1752457387","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ed861172c15f0905d2c1ec5ed96a519c08a074f.webp?v=1752457388","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a4df46e28d04600bf76ccbdf238413833fe153.webp?v=1752457388","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f645ad852238b94a116f7f724b90eddc299ab8e2.webp?v=1752457389","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f645ad852238b94a116f7f724b90eddc299ab8e2_c35a6dc7-5a4f-4e66-a2dd-face92b48550.webp?v=1752476536","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/435d1085a61db40e4f72ccc910a985038f6fa6fb_43d597cb-3142-43ce-a3f8-2379351ef51f.webp?v=1752476537","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ed861172c15f0905d2c1ec5ed96a519c08a074f_b922e48b-ee5f-4fe6-8bb4-20d814887e89.webp?v=1752476537","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77add1b36b2dccf359cba6872a5bc3154759d78d_bab4e2f8-c779-4912-b136-5be8704b317e.webp?v=1752476538","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67dac37b4712ee0226a7289d7aed7c450e73566_91e0a7b3-88ad-4af9-8373-e4a3a38d5b58.webp?v=1752476538","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09b58f5758e9fcc77ae31e15b626af23b23defcb_4b176849-75cf-44a1-b807-edaebce6b168.webp?v=1752476539","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a912fe7d323c8be06e0a2f60aa922b4f12baa464_fdbf538d-523c-46b1-ae1b-fe2fc4bd7763.webp?v=1752476540","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a4df46e28d04600bf76ccbdf238413833fe153_4462b646-297f-41dd-af26-b853f8dbce73.webp?v=1752476540"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67dac37b4712ee0226a7289d7aed7c450e73566.webp?v=1752457385","options":["color"],"media":[{"alt":null,"id":25815741530211,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67dac37b4712ee0226a7289d7aed7c450e73566.webp?v=1752457385"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67dac37b4712ee0226a7289d7aed7c450e73566.webp?v=1752457385","width":2000},{"alt":null,"id":25815742054499,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77add1b36b2dccf359cba6872a5bc3154759d78d.webp?v=1752457386"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77add1b36b2dccf359cba6872a5bc3154759d78d.webp?v=1752457386","width":2000},{"alt":null,"id":25815742316643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a912fe7d323c8be06e0a2f60aa922b4f12baa464.webp?v=1752457386"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a912fe7d323c8be06e0a2f60aa922b4f12baa464.webp?v=1752457386","width":2000},{"alt":null,"id":25815742447715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09b58f5758e9fcc77ae31e15b626af23b23defcb.webp?v=1752457386"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09b58f5758e9fcc77ae31e15b626af23b23defcb.webp?v=1752457386","width":2000},{"alt":null,"id":25815742709859,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/435d1085a61db40e4f72ccc910a985038f6fa6fb.webp?v=1752457387"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/435d1085a61db40e4f72ccc910a985038f6fa6fb.webp?v=1752457387","width":2000},{"alt":null,"id":25815742972003,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ed861172c15f0905d2c1ec5ed96a519c08a074f.webp?v=1752457388"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ed861172c15f0905d2c1ec5ed96a519c08a074f.webp?v=1752457388","width":2000},{"alt":null,"id":25815743103075,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a4df46e28d04600bf76ccbdf238413833fe153.webp?v=1752457388"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a4df46e28d04600bf76ccbdf238413833fe153.webp?v=1752457388","width":2000},{"alt":null,"id":25815743201379,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f645ad852238b94a116f7f724b90eddc299ab8e2.webp?v=1752457389"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f645ad852238b94a116f7f724b90eddc299ab8e2.webp?v=1752457389","width":2000},{"alt":null,"id":25817201705059,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f645ad852238b94a116f7f724b90eddc299ab8e2_c35a6dc7-5a4f-4e66-a2dd-face92b48550.webp?v=1752476536"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f645ad852238b94a116f7f724b90eddc299ab8e2_c35a6dc7-5a4f-4e66-a2dd-face92b48550.webp?v=1752476536","width":2000},{"alt":null,"id":25817201934435,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/435d1085a61db40e4f72ccc910a985038f6fa6fb_43d597cb-3142-43ce-a3f8-2379351ef51f.webp?v=1752476537"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/435d1085a61db40e4f72ccc910a985038f6fa6fb_43d597cb-3142-43ce-a3f8-2379351ef51f.webp?v=1752476537","width":2000},{"alt":null,"id":25817202196579,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ed861172c15f0905d2c1ec5ed96a519c08a074f_b922e48b-ee5f-4fe6-8bb4-20d814887e89.webp?v=1752476537"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ed861172c15f0905d2c1ec5ed96a519c08a074f_b922e48b-ee5f-4fe6-8bb4-20d814887e89.webp?v=1752476537","width":2000},{"alt":null,"id":25817202425955,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77add1b36b2dccf359cba6872a5bc3154759d78d_bab4e2f8-c779-4912-b136-5be8704b317e.webp?v=1752476538"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77add1b36b2dccf359cba6872a5bc3154759d78d_bab4e2f8-c779-4912-b136-5be8704b317e.webp?v=1752476538","width":2000},{"alt":null,"id":25817202688099,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67dac37b4712ee0226a7289d7aed7c450e73566_91e0a7b3-88ad-4af9-8373-e4a3a38d5b58.webp?v=1752476538"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67dac37b4712ee0226a7289d7aed7c450e73566_91e0a7b3-88ad-4af9-8373-e4a3a38d5b58.webp?v=1752476538","width":2000},{"alt":null,"id":25817202884707,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09b58f5758e9fcc77ae31e15b626af23b23defcb_4b176849-75cf-44a1-b807-edaebce6b168.webp?v=1752476539"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09b58f5758e9fcc77ae31e15b626af23b23defcb_4b176849-75cf-44a1-b807-edaebce6b168.webp?v=1752476539","width":2000},{"alt":null,"id":25817203048547,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a912fe7d323c8be06e0a2f60aa922b4f12baa464_fdbf538d-523c-46b1-ae1b-fe2fc4bd7763.webp?v=1752476540"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a912fe7d323c8be06e0a2f60aa922b4f12baa464_fdbf538d-523c-46b1-ae1b-fe2fc4bd7763.webp?v=1752476540","width":2000},{"alt":null,"id":25817203146851,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a4df46e28d04600bf76ccbdf238413833fe153_4462b646-297f-41dd-af26-b853f8dbce73.webp?v=1752476540"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a4df46e28d04600bf76ccbdf238413833fe153_4462b646-297f-41dd-af26-b853f8dbce73.webp?v=1752476540","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43524847206499,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-YN29","requires_shipping":true,"taxable":true,"featured_image":{"id":34180147839075,"product_id":7836768469091,"position":16,"created_at":"2025-07-14T15:02:18+08:00","updated_at":"2025-07-14T15:02:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a4df46e28d04600bf76ccbdf238413833fe153_4462b646-297f-41dd-af26-b853f8dbce73.webp?v=1752476540","variant_ids":[43524847206499]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) OSAMU GOODS 經典復古系列-Cat - 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-YN29","featured_media":{"alt":null,"id":25817203146851,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a4df46e28d04600bf76ccbdf238413833fe153_4462b646-297f-41dd-af26-b853f8dbce73.webp?v=1752476540"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43524847239267,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01228Z9-YN29","requires_shipping":true,"taxable":true,"featured_image":{"id":34177951826019,"product_id":7836768469091,"position":2,"created_at":"2025-07-14T09:43:04+08:00","updated_at":"2025-07-14T09:43:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77add1b36b2dccf359cba6872a5bc3154759d78d.webp?v=1752457386","variant_ids":[43524847239267]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) OSAMU GOODS 經典復古系列-Cat - 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-YN29","featured_media":{"alt":null,"id":25815742054499,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77add1b36b2dccf359cba6872a5bc3154759d78d.webp?v=1752457386"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43524847304803,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-YN29","requires_shipping":true,"taxable":true,"featured_image":{"id":34177951236195,"product_id":7836768469091,"position":1,"created_at":"2025-07-14T09:43:03+08:00","updated_at":"2025-07-14T09:43:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67dac37b4712ee0226a7289d7aed7c450e73566.webp?v=1752457385","variant_ids":[43524847304803]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) OSAMU GOODS 經典復古系列-Cat - 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-YN29","featured_media":{"alt":null,"id":25815741530211,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67dac37b4712ee0226a7289d7aed7c450e73566.webp?v=1752457385"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43524847206499,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-YN29","requires_shipping":true,"taxable":true,"featured_image":{"id":34180147839075,"product_id":7836768469091,"position":16,"created_at":"2025-07-14T15:02:18+08:00","updated_at":"2025-07-14T15:02:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a4df46e28d04600bf76ccbdf238413833fe153_4462b646-297f-41dd-af26-b853f8dbce73.webp?v=1752476540","variant_ids":[43524847206499]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) OSAMU GOODS 經典復古系列-Cat - 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-YN29","featured_media":{"alt":null,"id":25817203146851,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a4df46e28d04600bf76ccbdf238413833fe153_4462b646-297f-41dd-af26-b853f8dbce73.webp?v=1752476540"}},"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: "停產"
}