Home
›
iPhone 15 Plus SolidX 咒術迴戰 澀谷事變高校系列-咒術高專
$product = {"id":7920654745699,"title":"iPhone 15 Plus SolidX 咒術迴戰 澀谷事變高校系列-咒術高專","handle":"iphone-15-plus-solidx-ptt20","description":null,"published_at":"2025-11-10T16:15:59+08:00","created_at":"2025-11-10T16:05:31+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jujutsu-kaisen","device-iPhone 15 Plus","merge","reseller-jujutsu-kaisen"],"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":43829323858019,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012960B-PTT20","requires_shipping":true,"taxable":true,"featured_image":{"id":36125154312291,"product_id":7920654745699,"position":17,"created_at":"2026-06-29T15:42:50+08:00","updated_at":"2026-06-29T15:42:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_3d93b262-0ad7-468c-abdb-a4471741e0ad.webp?v=1782718971","variant_ids":[43829323858019]},"available":true,"name":"iPhone 15 Plus SolidX 咒術迴戰 澀谷事變高校系列-咒術高專 - 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":"NST012960B-PTT20","featured_media":{"alt":null,"id":27630397063267,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_3d93b262-0ad7-468c-abdb-a4471741e0ad.webp?v=1782718971"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43829326872675,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129652-PTT20","requires_shipping":true,"taxable":true,"featured_image":{"id":36125154574435,"product_id":7920654745699,"position":18,"created_at":"2026-06-29T15:42:50+08:00","updated_at":"2026-06-29T15:42:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_ef0eb848-d057-463d-bf79-4c2109e8bcb2.webp?v=1782718972","variant_ids":[43829326872675]},"available":true,"name":"iPhone 15 Plus SolidX 咒術迴戰 澀谷事變高校系列-咒術高專 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129652-PTT20","featured_media":{"alt":null,"id":27630397325411,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_ef0eb848-d057-463d-bf79-4c2109e8bcb2.webp?v=1782718972"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc.webp?v=1762761936","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201.webp?v=1762761937","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/082e40ce6a4a3cf313408ca06d7fba07c9e4cda1.webp?v=1762761938","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9304d63c9cdf446ff666be4b1b6bd895438a9b89.webp?v=1762761939","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41050569e9e2c656f4c4884486fef9f78334136.webp?v=1762761939","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbdaf173864fc1a28edbd00dbe137bef16f38d16.webp?v=1762761940","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd726295adc39922c053b2f91c24a99ae8ec7173.webp?v=1762761941","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6085323b03cb80187ffdef1a6c43a04e0fe72b16.webp?v=1762761941","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70ee647a5fbe33d60c37633784c3ef8ba0f03dd2.webp?v=1762761942","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa78b43f582943ca1fe8b3dfad937e320d9eb573.webp?v=1762761943","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_baf7ed7a-4040-47b9-bb65-14c7c6f75f68.webp?v=1782266139","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41050569e9e2c656f4c4884486fef9f78334136_0cccf64a-d125-47f3-92ad-9ae1c95782d4.webp?v=1782266140","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_36511662-8cc5-4bf8-b2ac-cde2e7739ecc.webp?v=1782266142","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_e1231b86-de3c-4057-9d34-bcaf77366093.webp?v=1782291738","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41050569e9e2c656f4c4884486fef9f78334136_2cdf1e63-b384-45b4-8c04-f0ca022f2c34.webp?v=1782291739","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_de4da6fa-60e5-4d2e-af33-c5d5aac73d0d.webp?v=1782291741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_3d93b262-0ad7-468c-abdb-a4471741e0ad.webp?v=1782718971","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_ef0eb848-d057-463d-bf79-4c2109e8bcb2.webp?v=1782718972","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41050569e9e2c656f4c4884486fef9f78334136_e701b7b6-ed6a-4a1a-8270-9272a08f2016.webp?v=1782718973"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc.webp?v=1762761936","options":["color"],"media":[{"alt":null,"id":26348311216227,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc.webp?v=1762761936"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc.webp?v=1762761936","width":2000},{"alt":null,"id":26348311609443,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201.webp?v=1762761937"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201.webp?v=1762761937","width":2000},{"alt":null,"id":26348311838819,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/082e40ce6a4a3cf313408ca06d7fba07c9e4cda1.webp?v=1762761938"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/082e40ce6a4a3cf313408ca06d7fba07c9e4cda1.webp?v=1762761938","width":2000},{"alt":null,"id":26348312133731,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9304d63c9cdf446ff666be4b1b6bd895438a9b89.webp?v=1762761939"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9304d63c9cdf446ff666be4b1b6bd895438a9b89.webp?v=1762761939","width":2000},{"alt":null,"id":26348312330339,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41050569e9e2c656f4c4884486fef9f78334136.webp?v=1762761939"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41050569e9e2c656f4c4884486fef9f78334136.webp?v=1762761939","width":2000},{"alt":null,"id":26348312526947,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbdaf173864fc1a28edbd00dbe137bef16f38d16.webp?v=1762761940"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbdaf173864fc1a28edbd00dbe137bef16f38d16.webp?v=1762761940","width":2000},{"alt":null,"id":26348312789091,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd726295adc39922c053b2f91c24a99ae8ec7173.webp?v=1762761941"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd726295adc39922c053b2f91c24a99ae8ec7173.webp?v=1762761941","width":2000},{"alt":null,"id":26348312952931,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6085323b03cb80187ffdef1a6c43a04e0fe72b16.webp?v=1762761941"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6085323b03cb80187ffdef1a6c43a04e0fe72b16.webp?v=1762761941","width":2000},{"alt":null,"id":26348313116771,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70ee647a5fbe33d60c37633784c3ef8ba0f03dd2.webp?v=1762761942"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70ee647a5fbe33d60c37633784c3ef8ba0f03dd2.webp?v=1762761942","width":2000},{"alt":null,"id":26348313313379,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa78b43f582943ca1fe8b3dfad937e320d9eb573.webp?v=1762761943"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa78b43f582943ca1fe8b3dfad937e320d9eb573.webp?v=1762761943","width":2000},{"alt":null,"id":27587409805411,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_baf7ed7a-4040-47b9-bb65-14c7c6f75f68.webp?v=1782266139"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_baf7ed7a-4040-47b9-bb65-14c7c6f75f68.webp?v=1782266139","width":2000},{"alt":null,"id":27587410526307,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41050569e9e2c656f4c4884486fef9f78334136_0cccf64a-d125-47f3-92ad-9ae1c95782d4.webp?v=1782266140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41050569e9e2c656f4c4884486fef9f78334136_0cccf64a-d125-47f3-92ad-9ae1c95782d4.webp?v=1782266140","width":2000},{"alt":null,"id":27587411050595,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_36511662-8cc5-4bf8-b2ac-cde2e7739ecc.webp?v=1782266142"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_36511662-8cc5-4bf8-b2ac-cde2e7739ecc.webp?v=1782266142","width":2000},{"alt":null,"id":27594717954147,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_e1231b86-de3c-4057-9d34-bcaf77366093.webp?v=1782291738"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_e1231b86-de3c-4057-9d34-bcaf77366093.webp?v=1782291738","width":2000},{"alt":null,"id":27594718281827,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41050569e9e2c656f4c4884486fef9f78334136_2cdf1e63-b384-45b4-8c04-f0ca022f2c34.webp?v=1782291739"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41050569e9e2c656f4c4884486fef9f78334136_2cdf1e63-b384-45b4-8c04-f0ca022f2c34.webp?v=1782291739","width":2000},{"alt":null,"id":27594719297635,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_de4da6fa-60e5-4d2e-af33-c5d5aac73d0d.webp?v=1782291741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_de4da6fa-60e5-4d2e-af33-c5d5aac73d0d.webp?v=1782291741","width":2000},{"alt":null,"id":27630397063267,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_3d93b262-0ad7-468c-abdb-a4471741e0ad.webp?v=1782718971"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_3d93b262-0ad7-468c-abdb-a4471741e0ad.webp?v=1782718971","width":2000},{"alt":null,"id":27630397325411,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_ef0eb848-d057-463d-bf79-4c2109e8bcb2.webp?v=1782718972"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_ef0eb848-d057-463d-bf79-4c2109e8bcb2.webp?v=1782718972","width":2000},{"alt":null,"id":27630397620323,"position":19,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41050569e9e2c656f4c4884486fef9f78334136_e701b7b6-ed6a-4a1a-8270-9272a08f2016.webp?v=1782718973"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41050569e9e2c656f4c4884486fef9f78334136_e701b7b6-ed6a-4a1a-8270-9272a08f2016.webp?v=1782718973","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43829323858019,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012960B-PTT20","requires_shipping":true,"taxable":true,"featured_image":{"id":36125154312291,"product_id":7920654745699,"position":17,"created_at":"2026-06-29T15:42:50+08:00","updated_at":"2026-06-29T15:42:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_3d93b262-0ad7-468c-abdb-a4471741e0ad.webp?v=1782718971","variant_ids":[43829323858019]},"available":true,"name":"iPhone 15 Plus SolidX 咒術迴戰 澀谷事變高校系列-咒術高專 - 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":"NST012960B-PTT20","featured_media":{"alt":null,"id":27630397063267,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_3d93b262-0ad7-468c-abdb-a4471741e0ad.webp?v=1782718971"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43829326872675,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129652-PTT20","requires_shipping":true,"taxable":true,"featured_image":{"id":36125154574435,"product_id":7920654745699,"position":18,"created_at":"2026-06-29T15:42:50+08:00","updated_at":"2026-06-29T15:42:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_ef0eb848-d057-463d-bf79-4c2109e8bcb2.webp?v=1782718972","variant_ids":[43829326872675]},"available":true,"name":"iPhone 15 Plus SolidX 咒術迴戰 澀谷事變高校系列-咒術高專 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129652-PTT20","featured_media":{"alt":null,"id":27630397325411,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbf9fd3817b41fb864ebbf951fe160f06cfda201_ef0eb848-d057-463d-bf79-4c2109e8bcb2.webp?v=1782718972"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43829323858019,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012960B-PTT20","requires_shipping":true,"taxable":true,"featured_image":{"id":36125154312291,"product_id":7920654745699,"position":17,"created_at":"2026-06-29T15:42:50+08:00","updated_at":"2026-06-29T15:42:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_3d93b262-0ad7-468c-abdb-a4471741e0ad.webp?v=1782718971","variant_ids":[43829323858019]},"available":true,"name":"iPhone 15 Plus SolidX 咒術迴戰 澀谷事變高校系列-咒術高專 - 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":"NST012960B-PTT20","featured_media":{"alt":null,"id":27630397063267,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0634c1b106137cc856db9bc44f559b8c421490dc_3d93b262-0ad7-468c-abdb-a4471741e0ad.webp?v=1782718971"}},"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: "停產"
}