$product = {"id":7920035397731,"title":"iPhone 13 Pro Max Mod NX Incrediville 怪奇事物所 所長的聖地巡禮","handle":"iphone-13-pro-max-mod-nx-hd65","description":null,"published_at":"2025-11-13T10:01:43+08:00","created_at":"2025-11-10T10:00:10+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-incrediville","device-iPhone 13 Pro Max","merge","reseller-incrediville"],"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":43827671793763,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"NPB01232J5-HD65","requires_shipping":true,"taxable":true,"featured_image":{"id":34786034548835,"product_id":7920035397731,"position":15,"created_at":"2025-11-11T09:39:36+08:00","updated_at":"2025-11-11T09:39:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/521704d41e6f5729d621471b65ff9ad71f17b633_09fac348-849e-4995-a25f-794d8ed049d8.webp?v=1762825178","variant_ids":[43827671793763]},"available":true,"name":"iPhone 13 Pro Max Mod NX Incrediville 怪奇事物所 所長的聖地巡禮 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01232J5-HD65","featured_media":{"alt":null,"id":26351491645539,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/521704d41e6f5729d621471b65ff9ad71f17b633_09fac348-849e-4995-a25f-794d8ed049d8.webp?v=1762825178"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43827671859299,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0123224-HD65","requires_shipping":true,"taxable":true,"featured_image":{"id":34786034974819,"product_id":7920035397731,"position":17,"created_at":"2025-11-11T09:39:37+08:00","updated_at":"2025-11-11T09:39:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859a8a91e29c2908f13c1c68fe60c1ea663e512f_cda607c1-5a6c-42fb-ade1-ae4173926b10.webp?v=1762825179","variant_ids":[43827671859299]},"available":true,"name":"iPhone 13 Pro Max Mod NX Incrediville 怪奇事物所 所長的聖地巡禮 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0123224-HD65","featured_media":{"alt":null,"id":26351492071523,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859a8a91e29c2908f13c1c68fe60c1ea663e512f_cda607c1-5a6c-42fb-ade1-ae4173926b10.webp?v=1762825179"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ffa1f2b1cd0051bf2704bc315dc7aa8913b7ecd.webp?v=1762740016","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65feaf0e741eae5d9ca5669ed986a3e1732c889c.webp?v=1762740018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e32653534c363e20e046d0aa89b1cbf207f21ff8.webp?v=1762740018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1ef8e70372419daf5d0c28d562300ca308d8ea3.webp?v=1762740019","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66716cd50555892c13944bb8cf0fa3020142772d.webp?v=1762740020","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e873e6adcd1c0b3189301d8800fb79c23a4194.webp?v=1762740020","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859a8a91e29c2908f13c1c68fe60c1ea663e512f.webp?v=1762740021","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/192e7af304164df3046217374a17ab419df7068d.webp?v=1762740021","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/521704d41e6f5729d621471b65ff9ad71f17b633.webp?v=1762740022","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1ef8e70372419daf5d0c28d562300ca308d8ea3_05329cba-b7cd-4ea5-be81-f9be77d6c290.webp?v=1762825175","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66716cd50555892c13944bb8cf0fa3020142772d_4367e399-114c-4de3-b53f-5d407372ee71.webp?v=1762825175","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65feaf0e741eae5d9ca5669ed986a3e1732c889c_ce024a61-37f6-4f11-963c-ac0d21f72de3.webp?v=1762825176","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/192e7af304164df3046217374a17ab419df7068d_30e1a3db-226d-4d33-a449-e827705158f9.webp?v=1762825177","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ffa1f2b1cd0051bf2704bc315dc7aa8913b7ecd_5e0230e3-70ca-4425-bcfc-87bfb0558708.webp?v=1762825177","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/521704d41e6f5729d621471b65ff9ad71f17b633_09fac348-849e-4995-a25f-794d8ed049d8.webp?v=1762825178","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e32653534c363e20e046d0aa89b1cbf207f21ff8_4f459ed7-e3ce-4c81-ac5c-f3377b894c7f.webp?v=1762825178","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859a8a91e29c2908f13c1c68fe60c1ea663e512f_cda607c1-5a6c-42fb-ade1-ae4173926b10.webp?v=1762825179","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e873e6adcd1c0b3189301d8800fb79c23a4194_6b43556a-2a75-4c66-b584-62dbac03062b.webp?v=1762825180"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ffa1f2b1cd0051bf2704bc315dc7aa8913b7ecd.webp?v=1762740016","options":["color"],"media":[{"alt":null,"id":26345730408547,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ffa1f2b1cd0051bf2704bc315dc7aa8913b7ecd.webp?v=1762740016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ffa1f2b1cd0051bf2704bc315dc7aa8913b7ecd.webp?v=1762740016","width":2000},{"alt":null,"id":26345731522659,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65feaf0e741eae5d9ca5669ed986a3e1732c889c.webp?v=1762740018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65feaf0e741eae5d9ca5669ed986a3e1732c889c.webp?v=1762740018","width":2000},{"alt":null,"id":26345732472931,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e32653534c363e20e046d0aa89b1cbf207f21ff8.webp?v=1762740018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e32653534c363e20e046d0aa89b1cbf207f21ff8.webp?v=1762740018","width":2000},{"alt":null,"id":26345733587043,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1ef8e70372419daf5d0c28d562300ca308d8ea3.webp?v=1762740019"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1ef8e70372419daf5d0c28d562300ca308d8ea3.webp?v=1762740019","width":2000},{"alt":null,"id":26345734635619,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66716cd50555892c13944bb8cf0fa3020142772d.webp?v=1762740020"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66716cd50555892c13944bb8cf0fa3020142772d.webp?v=1762740020","width":2000},{"alt":null,"id":26345735815267,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e873e6adcd1c0b3189301d8800fb79c23a4194.webp?v=1762740020"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e873e6adcd1c0b3189301d8800fb79c23a4194.webp?v=1762740020","width":2000},{"alt":null,"id":26345737355363,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859a8a91e29c2908f13c1c68fe60c1ea663e512f.webp?v=1762740021"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859a8a91e29c2908f13c1c68fe60c1ea663e512f.webp?v=1762740021","width":2000},{"alt":null,"id":26345738567779,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/192e7af304164df3046217374a17ab419df7068d.webp?v=1762740021"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/192e7af304164df3046217374a17ab419df7068d.webp?v=1762740021","width":2000},{"alt":null,"id":26345739747427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/521704d41e6f5729d621471b65ff9ad71f17b633.webp?v=1762740022"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/521704d41e6f5729d621471b65ff9ad71f17b633.webp?v=1762740022","width":2000},{"alt":null,"id":26351490138211,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1ef8e70372419daf5d0c28d562300ca308d8ea3_05329cba-b7cd-4ea5-be81-f9be77d6c290.webp?v=1762825175"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1ef8e70372419daf5d0c28d562300ca308d8ea3_05329cba-b7cd-4ea5-be81-f9be77d6c290.webp?v=1762825175","width":2000},{"alt":null,"id":26351490433123,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66716cd50555892c13944bb8cf0fa3020142772d_4367e399-114c-4de3-b53f-5d407372ee71.webp?v=1762825175"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66716cd50555892c13944bb8cf0fa3020142772d_4367e399-114c-4de3-b53f-5d407372ee71.webp?v=1762825175","width":2000},{"alt":null,"id":26351490728035,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65feaf0e741eae5d9ca5669ed986a3e1732c889c_ce024a61-37f6-4f11-963c-ac0d21f72de3.webp?v=1762825176"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65feaf0e741eae5d9ca5669ed986a3e1732c889c_ce024a61-37f6-4f11-963c-ac0d21f72de3.webp?v=1762825176","width":2000},{"alt":null,"id":26351491154019,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/192e7af304164df3046217374a17ab419df7068d_30e1a3db-226d-4d33-a449-e827705158f9.webp?v=1762825177"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/192e7af304164df3046217374a17ab419df7068d_30e1a3db-226d-4d33-a449-e827705158f9.webp?v=1762825177","width":2000},{"alt":null,"id":26351491383395,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ffa1f2b1cd0051bf2704bc315dc7aa8913b7ecd_5e0230e3-70ca-4425-bcfc-87bfb0558708.webp?v=1762825177"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ffa1f2b1cd0051bf2704bc315dc7aa8913b7ecd_5e0230e3-70ca-4425-bcfc-87bfb0558708.webp?v=1762825177","width":2000},{"alt":null,"id":26351491645539,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/521704d41e6f5729d621471b65ff9ad71f17b633_09fac348-849e-4995-a25f-794d8ed049d8.webp?v=1762825178"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/521704d41e6f5729d621471b65ff9ad71f17b633_09fac348-849e-4995-a25f-794d8ed049d8.webp?v=1762825178","width":2000},{"alt":null,"id":26351491809379,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e32653534c363e20e046d0aa89b1cbf207f21ff8_4f459ed7-e3ce-4c81-ac5c-f3377b894c7f.webp?v=1762825178"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e32653534c363e20e046d0aa89b1cbf207f21ff8_4f459ed7-e3ce-4c81-ac5c-f3377b894c7f.webp?v=1762825178","width":2000},{"alt":null,"id":26351492071523,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859a8a91e29c2908f13c1c68fe60c1ea663e512f_cda607c1-5a6c-42fb-ade1-ae4173926b10.webp?v=1762825179"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859a8a91e29c2908f13c1c68fe60c1ea663e512f_cda607c1-5a6c-42fb-ade1-ae4173926b10.webp?v=1762825179","width":2000},{"alt":null,"id":26351492268131,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e873e6adcd1c0b3189301d8800fb79c23a4194_6b43556a-2a75-4c66-b584-62dbac03062b.webp?v=1762825180"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e873e6adcd1c0b3189301d8800fb79c23a4194_6b43556a-2a75-4c66-b584-62dbac03062b.webp?v=1762825180","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43827671793763,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"NPB01232J5-HD65","requires_shipping":true,"taxable":true,"featured_image":{"id":34786034548835,"product_id":7920035397731,"position":15,"created_at":"2025-11-11T09:39:36+08:00","updated_at":"2025-11-11T09:39:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/521704d41e6f5729d621471b65ff9ad71f17b633_09fac348-849e-4995-a25f-794d8ed049d8.webp?v=1762825178","variant_ids":[43827671793763]},"available":true,"name":"iPhone 13 Pro Max Mod NX Incrediville 怪奇事物所 所長的聖地巡禮 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01232J5-HD65","featured_media":{"alt":null,"id":26351491645539,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/521704d41e6f5729d621471b65ff9ad71f17b633_09fac348-849e-4995-a25f-794d8ed049d8.webp?v=1762825178"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43827671859299,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0123224-HD65","requires_shipping":true,"taxable":true,"featured_image":{"id":34786034974819,"product_id":7920035397731,"position":17,"created_at":"2025-11-11T09:39:37+08:00","updated_at":"2025-11-11T09:39:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859a8a91e29c2908f13c1c68fe60c1ea663e512f_cda607c1-5a6c-42fb-ade1-ae4173926b10.webp?v=1762825179","variant_ids":[43827671859299]},"available":true,"name":"iPhone 13 Pro Max Mod NX Incrediville 怪奇事物所 所長的聖地巡禮 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0123224-HD65","featured_media":{"alt":null,"id":26351492071523,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859a8a91e29c2908f13c1c68fe60c1ea663e512f_cda607c1-5a6c-42fb-ade1-ae4173926b10.webp?v=1762825179"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43827671793763,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"NPB01232J5-HD65","requires_shipping":true,"taxable":true,"featured_image":{"id":34786034548835,"product_id":7920035397731,"position":15,"created_at":"2025-11-11T09:39:36+08:00","updated_at":"2025-11-11T09:39:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/521704d41e6f5729d621471b65ff9ad71f17b633_09fac348-849e-4995-a25f-794d8ed049d8.webp?v=1762825178","variant_ids":[43827671793763]},"available":true,"name":"iPhone 13 Pro Max Mod NX Incrediville 怪奇事物所 所長的聖地巡禮 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01232J5-HD65","featured_media":{"alt":null,"id":26351491645539,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/521704d41e6f5729d621471b65ff9ad71f17b633_09fac348-849e-4995-a25f-794d8ed049d8.webp?v=1762825178"}},"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: "停產"
}