Home
›
iPhone 13 mini SolidSuit Knock Knock A2Z 敲敲仙境樂園
$product = {"id":7960502337635,"title":"iPhone 13 mini SolidSuit Knock Knock A2Z 敲敲仙境樂園","handle":"iphone-13-mini-solidsuit-classic-en22","description":null,"published_at":"2026-02-09T11:17:56+08:00","created_at":"2026-02-09T09:33:44+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-knockknockatoz","device-iPhone 13 Mini","merge","reseller-knockknockatoz"],"price":83000,"price_min":83000,"price_max":83000,"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":43991399825507,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"SST01228O8-EN22","requires_shipping":true,"taxable":true,"featured_image":{"id":36200290189411,"product_id":7960502337635,"position":11,"created_at":"2026-07-07T18:09:32+08:00","updated_at":"2026-07-07T18:09:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dcab39923d0d9999a22c5e22a52e5bdd29e0d09_e1eedc81-10f1-4967-abc1-48e682bf2c18.webp?v=1783418975","variant_ids":[43991399825507]},"available":true,"name":"iPhone 13 mini SolidSuit Knock Knock A2Z 敲敲仙境樂園 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228O8-EN22","featured_media":{"alt":null,"id":27705095585891,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dcab39923d0d9999a22c5e22a52e5bdd29e0d09_e1eedc81-10f1-4967-abc1-48e682bf2c18.webp?v=1783418975"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43991411392611,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"SST01228Z9-EN22","requires_shipping":true,"taxable":true,"featured_image":{"id":36200289992803,"product_id":7960502337635,"position":10,"created_at":"2026-07-07T18:09:32+08:00","updated_at":"2026-07-07T18:09:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2494ce9486e5595d77de0117e6997931ac878f_461b291f-788c-4d43-b30e-e0548c95c74f.webp?v=1783418974","variant_ids":[43991411392611]},"available":true,"name":"iPhone 13 mini SolidSuit Knock Knock A2Z 敲敲仙境樂園 - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228Z9-EN22","featured_media":{"alt":null,"id":27705095389283,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2494ce9486e5595d77de0117e6997931ac878f_461b291f-788c-4d43-b30e-e0548c95c74f.webp?v=1783418974"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43991411884131,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"SST01228Z8-EN22","requires_shipping":true,"taxable":true,"featured_image":{"id":36200289828963,"product_id":7960502337635,"position":9,"created_at":"2026-07-07T18:09:31+08:00","updated_at":"2026-07-07T18:09:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c4322e78e5557cc1fb0b73380167eed094a9cfe_b4edb984-7b4f-4ffb-9763-c09cb0955bde.webp?v=1783418973","variant_ids":[43991411884131]},"available":true,"name":"iPhone 13 mini SolidSuit Knock Knock A2Z 敲敲仙境樂園 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228Z8-EN22","featured_media":{"alt":null,"id":27705095225443,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c4322e78e5557cc1fb0b73380167eed094a9cfe_b4edb984-7b4f-4ffb-9763-c09cb0955bde.webp?v=1783418973"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43991412408419,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0122852-EN22","requires_shipping":true,"taxable":true,"featured_image":{"id":36200290451555,"product_id":7960502337635,"position":12,"created_at":"2026-07-07T18:09:33+08:00","updated_at":"2026-07-07T18:09:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/417d9597e56f8877e7a7cba95ed0fe7aec77889e_0006b847-1a43-45be-a0e0-bbe8e04920c9.webp?v=1783418975","variant_ids":[43991412408419]},"available":true,"name":"iPhone 13 mini SolidSuit Knock Knock A2Z 敲敲仙境樂園 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0122852-EN22","featured_media":{"alt":null,"id":27705095848035,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/417d9597e56f8877e7a7cba95ed0fe7aec77889e_0006b847-1a43-45be-a0e0-bbe8e04920c9.webp?v=1783418975"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34f98efa2d28ced6e3c600b212011b56fc01aca6.webp?v=1770600858","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/417d9597e56f8877e7a7cba95ed0fe7aec77889e.webp?v=1770600858","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dcab39923d0d9999a22c5e22a52e5bdd29e0d09.webp?v=1770600859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84dc4eeaadb7b8b0b18a385770e76aa8693965c9.webp?v=1770600859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c4322e78e5557cc1fb0b73380167eed094a9cfe.webp?v=1770600860","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6395880489d5ed26e610c7377505a5f32165e17.webp?v=1770600861","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3676c6d4cbd37fc4d264cf4934a774f534eecd57.webp?v=1770600862","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2494ce9486e5595d77de0117e6997931ac878f.webp?v=1770600863","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c4322e78e5557cc1fb0b73380167eed094a9cfe_b4edb984-7b4f-4ffb-9763-c09cb0955bde.webp?v=1783418973","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2494ce9486e5595d77de0117e6997931ac878f_461b291f-788c-4d43-b30e-e0548c95c74f.webp?v=1783418974","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dcab39923d0d9999a22c5e22a52e5bdd29e0d09_e1eedc81-10f1-4967-abc1-48e682bf2c18.webp?v=1783418975","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/417d9597e56f8877e7a7cba95ed0fe7aec77889e_0006b847-1a43-45be-a0e0-bbe8e04920c9.webp?v=1783418975"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34f98efa2d28ced6e3c600b212011b56fc01aca6.webp?v=1770600858","options":["color"],"media":[{"alt":null,"id":26765795328099,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34f98efa2d28ced6e3c600b212011b56fc01aca6.webp?v=1770600858"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34f98efa2d28ced6e3c600b212011b56fc01aca6.webp?v=1770600858","width":2000},{"alt":null,"id":26765795950691,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/417d9597e56f8877e7a7cba95ed0fe7aec77889e.webp?v=1770600858"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/417d9597e56f8877e7a7cba95ed0fe7aec77889e.webp?v=1770600858","width":2000},{"alt":null,"id":26765796474979,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dcab39923d0d9999a22c5e22a52e5bdd29e0d09.webp?v=1770600859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dcab39923d0d9999a22c5e22a52e5bdd29e0d09.webp?v=1770600859","width":2000},{"alt":null,"id":26765797294179,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84dc4eeaadb7b8b0b18a385770e76aa8693965c9.webp?v=1770600859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84dc4eeaadb7b8b0b18a385770e76aa8693965c9.webp?v=1770600859","width":2000},{"alt":null,"id":26765797785699,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c4322e78e5557cc1fb0b73380167eed094a9cfe.webp?v=1770600860"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c4322e78e5557cc1fb0b73380167eed094a9cfe.webp?v=1770600860","width":2000},{"alt":null,"id":26765798670435,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6395880489d5ed26e610c7377505a5f32165e17.webp?v=1770600861"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6395880489d5ed26e610c7377505a5f32165e17.webp?v=1770600861","width":2000},{"alt":null,"id":26765799260259,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3676c6d4cbd37fc4d264cf4934a774f534eecd57.webp?v=1770600862"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3676c6d4cbd37fc4d264cf4934a774f534eecd57.webp?v=1770600862","width":2000},{"alt":null,"id":26765799719011,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2494ce9486e5595d77de0117e6997931ac878f.webp?v=1770600863"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2494ce9486e5595d77de0117e6997931ac878f.webp?v=1770600863","width":2000},{"alt":null,"id":27705095225443,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c4322e78e5557cc1fb0b73380167eed094a9cfe_b4edb984-7b4f-4ffb-9763-c09cb0955bde.webp?v=1783418973"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c4322e78e5557cc1fb0b73380167eed094a9cfe_b4edb984-7b4f-4ffb-9763-c09cb0955bde.webp?v=1783418973","width":2000},{"alt":null,"id":27705095389283,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2494ce9486e5595d77de0117e6997931ac878f_461b291f-788c-4d43-b30e-e0548c95c74f.webp?v=1783418974"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2494ce9486e5595d77de0117e6997931ac878f_461b291f-788c-4d43-b30e-e0548c95c74f.webp?v=1783418974","width":2000},{"alt":null,"id":27705095585891,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dcab39923d0d9999a22c5e22a52e5bdd29e0d09_e1eedc81-10f1-4967-abc1-48e682bf2c18.webp?v=1783418975"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dcab39923d0d9999a22c5e22a52e5bdd29e0d09_e1eedc81-10f1-4967-abc1-48e682bf2c18.webp?v=1783418975","width":2000},{"alt":null,"id":27705095848035,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/417d9597e56f8877e7a7cba95ed0fe7aec77889e_0006b847-1a43-45be-a0e0-bbe8e04920c9.webp?v=1783418975"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/417d9597e56f8877e7a7cba95ed0fe7aec77889e_0006b847-1a43-45be-a0e0-bbe8e04920c9.webp?v=1783418975","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43991399825507,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"SST01228O8-EN22","requires_shipping":true,"taxable":true,"featured_image":{"id":36200290189411,"product_id":7960502337635,"position":11,"created_at":"2026-07-07T18:09:32+08:00","updated_at":"2026-07-07T18:09:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dcab39923d0d9999a22c5e22a52e5bdd29e0d09_e1eedc81-10f1-4967-abc1-48e682bf2c18.webp?v=1783418975","variant_ids":[43991399825507]},"available":true,"name":"iPhone 13 mini SolidSuit Knock Knock A2Z 敲敲仙境樂園 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228O8-EN22","featured_media":{"alt":null,"id":27705095585891,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dcab39923d0d9999a22c5e22a52e5bdd29e0d09_e1eedc81-10f1-4967-abc1-48e682bf2c18.webp?v=1783418975"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43991411392611,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"SST01228Z9-EN22","requires_shipping":true,"taxable":true,"featured_image":{"id":36200289992803,"product_id":7960502337635,"position":10,"created_at":"2026-07-07T18:09:32+08:00","updated_at":"2026-07-07T18:09:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2494ce9486e5595d77de0117e6997931ac878f_461b291f-788c-4d43-b30e-e0548c95c74f.webp?v=1783418974","variant_ids":[43991411392611]},"available":true,"name":"iPhone 13 mini SolidSuit Knock Knock A2Z 敲敲仙境樂園 - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228Z9-EN22","featured_media":{"alt":null,"id":27705095389283,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2494ce9486e5595d77de0117e6997931ac878f_461b291f-788c-4d43-b30e-e0548c95c74f.webp?v=1783418974"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43991411884131,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"SST01228Z8-EN22","requires_shipping":true,"taxable":true,"featured_image":{"id":36200289828963,"product_id":7960502337635,"position":9,"created_at":"2026-07-07T18:09:31+08:00","updated_at":"2026-07-07T18:09:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c4322e78e5557cc1fb0b73380167eed094a9cfe_b4edb984-7b4f-4ffb-9763-c09cb0955bde.webp?v=1783418973","variant_ids":[43991411884131]},"available":true,"name":"iPhone 13 mini SolidSuit Knock Knock A2Z 敲敲仙境樂園 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228Z8-EN22","featured_media":{"alt":null,"id":27705095225443,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c4322e78e5557cc1fb0b73380167eed094a9cfe_b4edb984-7b4f-4ffb-9763-c09cb0955bde.webp?v=1783418973"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43991412408419,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0122852-EN22","requires_shipping":true,"taxable":true,"featured_image":{"id":36200290451555,"product_id":7960502337635,"position":12,"created_at":"2026-07-07T18:09:33+08:00","updated_at":"2026-07-07T18:09:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/417d9597e56f8877e7a7cba95ed0fe7aec77889e_0006b847-1a43-45be-a0e0-bbe8e04920c9.webp?v=1783418975","variant_ids":[43991412408419]},"available":true,"name":"iPhone 13 mini SolidSuit Knock Knock A2Z 敲敲仙境樂園 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0122852-EN22","featured_media":{"alt":null,"id":27705095848035,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/417d9597e56f8877e7a7cba95ed0fe7aec77889e_0006b847-1a43-45be-a0e0-bbe8e04920c9.webp?v=1783418975"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43991399825507,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"SST01228O8-EN22","requires_shipping":true,"taxable":true,"featured_image":{"id":36200290189411,"product_id":7960502337635,"position":11,"created_at":"2026-07-07T18:09:32+08:00","updated_at":"2026-07-07T18:09:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dcab39923d0d9999a22c5e22a52e5bdd29e0d09_e1eedc81-10f1-4967-abc1-48e682bf2c18.webp?v=1783418975","variant_ids":[43991399825507]},"available":true,"name":"iPhone 13 mini SolidSuit Knock Knock A2Z 敲敲仙境樂園 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228O8-EN22","featured_media":{"alt":null,"id":27705095585891,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dcab39923d0d9999a22c5e22a52e5bdd29e0d09_e1eedc81-10f1-4967-abc1-48e682bf2c18.webp?v=1783418975"}},"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: "停產"
}