$product = {"id":7944317993059,"title":"iPhone 15 Pro Max SolidX 右手超人 柔軟的時間","handle":"iphone-15-pro-max-solidx-yoh07","description":null,"published_at":"2025-12-24T10:15:28+08:00","created_at":"2025-12-23T16:57:11+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-yohand","device-iPhone 15 Pro Max","merge","reseller-yohand"],"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":43908164092003,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"NST01298Z7-YOH07","requires_shipping":true,"taxable":true,"featured_image":{"id":35003064418403,"product_id":7944317993059,"position":8,"created_at":"2025-12-23T16:57:53+08:00","updated_at":"2025-12-23T16:57:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1782799fd271be8b652e3b0db6cb7b31b1bfa0f.webp?v=1766480275","variant_ids":[43908164092003]},"available":true,"name":"iPhone 15 Pro Max SolidX 右手超人 柔軟的時間 - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298Z7-YOH07","featured_media":{"alt":null,"id":26563354984547,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1782799fd271be8b652e3b0db6cb7b31b1bfa0f.webp?v=1766480275"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43908164354147,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NST0129857-YOH07","requires_shipping":true,"taxable":true,"featured_image":{"id":35003064680547,"product_id":7944317993059,"position":9,"created_at":"2025-12-23T16:57:54+08:00","updated_at":"2025-12-23T16:57:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e3b5613e9f774147a37a90fce46b129dfc7456.webp?v=1766480276","variant_ids":[43908164354147]},"available":true,"name":"iPhone 15 Pro Max SolidX 右手超人 柔軟的時間 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129857-YOH07","featured_media":{"alt":null,"id":26563355213923,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e3b5613e9f774147a37a90fce46b129dfc7456.webp?v=1766480276"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43908169302115,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-YOH07","requires_shipping":true,"taxable":true,"featured_image":{"id":35003064123491,"product_id":7944317993059,"position":7,"created_at":"2025-12-23T16:57:53+08:00","updated_at":"2025-12-23T16:57:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018bd9c4671744dd1b3de3ed53804a23cbb297c5.webp?v=1766480275","variant_ids":[43908169302115]},"available":true,"name":"iPhone 15 Pro Max 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":"NST0129852-YOH07","featured_media":{"alt":null,"id":26563354624099,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018bd9c4671744dd1b3de3ed53804a23cbb297c5.webp?v=1766480275"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43908169662563,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"NST01298O8-YOH07","requires_shipping":true,"taxable":true,"featured_image":{"id":35003063795811,"product_id":7944317993059,"position":6,"created_at":"2025-12-23T16:57:52+08:00","updated_at":"2025-12-23T16:57:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67360a8ec601bf79f8b1406a90456833bc7581ac.webp?v=1766480274","variant_ids":[43908169662563]},"available":true,"name":"iPhone 15 Pro Max SolidX 右手超人 柔軟的時間 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298O8-YOH07","featured_media":{"alt":null,"id":26563354361955,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67360a8ec601bf79f8b1406a90456833bc7581ac.webp?v=1766480274"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43908169957475,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129853-YOH07","requires_shipping":true,"taxable":true,"featured_image":{"id":35003065270371,"product_id":7944317993059,"position":10,"created_at":"2025-12-23T16:57:55+08:00","updated_at":"2025-12-23T16:57:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/398f6199f1cf9fabd237df9e87138cf31b76e7c4.webp?v=1766480277","variant_ids":[43908169957475]},"available":true,"name":"iPhone 15 Pro Max SolidX 右手超人 柔軟的時間 - White","public_title":"White","options":["White"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129853-YOH07","featured_media":{"alt":null,"id":26563355836515,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/398f6199f1cf9fabd237df9e87138cf31b76e7c4.webp?v=1766480277"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5500f9686c50a3be138947b081a252bbdf8c615.webp?v=1766480271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60967ac170097c2326db191d28c71b2ea281f8d5.webp?v=1766480272","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/053510f7b51a97db4341c502b5c1843fba7cbfdb.webp?v=1766480272","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f93a0f7c5a943873ea0390c35faf19d6bc6a776e.webp?v=1766480273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d3fb0400a1f967921071cc6a8d91952e26c83d6.webp?v=1766480274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67360a8ec601bf79f8b1406a90456833bc7581ac.webp?v=1766480274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018bd9c4671744dd1b3de3ed53804a23cbb297c5.webp?v=1766480275","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1782799fd271be8b652e3b0db6cb7b31b1bfa0f.webp?v=1766480275","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e3b5613e9f774147a37a90fce46b129dfc7456.webp?v=1766480276","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/398f6199f1cf9fabd237df9e87138cf31b76e7c4.webp?v=1766480277"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5500f9686c50a3be138947b081a252bbdf8c615.webp?v=1766480271","options":["color"],"media":[{"alt":null,"id":26563352756323,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5500f9686c50a3be138947b081a252bbdf8c615.webp?v=1766480271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5500f9686c50a3be138947b081a252bbdf8c615.webp?v=1766480271","width":2000},{"alt":null,"id":26563353477219,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60967ac170097c2326db191d28c71b2ea281f8d5.webp?v=1766480272"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60967ac170097c2326db191d28c71b2ea281f8d5.webp?v=1766480272","width":2000},{"alt":null,"id":26563353706595,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/053510f7b51a97db4341c502b5c1843fba7cbfdb.webp?v=1766480272"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/053510f7b51a97db4341c502b5c1843fba7cbfdb.webp?v=1766480272","width":2000},{"alt":null,"id":26563353870435,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f93a0f7c5a943873ea0390c35faf19d6bc6a776e.webp?v=1766480273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f93a0f7c5a943873ea0390c35faf19d6bc6a776e.webp?v=1766480273","width":2000},{"alt":null,"id":26563354099811,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d3fb0400a1f967921071cc6a8d91952e26c83d6.webp?v=1766480274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d3fb0400a1f967921071cc6a8d91952e26c83d6.webp?v=1766480274","width":2000},{"alt":null,"id":26563354361955,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67360a8ec601bf79f8b1406a90456833bc7581ac.webp?v=1766480274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67360a8ec601bf79f8b1406a90456833bc7581ac.webp?v=1766480274","width":2000},{"alt":null,"id":26563354624099,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018bd9c4671744dd1b3de3ed53804a23cbb297c5.webp?v=1766480275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018bd9c4671744dd1b3de3ed53804a23cbb297c5.webp?v=1766480275","width":2000},{"alt":null,"id":26563354984547,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1782799fd271be8b652e3b0db6cb7b31b1bfa0f.webp?v=1766480275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1782799fd271be8b652e3b0db6cb7b31b1bfa0f.webp?v=1766480275","width":2000},{"alt":null,"id":26563355213923,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e3b5613e9f774147a37a90fce46b129dfc7456.webp?v=1766480276"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e3b5613e9f774147a37a90fce46b129dfc7456.webp?v=1766480276","width":2000},{"alt":null,"id":26563355836515,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/398f6199f1cf9fabd237df9e87138cf31b76e7c4.webp?v=1766480277"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/398f6199f1cf9fabd237df9e87138cf31b76e7c4.webp?v=1766480277","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43908164092003,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"NST01298Z7-YOH07","requires_shipping":true,"taxable":true,"featured_image":{"id":35003064418403,"product_id":7944317993059,"position":8,"created_at":"2025-12-23T16:57:53+08:00","updated_at":"2025-12-23T16:57:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1782799fd271be8b652e3b0db6cb7b31b1bfa0f.webp?v=1766480275","variant_ids":[43908164092003]},"available":true,"name":"iPhone 15 Pro Max SolidX 右手超人 柔軟的時間 - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298Z7-YOH07","featured_media":{"alt":null,"id":26563354984547,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1782799fd271be8b652e3b0db6cb7b31b1bfa0f.webp?v=1766480275"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43908164354147,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NST0129857-YOH07","requires_shipping":true,"taxable":true,"featured_image":{"id":35003064680547,"product_id":7944317993059,"position":9,"created_at":"2025-12-23T16:57:54+08:00","updated_at":"2025-12-23T16:57:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e3b5613e9f774147a37a90fce46b129dfc7456.webp?v=1766480276","variant_ids":[43908164354147]},"available":true,"name":"iPhone 15 Pro Max SolidX 右手超人 柔軟的時間 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129857-YOH07","featured_media":{"alt":null,"id":26563355213923,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e3b5613e9f774147a37a90fce46b129dfc7456.webp?v=1766480276"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43908169302115,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-YOH07","requires_shipping":true,"taxable":true,"featured_image":{"id":35003064123491,"product_id":7944317993059,"position":7,"created_at":"2025-12-23T16:57:53+08:00","updated_at":"2025-12-23T16:57:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018bd9c4671744dd1b3de3ed53804a23cbb297c5.webp?v=1766480275","variant_ids":[43908169302115]},"available":true,"name":"iPhone 15 Pro Max 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":"NST0129852-YOH07","featured_media":{"alt":null,"id":26563354624099,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018bd9c4671744dd1b3de3ed53804a23cbb297c5.webp?v=1766480275"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43908169662563,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"NST01298O8-YOH07","requires_shipping":true,"taxable":true,"featured_image":{"id":35003063795811,"product_id":7944317993059,"position":6,"created_at":"2025-12-23T16:57:52+08:00","updated_at":"2025-12-23T16:57:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67360a8ec601bf79f8b1406a90456833bc7581ac.webp?v=1766480274","variant_ids":[43908169662563]},"available":true,"name":"iPhone 15 Pro Max SolidX 右手超人 柔軟的時間 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298O8-YOH07","featured_media":{"alt":null,"id":26563354361955,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67360a8ec601bf79f8b1406a90456833bc7581ac.webp?v=1766480274"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43908169957475,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129853-YOH07","requires_shipping":true,"taxable":true,"featured_image":{"id":35003065270371,"product_id":7944317993059,"position":10,"created_at":"2025-12-23T16:57:55+08:00","updated_at":"2025-12-23T16:57:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/398f6199f1cf9fabd237df9e87138cf31b76e7c4.webp?v=1766480277","variant_ids":[43908169957475]},"available":true,"name":"iPhone 15 Pro Max SolidX 右手超人 柔軟的時間 - White","public_title":"White","options":["White"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129853-YOH07","featured_media":{"alt":null,"id":26563355836515,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/398f6199f1cf9fabd237df9e87138cf31b76e7c4.webp?v=1766480277"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43908164092003,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"NST01298Z7-YOH07","requires_shipping":true,"taxable":true,"featured_image":{"id":35003064418403,"product_id":7944317993059,"position":8,"created_at":"2025-12-23T16:57:53+08:00","updated_at":"2025-12-23T16:57:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1782799fd271be8b652e3b0db6cb7b31b1bfa0f.webp?v=1766480275","variant_ids":[43908164092003]},"available":true,"name":"iPhone 15 Pro Max SolidX 右手超人 柔軟的時間 - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298Z7-YOH07","featured_media":{"alt":null,"id":26563354984547,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1782799fd271be8b652e3b0db6cb7b31b1bfa0f.webp?v=1766480275"}},"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: "停產"
}