$product = {"id":7018306142307,"title":"Pixel 8 Pro SolidSuit NBA Logo-洛杉磯湖人 L.A. Lakers","handle":"google-pixel-8-pro-solidsuit-android-pm10","description":null,"published_at":"2023-10-05T14:51:29+08:00","created_at":"2023-09-20T14:49:14+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit專區殼老爹","tags":["10%","20%","30%","40%","50%","brand-Google","designer","designer-nba","device-Pixel 8 Pro","merge","reseller-nba"],"price":83000,"price_min":83000,"price_max":83000,"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":40891524546659,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0230252-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152254333027,"product_id":7018306142307,"position":12,"created_at":"2026-07-02T12:11:58+08:00","updated_at":"2026-07-02T12:12:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_ff9459f9-0b87-42c5-b1a7-87b52b29b489.webp?v=1782965520","variant_ids":[40891524546659]},"available":true,"name":"Pixel 8 Pro SolidSuit NBA Logo-洛杉磯湖人 L.A. Lakers - Black","public_title":"Black","options":["Black"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0230252-PM10","featured_media":{"alt":null,"id":27657127854179,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_ff9459f9-0b87-42c5-b1a7-87b52b29b489.webp?v=1782965520"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40747837816931,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"SST02302Z7-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152253841507,"product_id":7018306142307,"position":11,"created_at":"2026-07-02T12:11:57+08:00","updated_at":"2026-07-02T12:11:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_eacf8460-f136-4d29-b2b0-3f9ed513f881.webp?v=1782965519","variant_ids":[40747837816931]},"available":true,"name":"Pixel 8 Pro SolidSuit NBA Logo-洛杉磯湖人 L.A. Lakers - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST02302Z7-PM10","featured_media":{"alt":null,"id":27657127297123,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_eacf8460-f136-4d29-b2b0-3f9ed513f881.webp?v=1782965519"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40747837849699,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST023020B-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152254824547,"product_id":7018306142307,"position":13,"created_at":"2026-07-02T12:11:59+08:00","updated_at":"2026-07-02T12:12:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_222758e8-cf1d-454b-8e6b-5ed1f2b58b6f.webp?v=1782965521","variant_ids":[40747837849699]},"available":true,"name":"Pixel 8 Pro SolidSuit NBA Logo-洛杉磯湖人 L.A. Lakers - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST023020B-PM10","featured_media":{"alt":null,"id":27657128312931,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_222758e8-cf1d-454b-8e6b-5ed1f2b58b6f.webp?v=1782965521"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-302-PM10.png?v=1695192556","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d.webp?v=1782203402","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f.webp?v=1782203402","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff.webp?v=1782203404","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_d5efe40e-6f84-44ec-aa5e-f526ca150970.webp?v=1782957191","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_ac54cd80-1e25-4bca-9a77-a1f655e29150.webp?v=1782957192","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_fcf0a0a0-37fd-4763-9259-6ecb949820d7.webp?v=1782957193","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_20333154-80da-486f-afe6-57f74aec5ec7.webp?v=1782961179","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_39ccf350-9485-41d6-be21-07ae9ddac1cd.webp?v=1782961180","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_4cdcf4e4-53a9-4ed3-b458-b8234a21c8e6.webp?v=1782961181","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_eacf8460-f136-4d29-b2b0-3f9ed513f881.webp?v=1782965519","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_ff9459f9-0b87-42c5-b1a7-87b52b29b489.webp?v=1782965520","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_222758e8-cf1d-454b-8e6b-5ed1f2b58b6f.webp?v=1782965521"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-302-PM10.png?v=1695192556","options":["color"],"media":[{"alt":null,"id":22774784262243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-302-PM10.png?v=1695192556"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-302-PM10.png?v=1695192556","width":2000},{"alt":null,"id":27574443540579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d.webp?v=1782203402"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d.webp?v=1782203402","width":2000},{"alt":null,"id":27574444097635,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f.webp?v=1782203402"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f.webp?v=1782203402","width":2000},{"alt":null,"id":27574445178979,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff.webp?v=1782203404"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff.webp?v=1782203404","width":2000},{"alt":null,"id":27655749009507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_d5efe40e-6f84-44ec-aa5e-f526ca150970.webp?v=1782957191"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_d5efe40e-6f84-44ec-aa5e-f526ca150970.webp?v=1782957191","width":2000},{"alt":null,"id":27655749599331,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_ac54cd80-1e25-4bca-9a77-a1f655e29150.webp?v=1782957192"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_ac54cd80-1e25-4bca-9a77-a1f655e29150.webp?v=1782957192","width":2000},{"alt":null,"id":27655750156387,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_fcf0a0a0-37fd-4763-9259-6ecb949820d7.webp?v=1782957193"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_fcf0a0a0-37fd-4763-9259-6ecb949820d7.webp?v=1782957193","width":2000},{"alt":null,"id":27656679293027,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_20333154-80da-486f-afe6-57f74aec5ec7.webp?v=1782961179"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_20333154-80da-486f-afe6-57f74aec5ec7.webp?v=1782961179","width":2000},{"alt":null,"id":27656679620707,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_39ccf350-9485-41d6-be21-07ae9ddac1cd.webp?v=1782961180"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_39ccf350-9485-41d6-be21-07ae9ddac1cd.webp?v=1782961180","width":2000},{"alt":null,"id":27656680013923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_4cdcf4e4-53a9-4ed3-b458-b8234a21c8e6.webp?v=1782961181"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_4cdcf4e4-53a9-4ed3-b458-b8234a21c8e6.webp?v=1782961181","width":2000},{"alt":null,"id":27657127297123,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_eacf8460-f136-4d29-b2b0-3f9ed513f881.webp?v=1782965519"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_eacf8460-f136-4d29-b2b0-3f9ed513f881.webp?v=1782965519","width":2000},{"alt":null,"id":27657127854179,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_ff9459f9-0b87-42c5-b1a7-87b52b29b489.webp?v=1782965520"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_ff9459f9-0b87-42c5-b1a7-87b52b29b489.webp?v=1782965520","width":2000},{"alt":null,"id":27657128312931,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_222758e8-cf1d-454b-8e6b-5ed1f2b58b6f.webp?v=1782965521"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_222758e8-cf1d-454b-8e6b-5ed1f2b58b6f.webp?v=1782965521","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":40891524546659,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0230252-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152254333027,"product_id":7018306142307,"position":12,"created_at":"2026-07-02T12:11:58+08:00","updated_at":"2026-07-02T12:12:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_ff9459f9-0b87-42c5-b1a7-87b52b29b489.webp?v=1782965520","variant_ids":[40891524546659]},"available":true,"name":"Pixel 8 Pro SolidSuit NBA Logo-洛杉磯湖人 L.A. Lakers - Black","public_title":"Black","options":["Black"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0230252-PM10","featured_media":{"alt":null,"id":27657127854179,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_ff9459f9-0b87-42c5-b1a7-87b52b29b489.webp?v=1782965520"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40747837816931,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"SST02302Z7-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152253841507,"product_id":7018306142307,"position":11,"created_at":"2026-07-02T12:11:57+08:00","updated_at":"2026-07-02T12:11:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_eacf8460-f136-4d29-b2b0-3f9ed513f881.webp?v=1782965519","variant_ids":[40747837816931]},"available":true,"name":"Pixel 8 Pro SolidSuit NBA Logo-洛杉磯湖人 L.A. Lakers - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST02302Z7-PM10","featured_media":{"alt":null,"id":27657127297123,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2883c4d07b71d7c09f172e91de04f1af52ef36ff_eacf8460-f136-4d29-b2b0-3f9ed513f881.webp?v=1782965519"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40747837849699,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST023020B-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152254824547,"product_id":7018306142307,"position":13,"created_at":"2026-07-02T12:11:59+08:00","updated_at":"2026-07-02T12:12:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_222758e8-cf1d-454b-8e6b-5ed1f2b58b6f.webp?v=1782965521","variant_ids":[40747837849699]},"available":true,"name":"Pixel 8 Pro SolidSuit NBA Logo-洛杉磯湖人 L.A. Lakers - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST023020B-PM10","featured_media":{"alt":null,"id":27657128312931,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e294a4e7acf57720f571ca0bbe0e93a0a2248d_222758e8-cf1d-454b-8e6b-5ed1f2b58b6f.webp?v=1782965521"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":40891524546659,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0230252-PM10","requires_shipping":true,"taxable":true,"featured_image":{"id":36152254333027,"product_id":7018306142307,"position":12,"created_at":"2026-07-02T12:11:58+08:00","updated_at":"2026-07-02T12:12:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_ff9459f9-0b87-42c5-b1a7-87b52b29b489.webp?v=1782965520","variant_ids":[40891524546659]},"available":true,"name":"Pixel 8 Pro SolidSuit NBA Logo-洛杉磯湖人 L.A. Lakers - Black","public_title":"Black","options":["Black"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0230252-PM10","featured_media":{"alt":null,"id":27657127854179,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6f5d4f523e7aa2089a2e640c3fadb78662d30f_ff9459f9-0b87-42c5-b1a7-87b52b29b489.webp?v=1782965520"}},"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: "停產"
}