$product = {"id":7823839920227,"title":"iPhone 15 Pro Max SolidX 幾米Jimmy Liao 我不是完美小孩-完美的剪影","handle":"iphone-15-pro-max-solidx-gg80","description":null,"published_at":"2025-07-01T19:09:04+08:00","created_at":"2025-06-20T10:31:13+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jimmy","device-iPhone 15 Pro Max","merge","reseller-jimmy"],"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":43473551949923,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-GG80","requires_shipping":true,"taxable":true,"featured_image":{"id":36180999798883,"product_id":7823839920227,"position":6,"created_at":"2026-07-06T11:09:35+08:00","updated_at":"2026-07-06T11:09:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5427ad1b6993ef54109c7c812d0f0719a19da8b0.webp?v=1783307377","variant_ids":[43473551949923]},"available":true,"name":"iPhone 15 Pro Max SolidX 幾米Jimmy Liao 我不是完美小孩-完美的剪影 - 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-GG80","featured_media":{"alt":null,"id":27685833736291,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5427ad1b6993ef54109c7c812d0f0719a19da8b0.webp?v=1783307377"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43473556242531,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129853-GG80","requires_shipping":true,"taxable":true,"featured_image":{"id":36181000618083,"product_id":7823839920227,"position":7,"created_at":"2026-07-06T11:09:38+08:00","updated_at":"2026-07-06T11:09:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfea426bddaa12790cb0a71713b26c5a4b5252a4.webp?v=1783307380","variant_ids":[43473556242531]},"available":true,"name":"iPhone 15 Pro Max SolidX 幾米Jimmy Liao 我不是完美小孩-完美的剪影 - 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-GG80","featured_media":{"alt":null,"id":27685834489955,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfea426bddaa12790cb0a71713b26c5a4b5252a4.webp?v=1783307380"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43473556340835,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"NST01298O8-GG80","requires_shipping":true,"taxable":true,"featured_image":{"id":36180998750307,"product_id":7823839920227,"position":4,"created_at":"2026-07-06T11:09:32+08:00","updated_at":"2026-07-06T11:09:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e8c2b08ef41597103599dbc48653f052092b55.webp?v=1783307374","variant_ids":[43473556340835]},"available":true,"name":"iPhone 15 Pro Max SolidX 幾米Jimmy Liao 我不是完美小孩-完美的剪影 - 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-GG80","featured_media":{"alt":null,"id":27685832654947,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e8c2b08ef41597103599dbc48653f052092b55.webp?v=1783307374"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43473556373603,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"NST01298Z7-GG80","requires_shipping":true,"taxable":true,"featured_image":{"id":36180999077987,"product_id":7823839920227,"position":5,"created_at":"2026-07-06T11:09:33+08:00","updated_at":"2026-07-06T11:09:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfb8e6a4ab79a574b92583af69ebe5374dab6ce4.webp?v=1783307375","variant_ids":[43473556373603]},"available":true,"name":"iPhone 15 Pro Max SolidX 幾米Jimmy Liao 我不是完美小孩-完美的剪影 - 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-GG80","featured_media":{"alt":null,"id":27685832982627,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfb8e6a4ab79a574b92583af69ebe5374dab6ce4.webp?v=1783307375"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43494117179491,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NST0129857-GG80","requires_shipping":true,"taxable":true,"featured_image":{"id":36180998324323,"product_id":7823839920227,"position":3,"created_at":"2026-07-06T11:09:31+08:00","updated_at":"2026-07-06T11:09:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ef62942e3601fb48cac07549f529ca459d58c4.webp?v=1783307373","variant_ids":[43494117179491]},"available":true,"name":"iPhone 15 Pro Max SolidX 幾米Jimmy Liao 我不是完美小孩-完美的剪影 - 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-GG80","featured_media":{"alt":null,"id":27685832228963,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ef62942e3601fb48cac07549f529ca459d58c4.webp?v=1783307373"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-298-GG80_240d8c7d-e328-4c78-b5c9-0a80946d1a93.png?v=1750386675","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-295-GG80_8189f86d-023b-4644-a5b2-accc2bf2d7b6.png?v=1750831610","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ef62942e3601fb48cac07549f529ca459d58c4.webp?v=1783307373","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e8c2b08ef41597103599dbc48653f052092b55.webp?v=1783307374","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfb8e6a4ab79a574b92583af69ebe5374dab6ce4.webp?v=1783307375","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5427ad1b6993ef54109c7c812d0f0719a19da8b0.webp?v=1783307377","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfea426bddaa12790cb0a71713b26c5a4b5252a4.webp?v=1783307380","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3338a948962c307df0966da6fbf2975ecb7f248.webp?v=1783307382","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e55b725676c61c48646a54f04e594e34193bb6ea.webp?v=1783307385"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-298-GG80_240d8c7d-e328-4c78-b5c9-0a80946d1a93.png?v=1750386675","options":["color"],"media":[{"alt":null,"id":25720409260131,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-298-GG80_240d8c7d-e328-4c78-b5c9-0a80946d1a93.png?v=1750386675"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-298-GG80_240d8c7d-e328-4c78-b5c9-0a80946d1a93.png?v=1750386675","width":2000},{"alt":null,"id":25736223457379,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-295-GG80_8189f86d-023b-4644-a5b2-accc2bf2d7b6.png?v=1750831610"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-295-GG80_8189f86d-023b-4644-a5b2-accc2bf2d7b6.png?v=1750831610","width":2000},{"alt":null,"id":27685832228963,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ef62942e3601fb48cac07549f529ca459d58c4.webp?v=1783307373"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ef62942e3601fb48cac07549f529ca459d58c4.webp?v=1783307373","width":2000},{"alt":null,"id":27685832654947,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e8c2b08ef41597103599dbc48653f052092b55.webp?v=1783307374"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e8c2b08ef41597103599dbc48653f052092b55.webp?v=1783307374","width":2000},{"alt":null,"id":27685832982627,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfb8e6a4ab79a574b92583af69ebe5374dab6ce4.webp?v=1783307375"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfb8e6a4ab79a574b92583af69ebe5374dab6ce4.webp?v=1783307375","width":2000},{"alt":null,"id":27685833736291,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5427ad1b6993ef54109c7c812d0f0719a19da8b0.webp?v=1783307377"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5427ad1b6993ef54109c7c812d0f0719a19da8b0.webp?v=1783307377","width":2000},{"alt":null,"id":27685834489955,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfea426bddaa12790cb0a71713b26c5a4b5252a4.webp?v=1783307380"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfea426bddaa12790cb0a71713b26c5a4b5252a4.webp?v=1783307380","width":2000},{"alt":null,"id":27685835374691,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3338a948962c307df0966da6fbf2975ecb7f248.webp?v=1783307382"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3338a948962c307df0966da6fbf2975ecb7f248.webp?v=1783307382","width":2000},{"alt":null,"id":27685836521571,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e55b725676c61c48646a54f04e594e34193bb6ea.webp?v=1783307385"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e55b725676c61c48646a54f04e594e34193bb6ea.webp?v=1783307385","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43473551949923,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-GG80","requires_shipping":true,"taxable":true,"featured_image":{"id":36180999798883,"product_id":7823839920227,"position":6,"created_at":"2026-07-06T11:09:35+08:00","updated_at":"2026-07-06T11:09:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5427ad1b6993ef54109c7c812d0f0719a19da8b0.webp?v=1783307377","variant_ids":[43473551949923]},"available":true,"name":"iPhone 15 Pro Max SolidX 幾米Jimmy Liao 我不是完美小孩-完美的剪影 - 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-GG80","featured_media":{"alt":null,"id":27685833736291,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5427ad1b6993ef54109c7c812d0f0719a19da8b0.webp?v=1783307377"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43473556242531,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129853-GG80","requires_shipping":true,"taxable":true,"featured_image":{"id":36181000618083,"product_id":7823839920227,"position":7,"created_at":"2026-07-06T11:09:38+08:00","updated_at":"2026-07-06T11:09:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfea426bddaa12790cb0a71713b26c5a4b5252a4.webp?v=1783307380","variant_ids":[43473556242531]},"available":true,"name":"iPhone 15 Pro Max SolidX 幾米Jimmy Liao 我不是完美小孩-完美的剪影 - 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-GG80","featured_media":{"alt":null,"id":27685834489955,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfea426bddaa12790cb0a71713b26c5a4b5252a4.webp?v=1783307380"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43473556340835,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"NST01298O8-GG80","requires_shipping":true,"taxable":true,"featured_image":{"id":36180998750307,"product_id":7823839920227,"position":4,"created_at":"2026-07-06T11:09:32+08:00","updated_at":"2026-07-06T11:09:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e8c2b08ef41597103599dbc48653f052092b55.webp?v=1783307374","variant_ids":[43473556340835]},"available":true,"name":"iPhone 15 Pro Max SolidX 幾米Jimmy Liao 我不是完美小孩-完美的剪影 - 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-GG80","featured_media":{"alt":null,"id":27685832654947,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e8c2b08ef41597103599dbc48653f052092b55.webp?v=1783307374"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43473556373603,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"NST01298Z7-GG80","requires_shipping":true,"taxable":true,"featured_image":{"id":36180999077987,"product_id":7823839920227,"position":5,"created_at":"2026-07-06T11:09:33+08:00","updated_at":"2026-07-06T11:09:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfb8e6a4ab79a574b92583af69ebe5374dab6ce4.webp?v=1783307375","variant_ids":[43473556373603]},"available":true,"name":"iPhone 15 Pro Max SolidX 幾米Jimmy Liao 我不是完美小孩-完美的剪影 - 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-GG80","featured_media":{"alt":null,"id":27685832982627,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfb8e6a4ab79a574b92583af69ebe5374dab6ce4.webp?v=1783307375"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43494117179491,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NST0129857-GG80","requires_shipping":true,"taxable":true,"featured_image":{"id":36180998324323,"product_id":7823839920227,"position":3,"created_at":"2026-07-06T11:09:31+08:00","updated_at":"2026-07-06T11:09:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ef62942e3601fb48cac07549f529ca459d58c4.webp?v=1783307373","variant_ids":[43494117179491]},"available":true,"name":"iPhone 15 Pro Max SolidX 幾米Jimmy Liao 我不是完美小孩-完美的剪影 - 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-GG80","featured_media":{"alt":null,"id":27685832228963,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ef62942e3601fb48cac07549f529ca459d58c4.webp?v=1783307373"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43473551949923,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-GG80","requires_shipping":true,"taxable":true,"featured_image":{"id":36180999798883,"product_id":7823839920227,"position":6,"created_at":"2026-07-06T11:09:35+08:00","updated_at":"2026-07-06T11:09:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5427ad1b6993ef54109c7c812d0f0719a19da8b0.webp?v=1783307377","variant_ids":[43473551949923]},"available":true,"name":"iPhone 15 Pro Max SolidX 幾米Jimmy Liao 我不是完美小孩-完美的剪影 - 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-GG80","featured_media":{"alt":null,"id":27685833736291,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5427ad1b6993ef54109c7c812d0f0719a19da8b0.webp?v=1783307377"}},"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: "停產"
}