$product = {"id":7931688058979,"title":"iPhone 17 Pro Max Mod NX - 邊框背蓋組合(MagSafe兼容&相機按鈕) 產房 • 廢料棲息地 腐鏽的我們","handle":"iphone-17-pro-max-mod-nx-magsafe-with-capture-button-bir07","description":null,"published_at":"2026-01-27T14:10:34+08:00","created_at":"2025-11-28T11:42:37+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-everydayishappybirthday","device-iPhone 17 Pro Max","merge","reseller-everydayishappybirthday"],"price":110000,"price_min":110000,"price_max":110000,"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":43861564162147,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MXB01353J5-BIR07","requires_shipping":true,"taxable":true,"featured_image":{"id":36351743328355,"product_id":7931688058979,"position":15,"created_at":"2026-07-22T21:23:25+08:00","updated_at":"2026-07-22T21:23:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_d7563977-c870-4b07-a756-0e7bae76fdfc.webp?v=1784726607","variant_ids":[43861564162147]},"available":true,"name":"iPhone 17 Pro Max Mod NX - 邊框背蓋組合(MagSafe兼容&相機按鈕) 產房 • 廢料棲息地 腐鏽的我們 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MXB01353J5-BIR07","featured_media":{"alt":null,"id":27855548809315,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_d7563977-c870-4b07-a756-0e7bae76fdfc.webp?v=1784726607"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43861566324835,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MXB0135369-BIR07","requires_shipping":true,"taxable":true,"featured_image":{"id":36351744409699,"product_id":7931688058979,"position":16,"created_at":"2026-07-22T21:23:26+08:00","updated_at":"2026-07-22T21:23:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_d5718ce6-baa7-46ca-a0a1-df9a4fc216ab.webp?v=1784726608","variant_ids":[43861566324835]},"available":true,"name":"iPhone 17 Pro Max Mod NX - 邊框背蓋組合(MagSafe兼容&相機按鈕) 產房 • 廢料棲息地 腐鏽的我們 - Graphite","public_title":"Graphite","options":["Graphite"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MXB0135369-BIR07","featured_media":{"alt":null,"id":27855549857891,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_d5718ce6-baa7-46ca-a0a1-df9a4fc216ab.webp?v=1784726608"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb.webp?v=1764301364","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24.webp?v=1764301364","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9.webp?v=1764301365","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42625421dc71e74fb26a6196620474a7b6a9c53d.webp?v=1764301365","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42625421dc71e74fb26a6196620474a7b6a9c53d_552627ed-09a0-47f9-bf55-e9153085a475.webp?v=1784721390","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb_77a6b3b4-a06f-4510-b7dc-2cc9d58c9301.webp?v=1784721390","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_27f2aece-e7c0-4469-a00a-8a6c641a7d7b.webp?v=1784721392","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_3def2fda-baae-4f89-b65a-3670a52e6d78.webp?v=1784721393","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42625421dc71e74fb26a6196620474a7b6a9c53d_e42841f5-6805-4668-88fa-b98056ec51c2.webp?v=1784725530","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb_4902e414-3350-4719-8d8f-58368419ab27.webp?v=1784725531","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_4b6a4775-acb9-4c4b-9318-ac8d944fb56f.webp?v=1784725535","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_7cdcc721-3a80-4991-8be0-226a2cb2820d.webp?v=1784725537","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42625421dc71e74fb26a6196620474a7b6a9c53d_ebbbe967-20d5-48c2-8bbb-009549bef267.webp?v=1784726604","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb_a153b0a9-c98a-4e27-8925-f78d31679b64.webp?v=1784726606","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_d7563977-c870-4b07-a756-0e7bae76fdfc.webp?v=1784726607","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_d5718ce6-baa7-46ca-a0a1-df9a4fc216ab.webp?v=1784726608"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb.webp?v=1764301364","options":["color"],"media":[{"alt":null,"id":26428345942115,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb.webp?v=1764301364"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb.webp?v=1764301364","width":2000},{"alt":null,"id":26428346073187,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24.webp?v=1764301364"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24.webp?v=1764301364","width":2000},{"alt":null,"id":26428346138723,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9.webp?v=1764301365"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9.webp?v=1764301365","width":2000},{"alt":null,"id":26428346302563,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42625421dc71e74fb26a6196620474a7b6a9c53d.webp?v=1764301365"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42625421dc71e74fb26a6196620474a7b6a9c53d.webp?v=1764301365","width":2000},{"alt":null,"id":27853731201123,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42625421dc71e74fb26a6196620474a7b6a9c53d_552627ed-09a0-47f9-bf55-e9153085a475.webp?v=1784721390"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42625421dc71e74fb26a6196620474a7b6a9c53d_552627ed-09a0-47f9-bf55-e9153085a475.webp?v=1784721390","width":2000},{"alt":null,"id":27853732020323,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb_77a6b3b4-a06f-4510-b7dc-2cc9d58c9301.webp?v=1784721390"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb_77a6b3b4-a06f-4510-b7dc-2cc9d58c9301.webp?v=1784721390","width":2000},{"alt":null,"id":27853733757027,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_27f2aece-e7c0-4469-a00a-8a6c641a7d7b.webp?v=1784721392"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_27f2aece-e7c0-4469-a00a-8a6c641a7d7b.webp?v=1784721392","width":2000},{"alt":null,"id":27853734707299,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_3def2fda-baae-4f89-b65a-3670a52e6d78.webp?v=1784721393"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_3def2fda-baae-4f89-b65a-3670a52e6d78.webp?v=1784721393","width":2000},{"alt":null,"id":27855002042467,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42625421dc71e74fb26a6196620474a7b6a9c53d_e42841f5-6805-4668-88fa-b98056ec51c2.webp?v=1784725530"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42625421dc71e74fb26a6196620474a7b6a9c53d_e42841f5-6805-4668-88fa-b98056ec51c2.webp?v=1784725530","width":2000},{"alt":null,"id":27855003156579,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb_4902e414-3350-4719-8d8f-58368419ab27.webp?v=1784725531"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb_4902e414-3350-4719-8d8f-58368419ab27.webp?v=1784725531","width":2000},{"alt":null,"id":27855005712483,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_4b6a4775-acb9-4c4b-9318-ac8d944fb56f.webp?v=1784725535"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_4b6a4775-acb9-4c4b-9318-ac8d944fb56f.webp?v=1784725535","width":2000},{"alt":null,"id":27855006859363,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_7cdcc721-3a80-4991-8be0-226a2cb2820d.webp?v=1784725537"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_7cdcc721-3a80-4991-8be0-226a2cb2820d.webp?v=1784725537","width":2000},{"alt":null,"id":27855544942691,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42625421dc71e74fb26a6196620474a7b6a9c53d_ebbbe967-20d5-48c2-8bbb-009549bef267.webp?v=1784726604"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42625421dc71e74fb26a6196620474a7b6a9c53d_ebbbe967-20d5-48c2-8bbb-009549bef267.webp?v=1784726604","width":2000},{"alt":null,"id":27855546122339,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb_a153b0a9-c98a-4e27-8925-f78d31679b64.webp?v=1784726606"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e8a36da828861d5fb7a74f7fb65ea4bb4489cbb_a153b0a9-c98a-4e27-8925-f78d31679b64.webp?v=1784726606","width":2000},{"alt":null,"id":27855548809315,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_d7563977-c870-4b07-a756-0e7bae76fdfc.webp?v=1784726607"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_d7563977-c870-4b07-a756-0e7bae76fdfc.webp?v=1784726607","width":2000},{"alt":null,"id":27855549857891,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_d5718ce6-baa7-46ca-a0a1-df9a4fc216ab.webp?v=1784726608"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_d5718ce6-baa7-46ca-a0a1-df9a4fc216ab.webp?v=1784726608","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43861564162147,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MXB01353J5-BIR07","requires_shipping":true,"taxable":true,"featured_image":{"id":36351743328355,"product_id":7931688058979,"position":15,"created_at":"2026-07-22T21:23:25+08:00","updated_at":"2026-07-22T21:23:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_d7563977-c870-4b07-a756-0e7bae76fdfc.webp?v=1784726607","variant_ids":[43861564162147]},"available":true,"name":"iPhone 17 Pro Max Mod NX - 邊框背蓋組合(MagSafe兼容&相機按鈕) 產房 • 廢料棲息地 腐鏽的我們 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MXB01353J5-BIR07","featured_media":{"alt":null,"id":27855548809315,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_d7563977-c870-4b07-a756-0e7bae76fdfc.webp?v=1784726607"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43861566324835,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MXB0135369-BIR07","requires_shipping":true,"taxable":true,"featured_image":{"id":36351744409699,"product_id":7931688058979,"position":16,"created_at":"2026-07-22T21:23:26+08:00","updated_at":"2026-07-22T21:23:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_d5718ce6-baa7-46ca-a0a1-df9a4fc216ab.webp?v=1784726608","variant_ids":[43861566324835]},"available":true,"name":"iPhone 17 Pro Max Mod NX - 邊框背蓋組合(MagSafe兼容&相機按鈕) 產房 • 廢料棲息地 腐鏽的我們 - Graphite","public_title":"Graphite","options":["Graphite"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MXB0135369-BIR07","featured_media":{"alt":null,"id":27855549857891,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d82b52d6b209eec8729df2f92a2d5a0b9cbc24_d5718ce6-baa7-46ca-a0a1-df9a4fc216ab.webp?v=1784726608"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43861564162147,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MXB01353J5-BIR07","requires_shipping":true,"taxable":true,"featured_image":{"id":36351743328355,"product_id":7931688058979,"position":15,"created_at":"2026-07-22T21:23:25+08:00","updated_at":"2026-07-22T21:23:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_d7563977-c870-4b07-a756-0e7bae76fdfc.webp?v=1784726607","variant_ids":[43861564162147]},"available":true,"name":"iPhone 17 Pro Max Mod NX - 邊框背蓋組合(MagSafe兼容&相機按鈕) 產房 • 廢料棲息地 腐鏽的我們 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MXB01353J5-BIR07","featured_media":{"alt":null,"id":27855548809315,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/213e184c05794f3cd2209e52f17220ca253c39a9_d7563977-c870-4b07-a756-0e7bae76fdfc.webp?v=1784726607"}},"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: "停產"
}