$product = {"id":7937626177635,"title":"iPhone XR Mod NX Jin Young Choi 擁抱長貓","handle":"iphone-xr-mod-nx-cjy04","description":null,"published_at":"2025-12-12T09:37:52+08:00","created_at":"2025-12-11T10:04:48+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jychoioioi","device-iPhone XR","merge","reseller-jychoioioi"],"price":90000,"price_min":90000,"price_max":90000,"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":43883230625891,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"NPB01085C1-CJY04","requires_shipping":true,"taxable":true,"featured_image":{"id":34931168280675,"product_id":7937626177635,"position":8,"created_at":"2025-12-11T10:04:56+08:00","updated_at":"2025-12-11T10:04:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457e7ff57a7e88f77f4b5f6c2179f15f7697ca00.webp?v=1765418697","variant_ids":[43883230625891]},"available":true,"name":"iPhone XR Mod NX Jin Young Choi 擁抱長貓 - Lavender","public_title":"Lavender","options":["Lavender"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01085C1-CJY04","featured_media":{"alt":null,"id":26493542531171,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457e7ff57a7e88f77f4b5f6c2179f15f7697ca00.webp?v=1765418697"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883232919651,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108524-CJY04","requires_shipping":true,"taxable":true,"featured_image":{"id":34931167395939,"product_id":7937626177635,"position":1,"created_at":"2025-12-11T10:04:52+08:00","updated_at":"2025-12-11T10:04:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5950b9625c260c12fa00b79840e863f278cdc0e2.webp?v=1765418694","variant_ids":[43883232919651]},"available":true,"name":"iPhone XR Mod NX Jin Young Choi 擁抱長貓 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108524-CJY04","featured_media":{"alt":null,"id":26493541646435,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5950b9625c260c12fa00b79840e863f278cdc0e2.webp?v=1765418694"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883232952419,"title":"Camo Green","option1":"Camo Green","option2":null,"option3":null,"sku":"NPB0108515-CJY04","requires_shipping":true,"taxable":true,"featured_image":{"id":34931168018531,"product_id":7937626177635,"position":6,"created_at":"2025-12-11T10:04:55+08:00","updated_at":"2025-12-11T10:04:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fdf4c8569ac07d6eb36bf8ecccaf21cfab14697.webp?v=1765418697","variant_ids":[43883232952419]},"available":true,"name":"iPhone XR Mod NX Jin Young Choi 擁抱長貓 - Camo Green","public_title":"Camo Green","options":["Camo Green"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108515-CJY04","featured_media":{"alt":null,"id":26493542269027,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fdf4c8569ac07d6eb36bf8ecccaf21cfab14697.webp?v=1765418697"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883233050723,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NPB0108504-CJY04","requires_shipping":true,"taxable":true,"featured_image":{"id":34931167625315,"product_id":7937626177635,"position":3,"created_at":"2025-12-11T10:04:53+08:00","updated_at":"2025-12-11T10:04:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/146c4b9b2f967767594463536d4dd64085ba8d58.webp?v=1765418695","variant_ids":[43883233050723]},"available":true,"name":"iPhone XR Mod NX Jin Young Choi 擁抱長貓 - White","public_title":"White","options":["White"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108504-CJY04","featured_media":{"alt":null,"id":26493541875811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/146c4b9b2f967767594463536d4dd64085ba8d58.webp?v=1765418695"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883233083491,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NPB0108557-CJY04","requires_shipping":true,"taxable":true,"featured_image":{"id":34931168706659,"product_id":7937626177635,"position":10,"created_at":"2025-12-11T10:04:56+08:00","updated_at":"2025-12-11T10:04:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42eca5ed362897787e6006177312aeb8e02e8c8c.webp?v=1765418698","variant_ids":[43883233083491]},"available":true,"name":"iPhone XR Mod NX Jin Young Choi 擁抱長貓 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108557-CJY04","featured_media":{"alt":null,"id":26493542957155,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42eca5ed362897787e6006177312aeb8e02e8c8c.webp?v=1765418698"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5950b9625c260c12fa00b79840e863f278cdc0e2.webp?v=1765418694","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea5c685f8dc552817d79722e5282115df3f2fa09.webp?v=1765418695","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/146c4b9b2f967767594463536d4dd64085ba8d58.webp?v=1765418695","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6072b8f1a22148ea4be952f756abcdab16353559.webp?v=1765418695","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feef2cc388a5ee021bcaad928c1f2dc9587ccd19.webp?v=1765418696","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fdf4c8569ac07d6eb36bf8ecccaf21cfab14697.webp?v=1765418697","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1335a8786699b615ec24e27826eaa24dc3ac9f6e.webp?v=1765418697","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457e7ff57a7e88f77f4b5f6c2179f15f7697ca00.webp?v=1765418697","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8189b8ea46ec6a57ef4eb2d4d213fc59f4889c5.webp?v=1765418698","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42eca5ed362897787e6006177312aeb8e02e8c8c.webp?v=1765418698"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5950b9625c260c12fa00b79840e863f278cdc0e2.webp?v=1765418694","options":["color"],"media":[{"alt":null,"id":26493541646435,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5950b9625c260c12fa00b79840e863f278cdc0e2.webp?v=1765418694"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5950b9625c260c12fa00b79840e863f278cdc0e2.webp?v=1765418694","width":2000},{"alt":null,"id":26493541744739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea5c685f8dc552817d79722e5282115df3f2fa09.webp?v=1765418695"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea5c685f8dc552817d79722e5282115df3f2fa09.webp?v=1765418695","width":2000},{"alt":null,"id":26493541875811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/146c4b9b2f967767594463536d4dd64085ba8d58.webp?v=1765418695"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/146c4b9b2f967767594463536d4dd64085ba8d58.webp?v=1765418695","width":2000},{"alt":null,"id":26493542006883,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6072b8f1a22148ea4be952f756abcdab16353559.webp?v=1765418695"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6072b8f1a22148ea4be952f756abcdab16353559.webp?v=1765418695","width":2000},{"alt":null,"id":26493542137955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feef2cc388a5ee021bcaad928c1f2dc9587ccd19.webp?v=1765418696"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feef2cc388a5ee021bcaad928c1f2dc9587ccd19.webp?v=1765418696","width":2000},{"alt":null,"id":26493542269027,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fdf4c8569ac07d6eb36bf8ecccaf21cfab14697.webp?v=1765418697"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fdf4c8569ac07d6eb36bf8ecccaf21cfab14697.webp?v=1765418697","width":2000},{"alt":null,"id":26493542400099,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1335a8786699b615ec24e27826eaa24dc3ac9f6e.webp?v=1765418697"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1335a8786699b615ec24e27826eaa24dc3ac9f6e.webp?v=1765418697","width":2000},{"alt":null,"id":26493542531171,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457e7ff57a7e88f77f4b5f6c2179f15f7697ca00.webp?v=1765418697"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457e7ff57a7e88f77f4b5f6c2179f15f7697ca00.webp?v=1765418697","width":2000},{"alt":null,"id":26493542727779,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8189b8ea46ec6a57ef4eb2d4d213fc59f4889c5.webp?v=1765418698"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8189b8ea46ec6a57ef4eb2d4d213fc59f4889c5.webp?v=1765418698","width":2000},{"alt":null,"id":26493542957155,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42eca5ed362897787e6006177312aeb8e02e8c8c.webp?v=1765418698"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42eca5ed362897787e6006177312aeb8e02e8c8c.webp?v=1765418698","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43883230625891,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"NPB01085C1-CJY04","requires_shipping":true,"taxable":true,"featured_image":{"id":34931168280675,"product_id":7937626177635,"position":8,"created_at":"2025-12-11T10:04:56+08:00","updated_at":"2025-12-11T10:04:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457e7ff57a7e88f77f4b5f6c2179f15f7697ca00.webp?v=1765418697","variant_ids":[43883230625891]},"available":true,"name":"iPhone XR Mod NX Jin Young Choi 擁抱長貓 - Lavender","public_title":"Lavender","options":["Lavender"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01085C1-CJY04","featured_media":{"alt":null,"id":26493542531171,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457e7ff57a7e88f77f4b5f6c2179f15f7697ca00.webp?v=1765418697"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883232919651,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108524-CJY04","requires_shipping":true,"taxable":true,"featured_image":{"id":34931167395939,"product_id":7937626177635,"position":1,"created_at":"2025-12-11T10:04:52+08:00","updated_at":"2025-12-11T10:04:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5950b9625c260c12fa00b79840e863f278cdc0e2.webp?v=1765418694","variant_ids":[43883232919651]},"available":true,"name":"iPhone XR Mod NX Jin Young Choi 擁抱長貓 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108524-CJY04","featured_media":{"alt":null,"id":26493541646435,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5950b9625c260c12fa00b79840e863f278cdc0e2.webp?v=1765418694"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883232952419,"title":"Camo Green","option1":"Camo Green","option2":null,"option3":null,"sku":"NPB0108515-CJY04","requires_shipping":true,"taxable":true,"featured_image":{"id":34931168018531,"product_id":7937626177635,"position":6,"created_at":"2025-12-11T10:04:55+08:00","updated_at":"2025-12-11T10:04:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fdf4c8569ac07d6eb36bf8ecccaf21cfab14697.webp?v=1765418697","variant_ids":[43883232952419]},"available":true,"name":"iPhone XR Mod NX Jin Young Choi 擁抱長貓 - Camo Green","public_title":"Camo Green","options":["Camo Green"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108515-CJY04","featured_media":{"alt":null,"id":26493542269027,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fdf4c8569ac07d6eb36bf8ecccaf21cfab14697.webp?v=1765418697"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883233050723,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NPB0108504-CJY04","requires_shipping":true,"taxable":true,"featured_image":{"id":34931167625315,"product_id":7937626177635,"position":3,"created_at":"2025-12-11T10:04:53+08:00","updated_at":"2025-12-11T10:04:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/146c4b9b2f967767594463536d4dd64085ba8d58.webp?v=1765418695","variant_ids":[43883233050723]},"available":true,"name":"iPhone XR Mod NX Jin Young Choi 擁抱長貓 - White","public_title":"White","options":["White"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108504-CJY04","featured_media":{"alt":null,"id":26493541875811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/146c4b9b2f967767594463536d4dd64085ba8d58.webp?v=1765418695"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43883233083491,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NPB0108557-CJY04","requires_shipping":true,"taxable":true,"featured_image":{"id":34931168706659,"product_id":7937626177635,"position":10,"created_at":"2025-12-11T10:04:56+08:00","updated_at":"2025-12-11T10:04:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42eca5ed362897787e6006177312aeb8e02e8c8c.webp?v=1765418698","variant_ids":[43883233083491]},"available":true,"name":"iPhone XR Mod NX Jin Young Choi 擁抱長貓 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108557-CJY04","featured_media":{"alt":null,"id":26493542957155,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42eca5ed362897787e6006177312aeb8e02e8c8c.webp?v=1765418698"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43883230625891,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"NPB01085C1-CJY04","requires_shipping":true,"taxable":true,"featured_image":{"id":34931168280675,"product_id":7937626177635,"position":8,"created_at":"2025-12-11T10:04:56+08:00","updated_at":"2025-12-11T10:04:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457e7ff57a7e88f77f4b5f6c2179f15f7697ca00.webp?v=1765418697","variant_ids":[43883230625891]},"available":true,"name":"iPhone XR Mod NX Jin Young Choi 擁抱長貓 - Lavender","public_title":"Lavender","options":["Lavender"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01085C1-CJY04","featured_media":{"alt":null,"id":26493542531171,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457e7ff57a7e88f77f4b5f6c2179f15f7697ca00.webp?v=1765418697"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$type = "";
var sellingStatus
if ($isMerge) {
$(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: "停產"
}