$product = {"id":7921227235427,"title":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 好運都來","handle":"iphone-14-pro-mod-nx-magsafe-ec78","description":null,"published_at":"2025-11-14T10:39:05+08:00","created_at":"2025-11-11T10:24:45+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-bylobster","device-iPhone 14 Pro","merge","reseller-bylobster"],"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":43831235248227,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01262J5-EC78","requires_shipping":true,"taxable":true,"featured_image":{"id":36054666379363,"product_id":7921227235427,"position":14,"created_at":"2026-06-23T09:57:41+08:00","updated_at":"2026-06-23T09:57:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a4309d08a781b7188a065ac231cd1dcfb6ca4c5_032d078c-4338-41e0-8e2c-29c63fe27871.webp?v=1782179863","variant_ids":[43831235248227]},"available":true,"name":"iPhone 14 Pro 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":"MPB01262J5-EC78","featured_media":{"alt":null,"id":27567516778595,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a4309d08a781b7188a065ac231cd1dcfb6ca4c5_032d078c-4338-41e0-8e2c-29c63fe27871.webp?v=1782179863"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831235412067,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126224-EC78","requires_shipping":true,"taxable":true,"featured_image":{"id":36054666641507,"product_id":7921227235427,"position":15,"created_at":"2026-06-23T09:57:41+08:00","updated_at":"2026-06-23T09:57:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8403c63db869c38ee07a38e6f3d7896870dda1e5_a0397aa6-193a-4ffd-a306-1d7da55f5a77.webp?v=1782179863","variant_ids":[43831235412067]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 好運都來 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126224-EC78","featured_media":{"alt":null,"id":27567517040739,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8403c63db869c38ee07a38e6f3d7896870dda1e5_a0397aa6-193a-4ffd-a306-1d7da55f5a77.webp?v=1782179863"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831235510371,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0126204-EC78","requires_shipping":true,"taxable":true,"featured_image":{"id":36054666084451,"product_id":7921227235427,"position":13,"created_at":"2026-06-23T09:57:40+08:00","updated_at":"2026-06-23T09:57:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efd31555a0a94492fd6c71b5e06e1a64749aabdc_529664f3-fa60-4272-b440-69e811c804ea.webp?v=1782179863","variant_ids":[43831235510371]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 好運都來 - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126204-EC78","featured_media":{"alt":null,"id":27567516450915,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efd31555a0a94492fd6c71b5e06e1a64749aabdc_529664f3-fa60-4272-b440-69e811c804ea.webp?v=1782179863"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a31b6c21375074c1c093a2631876be21cdef296.webp?v=1762827888","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a974cc0c7c04bcb85315ba863322109400adcb79.webp?v=1762827889","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12eaed76e714112e1f0d16e4c4ff27f05fb803d7.webp?v=1762827890","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8403c63db869c38ee07a38e6f3d7896870dda1e5.webp?v=1762827890","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31ddc7e963eef02b0391a668dae2ba7c7a792bd2.webp?v=1762827891","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f7fc7d5fa151c79834599ff6885458d077338d.webp?v=1762827891","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efd31555a0a94492fd6c71b5e06e1a64749aabdc.webp?v=1762827892","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a4309d08a781b7188a065ac231cd1dcfb6ca4c5.webp?v=1762827893","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11e3baf58c6aa683ca5a102a8d3330ddf5f18847.webp?v=1762827894","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c7c89b391bc8fae399b221e792c1dece523c79f.webp?v=1762827895","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd9b0cce3f9880eb5e5c707ef536146d86094a3b.webp?v=1762827895","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e438bb16bc8a1d8d3d1df349b8b82f7fd79f447.webp?v=1762827896","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efd31555a0a94492fd6c71b5e06e1a64749aabdc_529664f3-fa60-4272-b440-69e811c804ea.webp?v=1782179863","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a4309d08a781b7188a065ac231cd1dcfb6ca4c5_032d078c-4338-41e0-8e2c-29c63fe27871.webp?v=1782179863","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8403c63db869c38ee07a38e6f3d7896870dda1e5_a0397aa6-193a-4ffd-a306-1d7da55f5a77.webp?v=1782179863"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a31b6c21375074c1c093a2631876be21cdef296.webp?v=1762827888","options":["color"],"media":[{"alt":null,"id":26352128163939,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a31b6c21375074c1c093a2631876be21cdef296.webp?v=1762827888"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a31b6c21375074c1c093a2631876be21cdef296.webp?v=1762827888","width":2000},{"alt":null,"id":26352128458851,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a974cc0c7c04bcb85315ba863322109400adcb79.webp?v=1762827889"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a974cc0c7c04bcb85315ba863322109400adcb79.webp?v=1762827889","width":2000},{"alt":null,"id":26352128655459,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12eaed76e714112e1f0d16e4c4ff27f05fb803d7.webp?v=1762827890"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12eaed76e714112e1f0d16e4c4ff27f05fb803d7.webp?v=1762827890","width":2000},{"alt":null,"id":26352128852067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8403c63db869c38ee07a38e6f3d7896870dda1e5.webp?v=1762827890"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8403c63db869c38ee07a38e6f3d7896870dda1e5.webp?v=1762827890","width":2000},{"alt":null,"id":26352129081443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31ddc7e963eef02b0391a668dae2ba7c7a792bd2.webp?v=1762827891"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31ddc7e963eef02b0391a668dae2ba7c7a792bd2.webp?v=1762827891","width":2000},{"alt":null,"id":26352129278051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f7fc7d5fa151c79834599ff6885458d077338d.webp?v=1762827891"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f7fc7d5fa151c79834599ff6885458d077338d.webp?v=1762827891","width":2000},{"alt":null,"id":26352129572963,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efd31555a0a94492fd6c71b5e06e1a64749aabdc.webp?v=1762827892"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efd31555a0a94492fd6c71b5e06e1a64749aabdc.webp?v=1762827892","width":2000},{"alt":null,"id":26352129835107,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a4309d08a781b7188a065ac231cd1dcfb6ca4c5.webp?v=1762827893"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a4309d08a781b7188a065ac231cd1dcfb6ca4c5.webp?v=1762827893","width":2000},{"alt":null,"id":26352130064483,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11e3baf58c6aa683ca5a102a8d3330ddf5f18847.webp?v=1762827894"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11e3baf58c6aa683ca5a102a8d3330ddf5f18847.webp?v=1762827894","width":2000},{"alt":null,"id":26352130228323,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c7c89b391bc8fae399b221e792c1dece523c79f.webp?v=1762827895"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c7c89b391bc8fae399b221e792c1dece523c79f.webp?v=1762827895","width":2000},{"alt":null,"id":26352130326627,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd9b0cce3f9880eb5e5c707ef536146d86094a3b.webp?v=1762827895"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd9b0cce3f9880eb5e5c707ef536146d86094a3b.webp?v=1762827895","width":2000},{"alt":null,"id":26352130490467,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e438bb16bc8a1d8d3d1df349b8b82f7fd79f447.webp?v=1762827896"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e438bb16bc8a1d8d3d1df349b8b82f7fd79f447.webp?v=1762827896","width":2000},{"alt":null,"id":27567516450915,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efd31555a0a94492fd6c71b5e06e1a64749aabdc_529664f3-fa60-4272-b440-69e811c804ea.webp?v=1782179863"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efd31555a0a94492fd6c71b5e06e1a64749aabdc_529664f3-fa60-4272-b440-69e811c804ea.webp?v=1782179863","width":2000},{"alt":null,"id":27567516778595,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a4309d08a781b7188a065ac231cd1dcfb6ca4c5_032d078c-4338-41e0-8e2c-29c63fe27871.webp?v=1782179863"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a4309d08a781b7188a065ac231cd1dcfb6ca4c5_032d078c-4338-41e0-8e2c-29c63fe27871.webp?v=1782179863","width":2000},{"alt":null,"id":27567517040739,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8403c63db869c38ee07a38e6f3d7896870dda1e5_a0397aa6-193a-4ffd-a306-1d7da55f5a77.webp?v=1782179863"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8403c63db869c38ee07a38e6f3d7896870dda1e5_a0397aa6-193a-4ffd-a306-1d7da55f5a77.webp?v=1782179863","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43831235248227,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01262J5-EC78","requires_shipping":true,"taxable":true,"featured_image":{"id":36054666379363,"product_id":7921227235427,"position":14,"created_at":"2026-06-23T09:57:41+08:00","updated_at":"2026-06-23T09:57:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a4309d08a781b7188a065ac231cd1dcfb6ca4c5_032d078c-4338-41e0-8e2c-29c63fe27871.webp?v=1782179863","variant_ids":[43831235248227]},"available":true,"name":"iPhone 14 Pro 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":"MPB01262J5-EC78","featured_media":{"alt":null,"id":27567516778595,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a4309d08a781b7188a065ac231cd1dcfb6ca4c5_032d078c-4338-41e0-8e2c-29c63fe27871.webp?v=1782179863"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831235412067,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126224-EC78","requires_shipping":true,"taxable":true,"featured_image":{"id":36054666641507,"product_id":7921227235427,"position":15,"created_at":"2026-06-23T09:57:41+08:00","updated_at":"2026-06-23T09:57:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8403c63db869c38ee07a38e6f3d7896870dda1e5_a0397aa6-193a-4ffd-a306-1d7da55f5a77.webp?v=1782179863","variant_ids":[43831235412067]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 好運都來 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126224-EC78","featured_media":{"alt":null,"id":27567517040739,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8403c63db869c38ee07a38e6f3d7896870dda1e5_a0397aa6-193a-4ffd-a306-1d7da55f5a77.webp?v=1782179863"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831235510371,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0126204-EC78","requires_shipping":true,"taxable":true,"featured_image":{"id":36054666084451,"product_id":7921227235427,"position":13,"created_at":"2026-06-23T09:57:40+08:00","updated_at":"2026-06-23T09:57:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efd31555a0a94492fd6c71b5e06e1a64749aabdc_529664f3-fa60-4272-b440-69e811c804ea.webp?v=1782179863","variant_ids":[43831235510371]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 好運都來 - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126204-EC78","featured_media":{"alt":null,"id":27567516450915,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efd31555a0a94492fd6c71b5e06e1a64749aabdc_529664f3-fa60-4272-b440-69e811c804ea.webp?v=1782179863"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43831235248227,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01262J5-EC78","requires_shipping":true,"taxable":true,"featured_image":{"id":36054666379363,"product_id":7921227235427,"position":14,"created_at":"2026-06-23T09:57:41+08:00","updated_at":"2026-06-23T09:57:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a4309d08a781b7188a065ac231cd1dcfb6ca4c5_032d078c-4338-41e0-8e2c-29c63fe27871.webp?v=1782179863","variant_ids":[43831235248227]},"available":true,"name":"iPhone 14 Pro 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":"MPB01262J5-EC78","featured_media":{"alt":null,"id":27567516778595,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a4309d08a781b7188a065ac231cd1dcfb6ca4c5_032d078c-4338-41e0-8e2c-29c63fe27871.webp?v=1782179863"}},"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: "停產"
}