$product = {"id":7920588456035,"title":"iPhone 14 Pro Max Clear 咒術迴戰 懷玉・玉折角色系列-伏黑甚爾","handle":"iphone-14-pro-max-jellytint-ptt08","description":null,"published_at":"2025-11-10T16:26:53+08:00","created_at":"2025-11-10T15:48:42+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jujutsu-kaisen","device-iPhone 14 Pro Max","merge","reseller-jujutsu-kaisen"],"price":128000,"price_min":128000,"price_max":128000,"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":43829090123875,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012630J-PTT08","requires_shipping":true,"taxable":true,"featured_image":{"id":36124980183139,"product_id":7920588456035,"position":11,"created_at":"2026-06-29T15:33:48+08:00","updated_at":"2026-06-29T15:33:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_c42e2a9f-0804-406b-aab9-be1ae0cf5f45.webp?v=1782718430","variant_ids":[43829090123875]},"available":true,"name":"iPhone 14 Pro Max Clear 咒術迴戰 懷玉・玉折角色系列-伏黑甚爾 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630J-PTT08","featured_media":{"alt":null,"id":27630222999651,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_c42e2a9f-0804-406b-aab9-be1ae0cf5f45.webp?v=1782718430"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43829092024419,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012630G-PTT08","requires_shipping":true,"taxable":true,"featured_image":{"id":36124980609123,"product_id":7920588456035,"position":13,"created_at":"2026-06-29T15:33:49+08:00","updated_at":"2026-06-29T15:33:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_4ae14425-fadb-4823-98fc-2d126028329a.webp?v=1782718431","variant_ids":[43829092024419]},"available":true,"name":"iPhone 14 Pro Max Clear 咒術迴戰 懷玉・玉折角色系列-伏黑甚爾 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630G-PTT08","featured_media":{"alt":null,"id":27630223360099,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_4ae14425-fadb-4823-98fc-2d126028329a.webp?v=1782718431"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43829092057187,"title":"Moody Green","option1":"Moody Green","option2":null,"option3":null,"sku":"CCN012630H-PTT08","requires_shipping":true,"taxable":true,"featured_image":{"id":36124980445283,"product_id":7920588456035,"position":12,"created_at":"2026-06-29T15:33:48+08:00","updated_at":"2026-06-29T15:33:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_3d1cdef4-adac-468f-8bdd-ea76fe68bb85.webp?v=1782718430","variant_ids":[43829092057187]},"available":true,"name":"iPhone 14 Pro Max Clear 咒術迴戰 懷玉・玉折角色系列-伏黑甚爾 - Moody Green","public_title":"Moody Green","options":["Moody Green"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630H-PTT08","featured_media":{"alt":null,"id":27630223229027,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_3d1cdef4-adac-468f-8bdd-ea76fe68bb85.webp?v=1782718430"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3.webp?v=1762760928","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fef0d6aa239eb6b6238d6755216e3a810a4a905a.webp?v=1762760928","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e.webp?v=1762760929","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f.webp?v=1762760930","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_cd92ad21-d5a0-4769-a582-96a0eb0faa44.webp?v=1782265697","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_d4b6006d-2bae-46f4-a269-4206b747ba26.webp?v=1782265697","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_ae91a70b-72a6-4df4-ac12-d59aabfece4c.webp?v=1782265698","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_2ab027a1-a51f-4a08-a69c-141a01ea1b31.webp?v=1782291518","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_5182cb46-7a3d-4672-b681-17d541883472.webp?v=1782291519","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_1bda2c04-eda7-476f-a2dc-003f5a22860f.webp?v=1782291520","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_c42e2a9f-0804-406b-aab9-be1ae0cf5f45.webp?v=1782718430","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_3d1cdef4-adac-468f-8bdd-ea76fe68bb85.webp?v=1782718430","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_4ae14425-fadb-4823-98fc-2d126028329a.webp?v=1782718431"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3.webp?v=1762760928","options":["color"],"media":[{"alt":null,"id":26348059459683,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3.webp?v=1762760928"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3.webp?v=1762760928","width":2000},{"alt":null,"id":26348059623523,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fef0d6aa239eb6b6238d6755216e3a810a4a905a.webp?v=1762760928"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fef0d6aa239eb6b6238d6755216e3a810a4a905a.webp?v=1762760928","width":2000},{"alt":null,"id":26348059820131,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e.webp?v=1762760929"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e.webp?v=1762760929","width":2000},{"alt":null,"id":26348059951203,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f.webp?v=1762760930"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f.webp?v=1762760930","width":2000},{"alt":null,"id":27587205693539,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_cd92ad21-d5a0-4769-a582-96a0eb0faa44.webp?v=1782265697"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_cd92ad21-d5a0-4769-a582-96a0eb0faa44.webp?v=1782265697","width":2000},{"alt":null,"id":27587205955683,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_d4b6006d-2bae-46f4-a269-4206b747ba26.webp?v=1782265697"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_d4b6006d-2bae-46f4-a269-4206b747ba26.webp?v=1782265697","width":2000},{"alt":null,"id":27587206283363,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_ae91a70b-72a6-4df4-ac12-d59aabfece4c.webp?v=1782265698"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_ae91a70b-72a6-4df4-ac12-d59aabfece4c.webp?v=1782265698","width":2000},{"alt":null,"id":27594651467875,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_2ab027a1-a51f-4a08-a69c-141a01ea1b31.webp?v=1782291518"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_2ab027a1-a51f-4a08-a69c-141a01ea1b31.webp?v=1782291518","width":2000},{"alt":null,"id":27594651697251,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_5182cb46-7a3d-4672-b681-17d541883472.webp?v=1782291519"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_5182cb46-7a3d-4672-b681-17d541883472.webp?v=1782291519","width":2000},{"alt":null,"id":27594651992163,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_1bda2c04-eda7-476f-a2dc-003f5a22860f.webp?v=1782291520"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_1bda2c04-eda7-476f-a2dc-003f5a22860f.webp?v=1782291520","width":2000},{"alt":null,"id":27630222999651,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_c42e2a9f-0804-406b-aab9-be1ae0cf5f45.webp?v=1782718430"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_c42e2a9f-0804-406b-aab9-be1ae0cf5f45.webp?v=1782718430","width":2000},{"alt":null,"id":27630223229027,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_3d1cdef4-adac-468f-8bdd-ea76fe68bb85.webp?v=1782718430"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_3d1cdef4-adac-468f-8bdd-ea76fe68bb85.webp?v=1782718430","width":2000},{"alt":null,"id":27630223360099,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_4ae14425-fadb-4823-98fc-2d126028329a.webp?v=1782718431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_4ae14425-fadb-4823-98fc-2d126028329a.webp?v=1782718431","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43829090123875,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012630J-PTT08","requires_shipping":true,"taxable":true,"featured_image":{"id":36124980183139,"product_id":7920588456035,"position":11,"created_at":"2026-06-29T15:33:48+08:00","updated_at":"2026-06-29T15:33:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_c42e2a9f-0804-406b-aab9-be1ae0cf5f45.webp?v=1782718430","variant_ids":[43829090123875]},"available":true,"name":"iPhone 14 Pro Max Clear 咒術迴戰 懷玉・玉折角色系列-伏黑甚爾 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630J-PTT08","featured_media":{"alt":null,"id":27630222999651,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_c42e2a9f-0804-406b-aab9-be1ae0cf5f45.webp?v=1782718430"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43829092024419,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012630G-PTT08","requires_shipping":true,"taxable":true,"featured_image":{"id":36124980609123,"product_id":7920588456035,"position":13,"created_at":"2026-06-29T15:33:49+08:00","updated_at":"2026-06-29T15:33:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_4ae14425-fadb-4823-98fc-2d126028329a.webp?v=1782718431","variant_ids":[43829092024419]},"available":true,"name":"iPhone 14 Pro Max Clear 咒術迴戰 懷玉・玉折角色系列-伏黑甚爾 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630G-PTT08","featured_media":{"alt":null,"id":27630223360099,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f3c5190a1c2ebd4e661ccde372b41c920ceb3_4ae14425-fadb-4823-98fc-2d126028329a.webp?v=1782718431"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43829092057187,"title":"Moody Green","option1":"Moody Green","option2":null,"option3":null,"sku":"CCN012630H-PTT08","requires_shipping":true,"taxable":true,"featured_image":{"id":36124980445283,"product_id":7920588456035,"position":12,"created_at":"2026-06-29T15:33:48+08:00","updated_at":"2026-06-29T15:33:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_3d1cdef4-adac-468f-8bdd-ea76fe68bb85.webp?v=1782718430","variant_ids":[43829092057187]},"available":true,"name":"iPhone 14 Pro Max Clear 咒術迴戰 懷玉・玉折角色系列-伏黑甚爾 - Moody Green","public_title":"Moody Green","options":["Moody Green"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630H-PTT08","featured_media":{"alt":null,"id":27630223229027,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32229b78c50a2d4ce61406f648521f93d0afdd8e_3d1cdef4-adac-468f-8bdd-ea76fe68bb85.webp?v=1782718430"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43829090123875,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012630J-PTT08","requires_shipping":true,"taxable":true,"featured_image":{"id":36124980183139,"product_id":7920588456035,"position":11,"created_at":"2026-06-29T15:33:48+08:00","updated_at":"2026-06-29T15:33:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_c42e2a9f-0804-406b-aab9-be1ae0cf5f45.webp?v=1782718430","variant_ids":[43829090123875]},"available":true,"name":"iPhone 14 Pro Max Clear 咒術迴戰 懷玉・玉折角色系列-伏黑甚爾 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630J-PTT08","featured_media":{"alt":null,"id":27630222999651,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4de2df75dd915393d5d5482eb998972a63d0434f_c42e2a9f-0804-406b-aab9-be1ae0cf5f45.webp?v=1782718430"}},"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: "停產"
}