$product = {"id":7921274323043,"title":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 My Angel","handle":"iphone-14-pro-mod-nx-magsafe-ec83","description":null,"published_at":"2025-11-14T10:30:23+08:00","created_at":"2025-11-11T10:34:57+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":43831416389731,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01262J5-EC83","requires_shipping":true,"taxable":true,"featured_image":{"id":36054667526243,"product_id":7921274323043,"position":15,"created_at":"2026-06-23T09:57:43+08:00","updated_at":"2026-06-23T09:57:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0daffa7a78171833b3d627648b349955ae38494c_51f5b1c7-f3f9-4d3e-9407-8c96f7ec32a2.webp?v=1782179865","variant_ids":[43831416389731]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 My Angel - 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-EC83","featured_media":{"alt":null,"id":27567517925475,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0daffa7a78171833b3d627648b349955ae38494c_51f5b1c7-f3f9-4d3e-9407-8c96f7ec32a2.webp?v=1782179865"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831416553571,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126224-EC83","requires_shipping":true,"taxable":true,"featured_image":{"id":36054666870883,"product_id":7921274323043,"position":13,"created_at":"2026-06-23T09:57:42+08:00","updated_at":"2026-06-23T09:57:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e1dcc49f1d8f76afdc1b94c77e4804d51c315e_4b42badc-08bf-4463-9bed-3f269e91bd73.webp?v=1782179864","variant_ids":[43831416553571]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 My Angel - 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-EC83","featured_media":{"alt":null,"id":27567517270115,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e1dcc49f1d8f76afdc1b94c77e4804d51c315e_4b42badc-08bf-4463-9bed-3f269e91bd73.webp?v=1782179864"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831416651875,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0126204-EC83","requires_shipping":true,"taxable":true,"featured_image":{"id":36054667264099,"product_id":7921274323043,"position":14,"created_at":"2026-06-23T09:57:42+08:00","updated_at":"2026-06-23T09:57:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b628d338eebb9e58234642f59abe534421ad0cd_0647efeb-af46-48aa-a886-907c2a6ecca3.webp?v=1782179864","variant_ids":[43831416651875]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 My Angel - 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-EC83","featured_media":{"alt":null,"id":27567517663331,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b628d338eebb9e58234642f59abe534421ad0cd_0647efeb-af46-48aa-a886-907c2a6ecca3.webp?v=1782179864"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e1dcc49f1d8f76afdc1b94c77e4804d51c315e.webp?v=1762828501","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0511f8a0a094fbcd07b3b4d42ef6ec5cf01b2a52.webp?v=1762828501","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad39beece186a591345c3f93929516eb6b5283b3.webp?v=1762828502","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b628d338eebb9e58234642f59abe534421ad0cd.webp?v=1762828503","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90a198c299a238568b579bb8610ba7a0dd738791.webp?v=1762828503","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1a8a7cf42afd2fd810b23e1511ef9948b997542.webp?v=1762828504","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e54b87d786302c6646a0d63da5b5fbce268d88f6.webp?v=1762828505","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79a856dbdd5da69c85e9f1f0118bfe0889f9ca75.webp?v=1762828505","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/455cbc8b0a3b4edaad047fcf23fdddcf9ae905e3.webp?v=1762828506","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0daffa7a78171833b3d627648b349955ae38494c.webp?v=1762828507","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed6038e08109d0e5a63d675498bc6469f81574d0.webp?v=1762828508","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b53c18f652428b0d0c093b8b933d53e87a25961.webp?v=1762828508","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e1dcc49f1d8f76afdc1b94c77e4804d51c315e_4b42badc-08bf-4463-9bed-3f269e91bd73.webp?v=1782179864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b628d338eebb9e58234642f59abe534421ad0cd_0647efeb-af46-48aa-a886-907c2a6ecca3.webp?v=1782179864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0daffa7a78171833b3d627648b349955ae38494c_51f5b1c7-f3f9-4d3e-9407-8c96f7ec32a2.webp?v=1782179865"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e1dcc49f1d8f76afdc1b94c77e4804d51c315e.webp?v=1762828501","options":["color"],"media":[{"alt":null,"id":26352319266915,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e1dcc49f1d8f76afdc1b94c77e4804d51c315e.webp?v=1762828501"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e1dcc49f1d8f76afdc1b94c77e4804d51c315e.webp?v=1762828501","width":2000},{"alt":null,"id":26352319594595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0511f8a0a094fbcd07b3b4d42ef6ec5cf01b2a52.webp?v=1762828501"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0511f8a0a094fbcd07b3b4d42ef6ec5cf01b2a52.webp?v=1762828501","width":2000},{"alt":null,"id":26352319856739,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad39beece186a591345c3f93929516eb6b5283b3.webp?v=1762828502"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad39beece186a591345c3f93929516eb6b5283b3.webp?v=1762828502","width":2000},{"alt":null,"id":26352320151651,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b628d338eebb9e58234642f59abe534421ad0cd.webp?v=1762828503"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b628d338eebb9e58234642f59abe534421ad0cd.webp?v=1762828503","width":2000},{"alt":null,"id":26352320348259,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90a198c299a238568b579bb8610ba7a0dd738791.webp?v=1762828503"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90a198c299a238568b579bb8610ba7a0dd738791.webp?v=1762828503","width":2000},{"alt":null,"id":26352320675939,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1a8a7cf42afd2fd810b23e1511ef9948b997542.webp?v=1762828504"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1a8a7cf42afd2fd810b23e1511ef9948b997542.webp?v=1762828504","width":2000},{"alt":null,"id":26352320938083,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e54b87d786302c6646a0d63da5b5fbce268d88f6.webp?v=1762828505"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e54b87d786302c6646a0d63da5b5fbce268d88f6.webp?v=1762828505","width":2000},{"alt":null,"id":26352321069155,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79a856dbdd5da69c85e9f1f0118bfe0889f9ca75.webp?v=1762828505"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79a856dbdd5da69c85e9f1f0118bfe0889f9ca75.webp?v=1762828505","width":2000},{"alt":null,"id":26352321298531,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/455cbc8b0a3b4edaad047fcf23fdddcf9ae905e3.webp?v=1762828506"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/455cbc8b0a3b4edaad047fcf23fdddcf9ae905e3.webp?v=1762828506","width":2000},{"alt":null,"id":26352321462371,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0daffa7a78171833b3d627648b349955ae38494c.webp?v=1762828507"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0daffa7a78171833b3d627648b349955ae38494c.webp?v=1762828507","width":2000},{"alt":null,"id":26352321593443,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed6038e08109d0e5a63d675498bc6469f81574d0.webp?v=1762828508"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed6038e08109d0e5a63d675498bc6469f81574d0.webp?v=1762828508","width":2000},{"alt":null,"id":26352321790051,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b53c18f652428b0d0c093b8b933d53e87a25961.webp?v=1762828508"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b53c18f652428b0d0c093b8b933d53e87a25961.webp?v=1762828508","width":2000},{"alt":null,"id":27567517270115,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e1dcc49f1d8f76afdc1b94c77e4804d51c315e_4b42badc-08bf-4463-9bed-3f269e91bd73.webp?v=1782179864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e1dcc49f1d8f76afdc1b94c77e4804d51c315e_4b42badc-08bf-4463-9bed-3f269e91bd73.webp?v=1782179864","width":2000},{"alt":null,"id":27567517663331,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b628d338eebb9e58234642f59abe534421ad0cd_0647efeb-af46-48aa-a886-907c2a6ecca3.webp?v=1782179864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b628d338eebb9e58234642f59abe534421ad0cd_0647efeb-af46-48aa-a886-907c2a6ecca3.webp?v=1782179864","width":2000},{"alt":null,"id":27567517925475,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0daffa7a78171833b3d627648b349955ae38494c_51f5b1c7-f3f9-4d3e-9407-8c96f7ec32a2.webp?v=1782179865"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0daffa7a78171833b3d627648b349955ae38494c_51f5b1c7-f3f9-4d3e-9407-8c96f7ec32a2.webp?v=1782179865","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43831416389731,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01262J5-EC83","requires_shipping":true,"taxable":true,"featured_image":{"id":36054667526243,"product_id":7921274323043,"position":15,"created_at":"2026-06-23T09:57:43+08:00","updated_at":"2026-06-23T09:57:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0daffa7a78171833b3d627648b349955ae38494c_51f5b1c7-f3f9-4d3e-9407-8c96f7ec32a2.webp?v=1782179865","variant_ids":[43831416389731]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 My Angel - 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-EC83","featured_media":{"alt":null,"id":27567517925475,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0daffa7a78171833b3d627648b349955ae38494c_51f5b1c7-f3f9-4d3e-9407-8c96f7ec32a2.webp?v=1782179865"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831416553571,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126224-EC83","requires_shipping":true,"taxable":true,"featured_image":{"id":36054666870883,"product_id":7921274323043,"position":13,"created_at":"2026-06-23T09:57:42+08:00","updated_at":"2026-06-23T09:57:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e1dcc49f1d8f76afdc1b94c77e4804d51c315e_4b42badc-08bf-4463-9bed-3f269e91bd73.webp?v=1782179864","variant_ids":[43831416553571]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 My Angel - 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-EC83","featured_media":{"alt":null,"id":27567517270115,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e1dcc49f1d8f76afdc1b94c77e4804d51c315e_4b42badc-08bf-4463-9bed-3f269e91bd73.webp?v=1782179864"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831416651875,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0126204-EC83","requires_shipping":true,"taxable":true,"featured_image":{"id":36054667264099,"product_id":7921274323043,"position":14,"created_at":"2026-06-23T09:57:42+08:00","updated_at":"2026-06-23T09:57:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b628d338eebb9e58234642f59abe534421ad0cd_0647efeb-af46-48aa-a886-907c2a6ecca3.webp?v=1782179864","variant_ids":[43831416651875]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 My Angel - 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-EC83","featured_media":{"alt":null,"id":27567517663331,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b628d338eebb9e58234642f59abe534421ad0cd_0647efeb-af46-48aa-a886-907c2a6ecca3.webp?v=1782179864"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43831416389731,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01262J5-EC83","requires_shipping":true,"taxable":true,"featured_image":{"id":36054667526243,"product_id":7921274323043,"position":15,"created_at":"2026-06-23T09:57:43+08:00","updated_at":"2026-06-23T09:57:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0daffa7a78171833b3d627648b349955ae38494c_51f5b1c7-f3f9-4d3e-9407-8c96f7ec32a2.webp?v=1782179865","variant_ids":[43831416389731]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 My Angel - 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-EC83","featured_media":{"alt":null,"id":27567517925475,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0daffa7a78171833b3d627648b349955ae38494c_51f5b1c7-f3f9-4d3e-9407-8c96f7ec32a2.webp?v=1782179865"}},"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: "停產"
}