Home
›
iPhone 14 Clear 咒術迴戰 懷玉・玉折戰鬥系列-五條悟
$product = {"id":7920550969443,"title":"iPhone 14 Clear 咒術迴戰 懷玉・玉折戰鬥系列-五條悟","handle":"iphone-14-jellytint-ptt01","description":null,"published_at":"2025-11-10T16:32:44+08:00","created_at":"2025-11-10T15:08:04+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jujutsu-kaisen","device-iPhone 14","merge","reseller-jujutsu-kaisen"],"price":128000,"price_min":128000,"price_max":128000,"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":43828939161699,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012600J-PTT01","requires_shipping":true,"taxable":true,"featured_image":{"id":36124916252771,"product_id":7920550969443,"position":12,"created_at":"2026-06-29T15:29:47+08:00","updated_at":"2026-06-29T15:29:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_c2d58d5e-ad30-4458-abc7-bb2c4df37c8d.webp?v=1782718189","variant_ids":[43828939161699]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 懷玉・玉折戰鬥系列-五條悟 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600J-PTT01","featured_media":{"alt":null,"id":27630159200355,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_c2d58d5e-ad30-4458-abc7-bb2c4df37c8d.webp?v=1782718189"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828942176355,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"CCN012600I-PTT01","requires_shipping":true,"taxable":true,"featured_image":{"id":36124915859555,"product_id":7920550969443,"position":11,"created_at":"2026-06-29T15:29:46+08:00","updated_at":"2026-06-29T15:29:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_cdbbf070-1b9d-4b81-b334-506f7012a0fe.webp?v=1782718189","variant_ids":[43828942176355]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 懷玉・玉折戰鬥系列-五條悟 - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600I-PTT01","featured_media":{"alt":null,"id":27630158774371,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_cdbbf070-1b9d-4b81-b334-506f7012a0fe.webp?v=1782718189"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828942209123,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012600G-PTT01","requires_shipping":true,"taxable":true,"featured_image":{"id":36124916416611,"product_id":7920550969443,"position":13,"created_at":"2026-06-29T15:29:48+08:00","updated_at":"2026-06-29T15:29:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_c9abd816-c7d6-4195-9852-1036db0e12a0.webp?v=1782718190","variant_ids":[43828942209123]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 懷玉・玉折戰鬥系列-五條悟 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600G-PTT01","featured_media":{"alt":null,"id":27630159331427,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_c9abd816-c7d6-4195-9852-1036db0e12a0.webp?v=1782718190"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_c4e758c3-58b3-48ae-901b-a8d47402bd1b.webp?v=1762758487","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f31648f0748b3e7b69d3bdcaa1406af459d76452_c7325bbc-ffb6-45c6-b25d-03cd4d941c69.webp?v=1762758488","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_12749cfa-45ed-488c-bb6e-582aa2fae583.webp?v=1762758489","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_264f3237-3c4d-4bf2-96c0-4c248534ab8c.webp?v=1762758489","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_f3ee9a55-5626-4e49-8341-ffb4697f8ec0.webp?v=1782265501","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_2404bf2d-000f-4464-9636-40d6e35cbe34.webp?v=1782265501","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_9cb71c4e-511f-47eb-96ab-61fde4bf65ab.webp?v=1782265501","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_d5b5a209-3d86-4cfd-a5a4-a781d841a7ce.webp?v=1782291435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_350cdd62-99a4-4ae2-81a2-cadabb92749a.webp?v=1782291435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_033c7e16-5108-43cd-8036-162a12966b53.webp?v=1782291436","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_cdbbf070-1b9d-4b81-b334-506f7012a0fe.webp?v=1782718189","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_c2d58d5e-ad30-4458-abc7-bb2c4df37c8d.webp?v=1782718189","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_c9abd816-c7d6-4195-9852-1036db0e12a0.webp?v=1782718190"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_c4e758c3-58b3-48ae-901b-a8d47402bd1b.webp?v=1762758487","options":["color"],"media":[{"alt":null,"id":26347844599907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_c4e758c3-58b3-48ae-901b-a8d47402bd1b.webp?v=1762758487"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_c4e758c3-58b3-48ae-901b-a8d47402bd1b.webp?v=1762758487","width":2000},{"alt":null,"id":26347844862051,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f31648f0748b3e7b69d3bdcaa1406af459d76452_c7325bbc-ffb6-45c6-b25d-03cd4d941c69.webp?v=1762758488"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f31648f0748b3e7b69d3bdcaa1406af459d76452_c7325bbc-ffb6-45c6-b25d-03cd4d941c69.webp?v=1762758488","width":2000},{"alt":null,"id":26347845058659,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_12749cfa-45ed-488c-bb6e-582aa2fae583.webp?v=1762758489"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_12749cfa-45ed-488c-bb6e-582aa2fae583.webp?v=1762758489","width":2000},{"alt":null,"id":26347845222499,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_264f3237-3c4d-4bf2-96c0-4c248534ab8c.webp?v=1762758489"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_264f3237-3c4d-4bf2-96c0-4c248534ab8c.webp?v=1762758489","width":2000},{"alt":null,"id":27587132031075,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_f3ee9a55-5626-4e49-8341-ffb4697f8ec0.webp?v=1782265501"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_f3ee9a55-5626-4e49-8341-ffb4697f8ec0.webp?v=1782265501","width":2000},{"alt":null,"id":27587132325987,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_2404bf2d-000f-4464-9636-40d6e35cbe34.webp?v=1782265501"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_2404bf2d-000f-4464-9636-40d6e35cbe34.webp?v=1782265501","width":2000},{"alt":null,"id":27587132424291,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_9cb71c4e-511f-47eb-96ab-61fde4bf65ab.webp?v=1782265501"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_9cb71c4e-511f-47eb-96ab-61fde4bf65ab.webp?v=1782265501","width":2000},{"alt":null,"id":27594621714531,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_d5b5a209-3d86-4cfd-a5a4-a781d841a7ce.webp?v=1782291435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_d5b5a209-3d86-4cfd-a5a4-a781d841a7ce.webp?v=1782291435","width":2000},{"alt":null,"id":27594622468195,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_350cdd62-99a4-4ae2-81a2-cadabb92749a.webp?v=1782291435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_350cdd62-99a4-4ae2-81a2-cadabb92749a.webp?v=1782291435","width":2000},{"alt":null,"id":27594623090787,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_033c7e16-5108-43cd-8036-162a12966b53.webp?v=1782291436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_033c7e16-5108-43cd-8036-162a12966b53.webp?v=1782291436","width":2000},{"alt":null,"id":27630158774371,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_cdbbf070-1b9d-4b81-b334-506f7012a0fe.webp?v=1782718189"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_cdbbf070-1b9d-4b81-b334-506f7012a0fe.webp?v=1782718189","width":2000},{"alt":null,"id":27630159200355,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_c2d58d5e-ad30-4458-abc7-bb2c4df37c8d.webp?v=1782718189"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_c2d58d5e-ad30-4458-abc7-bb2c4df37c8d.webp?v=1782718189","width":2000},{"alt":null,"id":27630159331427,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_c9abd816-c7d6-4195-9852-1036db0e12a0.webp?v=1782718190"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_c9abd816-c7d6-4195-9852-1036db0e12a0.webp?v=1782718190","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43828939161699,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012600J-PTT01","requires_shipping":true,"taxable":true,"featured_image":{"id":36124916252771,"product_id":7920550969443,"position":12,"created_at":"2026-06-29T15:29:47+08:00","updated_at":"2026-06-29T15:29:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_c2d58d5e-ad30-4458-abc7-bb2c4df37c8d.webp?v=1782718189","variant_ids":[43828939161699]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 懷玉・玉折戰鬥系列-五條悟 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600J-PTT01","featured_media":{"alt":null,"id":27630159200355,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_c2d58d5e-ad30-4458-abc7-bb2c4df37c8d.webp?v=1782718189"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828942176355,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"CCN012600I-PTT01","requires_shipping":true,"taxable":true,"featured_image":{"id":36124915859555,"product_id":7920550969443,"position":11,"created_at":"2026-06-29T15:29:46+08:00","updated_at":"2026-06-29T15:29:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_cdbbf070-1b9d-4b81-b334-506f7012a0fe.webp?v=1782718189","variant_ids":[43828942176355]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 懷玉・玉折戰鬥系列-五條悟 - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600I-PTT01","featured_media":{"alt":null,"id":27630158774371,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cf659e0831c1121177734a98844e90df3a8191_cdbbf070-1b9d-4b81-b334-506f7012a0fe.webp?v=1782718189"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828942209123,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012600G-PTT01","requires_shipping":true,"taxable":true,"featured_image":{"id":36124916416611,"product_id":7920550969443,"position":13,"created_at":"2026-06-29T15:29:48+08:00","updated_at":"2026-06-29T15:29:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_c9abd816-c7d6-4195-9852-1036db0e12a0.webp?v=1782718190","variant_ids":[43828942209123]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 懷玉・玉折戰鬥系列-五條悟 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600G-PTT01","featured_media":{"alt":null,"id":27630159331427,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8696a3ab8c096a103fa5e6416cd776dc5b2f03_c9abd816-c7d6-4195-9852-1036db0e12a0.webp?v=1782718190"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43828939161699,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012600J-PTT01","requires_shipping":true,"taxable":true,"featured_image":{"id":36124916252771,"product_id":7920550969443,"position":12,"created_at":"2026-06-29T15:29:47+08:00","updated_at":"2026-06-29T15:29:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_c2d58d5e-ad30-4458-abc7-bb2c4df37c8d.webp?v=1782718189","variant_ids":[43828939161699]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 懷玉・玉折戰鬥系列-五條悟 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600J-PTT01","featured_media":{"alt":null,"id":27630159200355,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe18c420b78df3eede80a3fb8855ba40c19a52dd_c2d58d5e-ad30-4458-abc7-bb2c4df37c8d.webp?v=1782718189"}},"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: "停產"
}