$product = {"id":7863055384675,"title":"iPhone Air Clear (相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks","handle":"iphone-air-jellytint-with-capture-button-pm14","description":null,"published_at":"2025-09-10T19:39:57+08:00","created_at":"2025-08-22T18:21:35+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nba","device-iPhone Air","merge","reseller-nba"],"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":43607860478051,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"JTB013510G-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152576639075,"product_id":7863055384675,"position":12,"created_at":"2026-07-02T12:27:33+08:00","updated_at":"2026-07-02T12:27:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_f6ead8ba-848d-4058-90f9-1f08d77648cb.webp?v=1782966455","variant_ids":[43607860478051]},"available":true,"name":"iPhone Air Clear (相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - 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":"JTB013510G-PM14","featured_media":{"alt":null,"id":27657450127459,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_f6ead8ba-848d-4058-90f9-1f08d77648cb.webp?v=1782966455"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43607861461091,"title":"Nocturne Blue","option1":"Nocturne Blue","option2":null,"option3":null,"sku":"JTB013514M-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152576344163,"product_id":7863055384675,"position":11,"created_at":"2026-07-02T12:27:32+08:00","updated_at":"2026-07-02T12:27:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_9d976041-3f2d-4bdd-a10b-dfaade875a6a.webp?v=1782966454","variant_ids":[43607861461091]},"available":true,"name":"iPhone Air Clear (相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - Nocturne Blue","public_title":"Nocturne Blue","options":["Nocturne Blue"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013514M-PM14","featured_media":{"alt":null,"id":27657449832547,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_9d976041-3f2d-4bdd-a10b-dfaade875a6a.webp?v=1782966454"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43607861493859,"title":"Gleam Rosé","option1":"Gleam Rosé","option2":null,"option3":null,"sku":"JTB013514L-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152577261667,"product_id":7863055384675,"position":13,"created_at":"2026-07-02T12:27:34+08:00","updated_at":"2026-07-02T12:27:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_9b68b648-3604-42e2-aad6-404a2d99a7eb.webp?v=1782966456","variant_ids":[43607861493859]},"available":true,"name":"iPhone Air Clear (相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - Gleam Rosé","public_title":"Gleam Rosé","options":["Gleam Rosé"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013514L-PM14","featured_media":{"alt":null,"id":27657450750051,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_9b68b648-3604-42e2-aad6-404a2d99a7eb.webp?v=1782966456"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-351-PM14_ffe89142-e2e4-42f3-a1b9-c98a3f530ab8.png?v=1755858098","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73.webp?v=1782215351","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff.webp?v=1782215351","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec.webp?v=1782215352","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_f67f30d5-d334-4c3f-b233-ce5286851b5c.webp?v=1782958872","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_9e7b699d-ebb8-4653-972d-e88fe804c6d9.webp?v=1782958873","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_7f57e61a-2555-4b72-a17c-180106925a61.webp?v=1782958874","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_4fd9f4dc-ad69-4ce4-84e5-5115bfa6d7e4.webp?v=1782962226","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_9dafffa0-200e-4a4d-9886-7d9d48a612dd.webp?v=1782962231","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_e5b2008c-743a-4b0a-b94d-6ab4edfa1405.webp?v=1782962237","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_9d976041-3f2d-4bdd-a10b-dfaade875a6a.webp?v=1782966454","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_f6ead8ba-848d-4058-90f9-1f08d77648cb.webp?v=1782966455","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_9b68b648-3604-42e2-aad6-404a2d99a7eb.webp?v=1782966456"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-351-PM14_ffe89142-e2e4-42f3-a1b9-c98a3f530ab8.png?v=1755858098","options":["color"],"media":[{"alt":null,"id":25940941733987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-351-PM14_ffe89142-e2e4-42f3-a1b9-c98a3f530ab8.png?v=1755858098"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-351-PM14_ffe89142-e2e4-42f3-a1b9-c98a3f530ab8.png?v=1755858098","width":2000},{"alt":null,"id":27580184166499,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73.webp?v=1782215351"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73.webp?v=1782215351","width":2000},{"alt":null,"id":27580184723555,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff.webp?v=1782215351"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff.webp?v=1782215351","width":2000},{"alt":null,"id":27580185313379,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec.webp?v=1782215352"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec.webp?v=1782215352","width":2000},{"alt":null,"id":27656335786083,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_f67f30d5-d334-4c3f-b233-ce5286851b5c.webp?v=1782958872"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_f67f30d5-d334-4c3f-b233-ce5286851b5c.webp?v=1782958872","width":2000},{"alt":null,"id":27656336048227,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_9e7b699d-ebb8-4653-972d-e88fe804c6d9.webp?v=1782958873"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_9e7b699d-ebb8-4653-972d-e88fe804c6d9.webp?v=1782958873","width":2000},{"alt":null,"id":27656336572515,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_7f57e61a-2555-4b72-a17c-180106925a61.webp?v=1782958874"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_7f57e61a-2555-4b72-a17c-180106925a61.webp?v=1782958874","width":2000},{"alt":null,"id":27656949334115,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_4fd9f4dc-ad69-4ce4-84e5-5115bfa6d7e4.webp?v=1782962226"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_4fd9f4dc-ad69-4ce4-84e5-5115bfa6d7e4.webp?v=1782962226","width":2000},{"alt":null,"id":27656949760099,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_9dafffa0-200e-4a4d-9886-7d9d48a612dd.webp?v=1782962231"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_9dafffa0-200e-4a4d-9886-7d9d48a612dd.webp?v=1782962231","width":2000},{"alt":null,"id":27656950612067,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_e5b2008c-743a-4b0a-b94d-6ab4edfa1405.webp?v=1782962237"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_e5b2008c-743a-4b0a-b94d-6ab4edfa1405.webp?v=1782962237","width":2000},{"alt":null,"id":27657449832547,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_9d976041-3f2d-4bdd-a10b-dfaade875a6a.webp?v=1782966454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_9d976041-3f2d-4bdd-a10b-dfaade875a6a.webp?v=1782966454","width":2000},{"alt":null,"id":27657450127459,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_f6ead8ba-848d-4058-90f9-1f08d77648cb.webp?v=1782966455"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_f6ead8ba-848d-4058-90f9-1f08d77648cb.webp?v=1782966455","width":2000},{"alt":null,"id":27657450750051,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_9b68b648-3604-42e2-aad6-404a2d99a7eb.webp?v=1782966456"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_9b68b648-3604-42e2-aad6-404a2d99a7eb.webp?v=1782966456","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43607860478051,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"JTB013510G-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152576639075,"product_id":7863055384675,"position":12,"created_at":"2026-07-02T12:27:33+08:00","updated_at":"2026-07-02T12:27:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_f6ead8ba-848d-4058-90f9-1f08d77648cb.webp?v=1782966455","variant_ids":[43607860478051]},"available":true,"name":"iPhone Air Clear (相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - 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":"JTB013510G-PM14","featured_media":{"alt":null,"id":27657450127459,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_f6ead8ba-848d-4058-90f9-1f08d77648cb.webp?v=1782966455"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43607861461091,"title":"Nocturne Blue","option1":"Nocturne Blue","option2":null,"option3":null,"sku":"JTB013514M-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152576344163,"product_id":7863055384675,"position":11,"created_at":"2026-07-02T12:27:32+08:00","updated_at":"2026-07-02T12:27:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_9d976041-3f2d-4bdd-a10b-dfaade875a6a.webp?v=1782966454","variant_ids":[43607861461091]},"available":true,"name":"iPhone Air Clear (相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - Nocturne Blue","public_title":"Nocturne Blue","options":["Nocturne Blue"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013514M-PM14","featured_media":{"alt":null,"id":27657449832547,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85641f8a973417685588952fab058101942e20ec_9d976041-3f2d-4bdd-a10b-dfaade875a6a.webp?v=1782966454"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43607861493859,"title":"Gleam Rosé","option1":"Gleam Rosé","option2":null,"option3":null,"sku":"JTB013514L-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152577261667,"product_id":7863055384675,"position":13,"created_at":"2026-07-02T12:27:34+08:00","updated_at":"2026-07-02T12:27:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_9b68b648-3604-42e2-aad6-404a2d99a7eb.webp?v=1782966456","variant_ids":[43607861493859]},"available":true,"name":"iPhone Air Clear (相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - Gleam Rosé","public_title":"Gleam Rosé","options":["Gleam Rosé"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013514L-PM14","featured_media":{"alt":null,"id":27657450750051,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8a5c8a2c622b93ea473c6c926f3c84ad01bb73_9b68b648-3604-42e2-aad6-404a2d99a7eb.webp?v=1782966456"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43607860478051,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"JTB013510G-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152576639075,"product_id":7863055384675,"position":12,"created_at":"2026-07-02T12:27:33+08:00","updated_at":"2026-07-02T12:27:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_f6ead8ba-848d-4058-90f9-1f08d77648cb.webp?v=1782966455","variant_ids":[43607860478051]},"available":true,"name":"iPhone Air Clear (相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - 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":"JTB013510G-PM14","featured_media":{"alt":null,"id":27657450127459,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd811d49fb37f12a858b878916628631b69a3ff_f6ead8ba-848d-4058-90f9-1f08d77648cb.webp?v=1782966455"}},"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: "停產"
}