$product = {"id":7989270249571,"title":"iPhone 15 Pro Max SolidX 梵谷博物館 RHINOSHIELD 二創 - 隆河上的星夜","handle":"iphone-15-pro-max-solidx-vr23","description":null,"published_at":"2026-04-02T12:49:13+08:00","created_at":"2026-04-01T12:29:31+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-vangoghmuseum","device-iPhone 15 Pro Max","merge","reseller-vangoghmuseum"],"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":44094914396259,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"NST01298Z7-VR23","requires_shipping":true,"taxable":true,"featured_image":{"id":35573894742115,"product_id":7989270249571,"position":7,"created_at":"2026-04-01T12:29:38+08:00","updated_at":"2026-04-01T12:29:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32c765de85b43bd5c036f16cbf196bab77b9b21f.webp?v=1775017781","variant_ids":[44094914396259]},"available":true,"name":"iPhone 15 Pro Max SolidX 梵谷博物館 RHINOSHIELD 二創 - 隆河上的星夜 - 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-VR23","featured_media":{"alt":null,"id":27106970108003,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32c765de85b43bd5c036f16cbf196bab77b9b21f.webp?v=1775017781"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44094914429027,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NST0129857-VR23","requires_shipping":true,"taxable":true,"featured_image":{"id":35573894545507,"product_id":7989270249571,"position":6,"created_at":"2026-04-01T12:29:38+08:00","updated_at":"2026-04-01T12:29:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4e2b86955670bb875f155967e2a9c30949e7a8b.webp?v=1775017780","variant_ids":[44094914429027]},"available":true,"name":"iPhone 15 Pro Max SolidX 梵谷博物館 RHINOSHIELD 二創 - 隆河上的星夜 - 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-VR23","featured_media":{"alt":null,"id":27106969911395,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4e2b86955670bb875f155967e2a9c30949e7a8b.webp?v=1775017780"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44094914461795,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"NST01298O8-VR23","requires_shipping":true,"taxable":true,"featured_image":{"id":35573894152291,"product_id":7989270249571,"position":4,"created_at":"2026-04-01T12:29:37+08:00","updated_at":"2026-04-01T12:29:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2000dff00b4aae406c6d72aea4e313a2c22c8bb4.webp?v=1775017779","variant_ids":[44094914461795]},"available":true,"name":"iPhone 15 Pro Max SolidX 梵谷博物館 RHINOSHIELD 二創 - 隆河上的星夜 - 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-VR23","featured_media":{"alt":null,"id":27106969518179,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2000dff00b4aae406c6d72aea4e313a2c22c8bb4.webp?v=1775017779"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44094914494563,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129853-VR23","requires_shipping":true,"taxable":true,"featured_image":{"id":35573894348899,"product_id":7989270249571,"position":5,"created_at":"2026-04-01T12:29:37+08:00","updated_at":"2026-04-01T12:29:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87f964539740585fc1fd02b6a2e10209ef892ab2.webp?v=1775017779","variant_ids":[44094914494563]},"available":true,"name":"iPhone 15 Pro Max SolidX 梵谷博物館 RHINOSHIELD 二創 - 隆河上的星夜 - 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-VR23","featured_media":{"alt":null,"id":27106969714787,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87f964539740585fc1fd02b6a2e10209ef892ab2.webp?v=1775017779"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44094914592867,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-VR23","requires_shipping":true,"taxable":true,"featured_image":{"id":35573893922915,"product_id":7989270249571,"position":3,"created_at":"2026-04-01T12:29:36+08:00","updated_at":"2026-04-01T12:29:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1258d3015e075e2fc02d8fd67f99e0d9f31cd192.webp?v=1775017778","variant_ids":[44094914592867]},"available":true,"name":"iPhone 15 Pro Max SolidX 梵谷博物館 RHINOSHIELD 二創 - 隆河上的星夜 - 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-VR23","featured_media":{"alt":null,"id":27106969288803,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1258d3015e075e2fc02d8fd67f99e0d9f31cd192.webp?v=1775017778"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/319087a119e1f187bb7346238318009d90c756bc.webp?v=1775017777","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2493416d9bda9a99f772ee1a6e12da2c976182a8.webp?v=1775017778","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1258d3015e075e2fc02d8fd67f99e0d9f31cd192.webp?v=1775017778","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2000dff00b4aae406c6d72aea4e313a2c22c8bb4.webp?v=1775017779","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87f964539740585fc1fd02b6a2e10209ef892ab2.webp?v=1775017779","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4e2b86955670bb875f155967e2a9c30949e7a8b.webp?v=1775017780","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32c765de85b43bd5c036f16cbf196bab77b9b21f.webp?v=1775017781","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd42834468b3c536aa034e933a89aa1d66517496.webp?v=1775017781","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b317eb6bdbfd16d69a481eef33490b42c89f2a.webp?v=1775017781"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/319087a119e1f187bb7346238318009d90c756bc.webp?v=1775017777","options":["color"],"media":[{"alt":null,"id":27106968731747,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/319087a119e1f187bb7346238318009d90c756bc.webp?v=1775017777"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/319087a119e1f187bb7346238318009d90c756bc.webp?v=1775017777","width":2000},{"alt":null,"id":27106969124963,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2493416d9bda9a99f772ee1a6e12da2c976182a8.webp?v=1775017778"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2493416d9bda9a99f772ee1a6e12da2c976182a8.webp?v=1775017778","width":2000},{"alt":null,"id":27106969288803,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1258d3015e075e2fc02d8fd67f99e0d9f31cd192.webp?v=1775017778"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1258d3015e075e2fc02d8fd67f99e0d9f31cd192.webp?v=1775017778","width":2000},{"alt":null,"id":27106969518179,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2000dff00b4aae406c6d72aea4e313a2c22c8bb4.webp?v=1775017779"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2000dff00b4aae406c6d72aea4e313a2c22c8bb4.webp?v=1775017779","width":2000},{"alt":null,"id":27106969714787,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87f964539740585fc1fd02b6a2e10209ef892ab2.webp?v=1775017779"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87f964539740585fc1fd02b6a2e10209ef892ab2.webp?v=1775017779","width":2000},{"alt":null,"id":27106969911395,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4e2b86955670bb875f155967e2a9c30949e7a8b.webp?v=1775017780"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4e2b86955670bb875f155967e2a9c30949e7a8b.webp?v=1775017780","width":2000},{"alt":null,"id":27106970108003,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32c765de85b43bd5c036f16cbf196bab77b9b21f.webp?v=1775017781"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32c765de85b43bd5c036f16cbf196bab77b9b21f.webp?v=1775017781","width":2000},{"alt":null,"id":27106970468451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd42834468b3c536aa034e933a89aa1d66517496.webp?v=1775017781"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd42834468b3c536aa034e933a89aa1d66517496.webp?v=1775017781","width":2000},{"alt":null,"id":27106970599523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b317eb6bdbfd16d69a481eef33490b42c89f2a.webp?v=1775017781"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b317eb6bdbfd16d69a481eef33490b42c89f2a.webp?v=1775017781","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":44094914396259,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"NST01298Z7-VR23","requires_shipping":true,"taxable":true,"featured_image":{"id":35573894742115,"product_id":7989270249571,"position":7,"created_at":"2026-04-01T12:29:38+08:00","updated_at":"2026-04-01T12:29:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32c765de85b43bd5c036f16cbf196bab77b9b21f.webp?v=1775017781","variant_ids":[44094914396259]},"available":true,"name":"iPhone 15 Pro Max SolidX 梵谷博物館 RHINOSHIELD 二創 - 隆河上的星夜 - 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-VR23","featured_media":{"alt":null,"id":27106970108003,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32c765de85b43bd5c036f16cbf196bab77b9b21f.webp?v=1775017781"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44094914429027,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NST0129857-VR23","requires_shipping":true,"taxable":true,"featured_image":{"id":35573894545507,"product_id":7989270249571,"position":6,"created_at":"2026-04-01T12:29:38+08:00","updated_at":"2026-04-01T12:29:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4e2b86955670bb875f155967e2a9c30949e7a8b.webp?v=1775017780","variant_ids":[44094914429027]},"available":true,"name":"iPhone 15 Pro Max SolidX 梵谷博物館 RHINOSHIELD 二創 - 隆河上的星夜 - 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-VR23","featured_media":{"alt":null,"id":27106969911395,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4e2b86955670bb875f155967e2a9c30949e7a8b.webp?v=1775017780"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44094914461795,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"NST01298O8-VR23","requires_shipping":true,"taxable":true,"featured_image":{"id":35573894152291,"product_id":7989270249571,"position":4,"created_at":"2026-04-01T12:29:37+08:00","updated_at":"2026-04-01T12:29:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2000dff00b4aae406c6d72aea4e313a2c22c8bb4.webp?v=1775017779","variant_ids":[44094914461795]},"available":true,"name":"iPhone 15 Pro Max SolidX 梵谷博物館 RHINOSHIELD 二創 - 隆河上的星夜 - 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-VR23","featured_media":{"alt":null,"id":27106969518179,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2000dff00b4aae406c6d72aea4e313a2c22c8bb4.webp?v=1775017779"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44094914494563,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129853-VR23","requires_shipping":true,"taxable":true,"featured_image":{"id":35573894348899,"product_id":7989270249571,"position":5,"created_at":"2026-04-01T12:29:37+08:00","updated_at":"2026-04-01T12:29:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87f964539740585fc1fd02b6a2e10209ef892ab2.webp?v=1775017779","variant_ids":[44094914494563]},"available":true,"name":"iPhone 15 Pro Max SolidX 梵谷博物館 RHINOSHIELD 二創 - 隆河上的星夜 - 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-VR23","featured_media":{"alt":null,"id":27106969714787,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87f964539740585fc1fd02b6a2e10209ef892ab2.webp?v=1775017779"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44094914592867,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-VR23","requires_shipping":true,"taxable":true,"featured_image":{"id":35573893922915,"product_id":7989270249571,"position":3,"created_at":"2026-04-01T12:29:36+08:00","updated_at":"2026-04-01T12:29:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1258d3015e075e2fc02d8fd67f99e0d9f31cd192.webp?v=1775017778","variant_ids":[44094914592867]},"available":true,"name":"iPhone 15 Pro Max SolidX 梵谷博物館 RHINOSHIELD 二創 - 隆河上的星夜 - 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-VR23","featured_media":{"alt":null,"id":27106969288803,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1258d3015e075e2fc02d8fd67f99e0d9f31cd192.webp?v=1775017778"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":44094914396259,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"NST01298Z7-VR23","requires_shipping":true,"taxable":true,"featured_image":{"id":35573894742115,"product_id":7989270249571,"position":7,"created_at":"2026-04-01T12:29:38+08:00","updated_at":"2026-04-01T12:29:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32c765de85b43bd5c036f16cbf196bab77b9b21f.webp?v=1775017781","variant_ids":[44094914396259]},"available":true,"name":"iPhone 15 Pro Max SolidX 梵谷博物館 RHINOSHIELD 二創 - 隆河上的星夜 - 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-VR23","featured_media":{"alt":null,"id":27106970108003,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32c765de85b43bd5c036f16cbf196bab77b9b21f.webp?v=1775017781"}},"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: "停產"
}