$product = {"id":7158561669219,"title":"iPhone 15 Pro Clear NBA Logo-洛杉磯湖人 L.A. Lakers","handle":"iphone-15-pro-jellytint-pm10","description":null,"published_at":"2024-02-01T18:53:15+08:00","created_at":"2024-01-26T15:38:55+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師JellyTint專區-殼老爹","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nba","device-iPhone 15 Pro","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":41210415153251,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012970G-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152407490659,"product_id":7158561669219,"position":12,"created_at":"2026-07-02T12:19:19+08:00","updated_at":"2026-07-02T12:19:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_65ea038c-2e1b-406e-8c78-a0a4789295bc.webp?v=1782965961","variant_ids":[41210415153251]},"available":true,"name":"iPhone 15 Pro Clear NBA Logo-洛杉磯湖人 L.A. Lakers - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012970G-PM10","featured_media":{"alt":null,"id":27657280979043,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_65ea038c-2e1b-406e-8c78-a0a4789295bc.webp?v=1782965961"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41210415186019,"title":"Moody Green","option1":"Moody Green","option2":null,"option3":null,"sku":"CCN012970H-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152407162979,"product_id":7158561669219,"position":11,"created_at":"2026-07-02T12:19:18+08:00","updated_at":"2026-07-02T12:19:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_9389a0ba-42a6-488a-bc74-4c4179850895.webp?v=1782965960","variant_ids":[41210415186019]},"available":true,"name":"iPhone 15 Pro Clear NBA Logo-洛杉磯湖人 L.A. Lakers - Moody Green","public_title":"Moody Green","options":["Moody Green"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012970H-PM10","featured_media":{"alt":null,"id":27657280651363,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_9389a0ba-42a6-488a-bc74-4c4179850895.webp?v=1782965960"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41210415218787,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"CCN012970I-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152407687267,"product_id":7158561669219,"position":13,"created_at":"2026-07-02T12:19:20+08:00","updated_at":"2026-07-02T12:19:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_e784d0e4-fbf3-4fab-9c1e-cda3c110ba46.webp?v=1782965962","variant_ids":[41210415218787]},"available":true,"name":"iPhone 15 Pro Clear NBA Logo-洛杉磯湖人 L.A. Lakers - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012970I-PM10","featured_media":{"alt":null,"id":27657281175651,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_e784d0e4-fbf3-4fab-9c1e-cda3c110ba46.webp?v=1782965962"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-297-PM10_e0f11f7a-0f08-47a1-acf8-0d4784bc9b5f.png?v=1706254738","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f.webp?v=1782209103","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca.webp?v=1782209104","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8.webp?v=1782209105","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_3edb8138-27f4-447a-859e-d5039c388806.webp?v=1782958091","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_ceb617d9-5199-4ea3-8ef0-67665891310b.webp?v=1782958091","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_2951bb93-fb08-46ca-931c-15c72c09c90d.webp?v=1782958092","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_197befe8-c8a2-4e7b-bd49-4e5ddbfc8560.webp?v=1782961526","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_8f26dd96-03db-429e-a598-5380c648c318.webp?v=1782961527","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_59be321b-fe6c-4505-83c4-ebba68eccf7b.webp?v=1782961527","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_9389a0ba-42a6-488a-bc74-4c4179850895.webp?v=1782965960","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_65ea038c-2e1b-406e-8c78-a0a4789295bc.webp?v=1782965961","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_e784d0e4-fbf3-4fab-9c1e-cda3c110ba46.webp?v=1782965962"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-297-PM10_e0f11f7a-0f08-47a1-acf8-0d4784bc9b5f.png?v=1706254738","options":["color"],"media":[{"alt":null,"id":23217720623203,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-297-PM10_e0f11f7a-0f08-47a1-acf8-0d4784bc9b5f.png?v=1706254738"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-297-PM10_e0f11f7a-0f08-47a1-acf8-0d4784bc9b5f.png?v=1706254738","width":2000},{"alt":null,"id":27576567300195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f.webp?v=1782209103"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f.webp?v=1782209103","width":2000},{"alt":null,"id":27576567627875,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca.webp?v=1782209104"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca.webp?v=1782209104","width":2000},{"alt":null,"id":27576568152163,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8.webp?v=1782209105"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8.webp?v=1782209105","width":2000},{"alt":null,"id":27656040382563,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_3edb8138-27f4-447a-859e-d5039c388806.webp?v=1782958091"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_3edb8138-27f4-447a-859e-d5039c388806.webp?v=1782958091","width":2000},{"alt":null,"id":27656040743011,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_ceb617d9-5199-4ea3-8ef0-67665891310b.webp?v=1782958091"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_ceb617d9-5199-4ea3-8ef0-67665891310b.webp?v=1782958091","width":2000},{"alt":null,"id":27656041431139,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_2951bb93-fb08-46ca-931c-15c72c09c90d.webp?v=1782958092"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_2951bb93-fb08-46ca-931c-15c72c09c90d.webp?v=1782958092","width":2000},{"alt":null,"id":27656796405859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_197befe8-c8a2-4e7b-bd49-4e5ddbfc8560.webp?v=1782961526"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_197befe8-c8a2-4e7b-bd49-4e5ddbfc8560.webp?v=1782961526","width":2000},{"alt":null,"id":27656796635235,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_8f26dd96-03db-429e-a598-5380c648c318.webp?v=1782961527"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_8f26dd96-03db-429e-a598-5380c648c318.webp?v=1782961527","width":2000},{"alt":null,"id":27656796962915,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_59be321b-fe6c-4505-83c4-ebba68eccf7b.webp?v=1782961527"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_59be321b-fe6c-4505-83c4-ebba68eccf7b.webp?v=1782961527","width":2000},{"alt":null,"id":27657280651363,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_9389a0ba-42a6-488a-bc74-4c4179850895.webp?v=1782965960"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_9389a0ba-42a6-488a-bc74-4c4179850895.webp?v=1782965960","width":2000},{"alt":null,"id":27657280979043,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_65ea038c-2e1b-406e-8c78-a0a4789295bc.webp?v=1782965961"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_65ea038c-2e1b-406e-8c78-a0a4789295bc.webp?v=1782965961","width":2000},{"alt":null,"id":27657281175651,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_e784d0e4-fbf3-4fab-9c1e-cda3c110ba46.webp?v=1782965962"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_e784d0e4-fbf3-4fab-9c1e-cda3c110ba46.webp?v=1782965962","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41210415153251,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012970G-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152407490659,"product_id":7158561669219,"position":12,"created_at":"2026-07-02T12:19:19+08:00","updated_at":"2026-07-02T12:19:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_65ea038c-2e1b-406e-8c78-a0a4789295bc.webp?v=1782965961","variant_ids":[41210415153251]},"available":true,"name":"iPhone 15 Pro Clear NBA Logo-洛杉磯湖人 L.A. Lakers - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012970G-PM10","featured_media":{"alt":null,"id":27657280979043,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_65ea038c-2e1b-406e-8c78-a0a4789295bc.webp?v=1782965961"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41210415186019,"title":"Moody Green","option1":"Moody Green","option2":null,"option3":null,"sku":"CCN012970H-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152407162979,"product_id":7158561669219,"position":11,"created_at":"2026-07-02T12:19:18+08:00","updated_at":"2026-07-02T12:19:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_9389a0ba-42a6-488a-bc74-4c4179850895.webp?v=1782965960","variant_ids":[41210415186019]},"available":true,"name":"iPhone 15 Pro Clear NBA Logo-洛杉磯湖人 L.A. Lakers - Moody Green","public_title":"Moody Green","options":["Moody Green"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012970H-PM10","featured_media":{"alt":null,"id":27657280651363,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de2074ecc47167daa5172b8330b2d70dcd32dbca_9389a0ba-42a6-488a-bc74-4c4179850895.webp?v=1782965960"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41210415218787,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"CCN012970I-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152407687267,"product_id":7158561669219,"position":13,"created_at":"2026-07-02T12:19:20+08:00","updated_at":"2026-07-02T12:19:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_e784d0e4-fbf3-4fab-9c1e-cda3c110ba46.webp?v=1782965962","variant_ids":[41210415218787]},"available":true,"name":"iPhone 15 Pro Clear NBA Logo-洛杉磯湖人 L.A. Lakers - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012970I-PM10","featured_media":{"alt":null,"id":27657281175651,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33366228dbc0c3d3ebafec7641d0202a31be70f8_e784d0e4-fbf3-4fab-9c1e-cda3c110ba46.webp?v=1782965962"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41210415153251,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012970G-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152407490659,"product_id":7158561669219,"position":12,"created_at":"2026-07-02T12:19:19+08:00","updated_at":"2026-07-02T12:19:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_65ea038c-2e1b-406e-8c78-a0a4789295bc.webp?v=1782965961","variant_ids":[41210415153251]},"available":true,"name":"iPhone 15 Pro Clear NBA Logo-洛杉磯湖人 L.A. Lakers - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012970G-PM10","featured_media":{"alt":null,"id":27657280979043,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1c45e8c449a1628a14fcc14f249f95dd64a23f_65ea038c-2e1b-406e-8c78-a0a4789295bc.webp?v=1782965961"}},"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: "停產"
}