$product = {"id":7998334238819,"title":"iPhone 12 mini SolidSuit 太空 NASA Space Food Bag - Vacuum Sealed","handle":"iphone-12-mini-solidsuit-classic-xk36","description":null,"published_at":"2026-04-20T12:11:06+08:00","created_at":"2026-04-20T09:44:29+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nasa","device-iPhone 12 Mini","merge","reseller-nasa"],"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":44126037966947,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-XK36","requires_shipping":true,"taxable":true,"featured_image":{"id":36254616551523,"product_id":7998334238819,"position":11,"created_at":"2026-07-14T09:48:52+08:00","updated_at":"2026-07-14T09:48:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84288c5144356972938d646e5d6f58a24c7abfa9_d4b7080f-39da-4ef3-91f5-f8bb2cbaa282.webp?v=1783993734","variant_ids":[44126037966947]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 NASA Space Food Bag - Vacuum Sealed - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-XK36","featured_media":{"alt":null,"id":27758731493475,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84288c5144356972938d646e5d6f58a24c7abfa9_d4b7080f-39da-4ef3-91f5-f8bb2cbaa282.webp?v=1783993734"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44126045962339,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-XK36","requires_shipping":true,"taxable":true,"featured_image":{"id":36254615535715,"product_id":7998334238819,"position":10,"created_at":"2026-07-14T09:48:50+08:00","updated_at":"2026-07-14T09:48:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa625159afb35885972c51a82c5a2bf12e86f6c0_83c69f46-71af-4712-b7b9-90612d0ed0a1.webp?v=1783993732","variant_ids":[44126045962339]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 NASA Space Food Bag - Vacuum Sealed - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-XK36","featured_media":{"alt":null,"id":27758730510435,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa625159afb35885972c51a82c5a2bf12e86f6c0_83c69f46-71af-4712-b7b9-90612d0ed0a1.webp?v=1783993732"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44126048747619,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-XK36","requires_shipping":true,"taxable":true,"featured_image":{"id":36254618353763,"product_id":7998334238819,"position":13,"created_at":"2026-07-14T09:48:56+08:00","updated_at":"2026-07-14T09:48:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af4af1aa94be4f7f49b64d24fd39b3abb72f7ac_aa42a761-4b52-4ff4-b876-e809c2bd5d9a.webp?v=1783993738","variant_ids":[44126048747619]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 NASA Space Food Bag - Vacuum Sealed - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-XK36","featured_media":{"alt":null,"id":27758733295715,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af4af1aa94be4f7f49b64d24fd39b3abb72f7ac_aa42a761-4b52-4ff4-b876-e809c2bd5d9a.webp?v=1783993738"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6d45c0e24a1afe6105990ecfec0fe97646766bc.webp?v=1776649502","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c377d93785e14a785cabb9c7cd5ee5869b91133d.webp?v=1776649503","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fa27d90793ab41219b346fc4375c558cdcd0d90.webp?v=1776649503","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af4af1aa94be4f7f49b64d24fd39b3abb72f7ac.webp?v=1776649505","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84288c5144356972938d646e5d6f58a24c7abfa9.webp?v=1776649505","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa625159afb35885972c51a82c5a2bf12e86f6c0.webp?v=1776649506","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b1e2901976ee78729af8afd0b71f3a7a8b7afbe.webp?v=1776649506","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0057613f70b39b0ee42ce3276a11b04959cf8052.webp?v=1776649507","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6d45c0e24a1afe6105990ecfec0fe97646766bc_8fdf598c-2157-4376-ad13-6515f9495a23.webp?v=1783993730","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa625159afb35885972c51a82c5a2bf12e86f6c0_83c69f46-71af-4712-b7b9-90612d0ed0a1.webp?v=1783993732","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84288c5144356972938d646e5d6f58a24c7abfa9_d4b7080f-39da-4ef3-91f5-f8bb2cbaa282.webp?v=1783993734","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c377d93785e14a785cabb9c7cd5ee5869b91133d_2eb84f26-8e34-44d8-9423-9b95b7ce8b83.webp?v=1783993736","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af4af1aa94be4f7f49b64d24fd39b3abb72f7ac_aa42a761-4b52-4ff4-b876-e809c2bd5d9a.webp?v=1783993738","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b1e2901976ee78729af8afd0b71f3a7a8b7afbe_5cdacc02-c889-49c9-95ca-aabe4c2fd77c.webp?v=1783993740"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6d45c0e24a1afe6105990ecfec0fe97646766bc.webp?v=1776649502","options":["color"],"media":[{"alt":null,"id":27200623345763,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6d45c0e24a1afe6105990ecfec0fe97646766bc.webp?v=1776649502"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6d45c0e24a1afe6105990ecfec0fe97646766bc.webp?v=1776649502","width":2000},{"alt":null,"id":27200623771747,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c377d93785e14a785cabb9c7cd5ee5869b91133d.webp?v=1776649503"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c377d93785e14a785cabb9c7cd5ee5869b91133d.webp?v=1776649503","width":2000},{"alt":null,"id":27200624492643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fa27d90793ab41219b346fc4375c558cdcd0d90.webp?v=1776649503"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fa27d90793ab41219b346fc4375c558cdcd0d90.webp?v=1776649503","width":2000},{"alt":null,"id":27200625213539,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af4af1aa94be4f7f49b64d24fd39b3abb72f7ac.webp?v=1776649505"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af4af1aa94be4f7f49b64d24fd39b3abb72f7ac.webp?v=1776649505","width":2000},{"alt":null,"id":27200625770595,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84288c5144356972938d646e5d6f58a24c7abfa9.webp?v=1776649505"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84288c5144356972938d646e5d6f58a24c7abfa9.webp?v=1776649505","width":2000},{"alt":null,"id":27200626327651,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa625159afb35885972c51a82c5a2bf12e86f6c0.webp?v=1776649506"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa625159afb35885972c51a82c5a2bf12e86f6c0.webp?v=1776649506","width":2000},{"alt":null,"id":27200626753635,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b1e2901976ee78729af8afd0b71f3a7a8b7afbe.webp?v=1776649506"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b1e2901976ee78729af8afd0b71f3a7a8b7afbe.webp?v=1776649506","width":2000},{"alt":null,"id":27200627605603,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0057613f70b39b0ee42ce3276a11b04959cf8052.webp?v=1776649507"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0057613f70b39b0ee42ce3276a11b04959cf8052.webp?v=1776649507","width":2000},{"alt":null,"id":27758729527395,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6d45c0e24a1afe6105990ecfec0fe97646766bc_8fdf598c-2157-4376-ad13-6515f9495a23.webp?v=1783993730"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6d45c0e24a1afe6105990ecfec0fe97646766bc_8fdf598c-2157-4376-ad13-6515f9495a23.webp?v=1783993730","width":2000},{"alt":null,"id":27758730510435,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa625159afb35885972c51a82c5a2bf12e86f6c0_83c69f46-71af-4712-b7b9-90612d0ed0a1.webp?v=1783993732"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa625159afb35885972c51a82c5a2bf12e86f6c0_83c69f46-71af-4712-b7b9-90612d0ed0a1.webp?v=1783993732","width":2000},{"alt":null,"id":27758731493475,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84288c5144356972938d646e5d6f58a24c7abfa9_d4b7080f-39da-4ef3-91f5-f8bb2cbaa282.webp?v=1783993734"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84288c5144356972938d646e5d6f58a24c7abfa9_d4b7080f-39da-4ef3-91f5-f8bb2cbaa282.webp?v=1783993734","width":2000},{"alt":null,"id":27758732509283,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c377d93785e14a785cabb9c7cd5ee5869b91133d_2eb84f26-8e34-44d8-9423-9b95b7ce8b83.webp?v=1783993736"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c377d93785e14a785cabb9c7cd5ee5869b91133d_2eb84f26-8e34-44d8-9423-9b95b7ce8b83.webp?v=1783993736","width":2000},{"alt":null,"id":27758733295715,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af4af1aa94be4f7f49b64d24fd39b3abb72f7ac_aa42a761-4b52-4ff4-b876-e809c2bd5d9a.webp?v=1783993738"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af4af1aa94be4f7f49b64d24fd39b3abb72f7ac_aa42a761-4b52-4ff4-b876-e809c2bd5d9a.webp?v=1783993738","width":2000},{"alt":null,"id":27758733951075,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b1e2901976ee78729af8afd0b71f3a7a8b7afbe_5cdacc02-c889-49c9-95ca-aabe4c2fd77c.webp?v=1783993740"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b1e2901976ee78729af8afd0b71f3a7a8b7afbe_5cdacc02-c889-49c9-95ca-aabe4c2fd77c.webp?v=1783993740","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":44126037966947,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-XK36","requires_shipping":true,"taxable":true,"featured_image":{"id":36254616551523,"product_id":7998334238819,"position":11,"created_at":"2026-07-14T09:48:52+08:00","updated_at":"2026-07-14T09:48:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84288c5144356972938d646e5d6f58a24c7abfa9_d4b7080f-39da-4ef3-91f5-f8bb2cbaa282.webp?v=1783993734","variant_ids":[44126037966947]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 NASA Space Food Bag - Vacuum Sealed - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-XK36","featured_media":{"alt":null,"id":27758731493475,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84288c5144356972938d646e5d6f58a24c7abfa9_d4b7080f-39da-4ef3-91f5-f8bb2cbaa282.webp?v=1783993734"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44126045962339,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-XK36","requires_shipping":true,"taxable":true,"featured_image":{"id":36254615535715,"product_id":7998334238819,"position":10,"created_at":"2026-07-14T09:48:50+08:00","updated_at":"2026-07-14T09:48:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa625159afb35885972c51a82c5a2bf12e86f6c0_83c69f46-71af-4712-b7b9-90612d0ed0a1.webp?v=1783993732","variant_ids":[44126045962339]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 NASA Space Food Bag - Vacuum Sealed - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-XK36","featured_media":{"alt":null,"id":27758730510435,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa625159afb35885972c51a82c5a2bf12e86f6c0_83c69f46-71af-4712-b7b9-90612d0ed0a1.webp?v=1783993732"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44126048747619,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-XK36","requires_shipping":true,"taxable":true,"featured_image":{"id":36254618353763,"product_id":7998334238819,"position":13,"created_at":"2026-07-14T09:48:56+08:00","updated_at":"2026-07-14T09:48:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af4af1aa94be4f7f49b64d24fd39b3abb72f7ac_aa42a761-4b52-4ff4-b876-e809c2bd5d9a.webp?v=1783993738","variant_ids":[44126048747619]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 NASA Space Food Bag - Vacuum Sealed - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-XK36","featured_media":{"alt":null,"id":27758733295715,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af4af1aa94be4f7f49b64d24fd39b3abb72f7ac_aa42a761-4b52-4ff4-b876-e809c2bd5d9a.webp?v=1783993738"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":44126037966947,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-XK36","requires_shipping":true,"taxable":true,"featured_image":{"id":36254616551523,"product_id":7998334238819,"position":11,"created_at":"2026-07-14T09:48:52+08:00","updated_at":"2026-07-14T09:48:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84288c5144356972938d646e5d6f58a24c7abfa9_d4b7080f-39da-4ef3-91f5-f8bb2cbaa282.webp?v=1783993734","variant_ids":[44126037966947]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 NASA Space Food Bag - Vacuum Sealed - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-XK36","featured_media":{"alt":null,"id":27758731493475,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84288c5144356972938d646e5d6f58a24c7abfa9_d4b7080f-39da-4ef3-91f5-f8bb2cbaa282.webp?v=1783993734"}},"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: "停產"
}