$product = {"id":7413988360291,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士","handle":"iphone-13-mini-mod-nx-magsafe-printable-pb109","description":null,"published_at":"2024-06-11T17:47:00+08:00","created_at":"2024-05-05T13:56:14+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 13 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41903036792931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31484399222883,"product_id":7413988360291,"position":3,"created_at":"2024-05-05T13:56:21+08:00","updated_at":"2024-05-05T13:56:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e439ac51a2fd6a269a41db8bfc563fc0d4bda9d6_21c90985-8289-49dc-8bc6-bbe883dd5cea.webp?v=1714888581","variant_ids":[41903036792931]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-PB109","featured_media":{"alt":null,"id":23889693180003,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e439ac51a2fd6a269a41db8bfc563fc0d4bda9d6_21c90985-8289-49dc-8bc6-bbe883dd5cea.webp?v=1714888581"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41903036924003,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31484398764131,"product_id":7413988360291,"position":2,"created_at":"2024-05-05T13:56:19+08:00","updated_at":"2024-05-05T13:56:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe72d01d0c356ecc556d8c6957dad48a58860907_7308020f-6b3e-47d4-9061-238a050bf6c5.webp?v=1714888579","variant_ids":[41903036924003]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122804-PB109","featured_media":{"alt":null,"id":23889692688483,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe72d01d0c356ecc556d8c6957dad48a58860907_7308020f-6b3e-47d4-9061-238a050bf6c5.webp?v=1714888579"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41903037382755,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31484400205923,"product_id":7413988360291,"position":5,"created_at":"2024-05-05T13:56:26+08:00","updated_at":"2024-05-05T13:56:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c4f1124b871c6997fb2ced075d0e29885eaaa9_2ab730e6-87bf-40cc-8baa-a4fdfb39c61a.webp?v=1714888586","variant_ids":[41903037382755]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01228J5-PB109","featured_media":{"alt":null,"id":23889694163043,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c4f1124b871c6997fb2ced075d0e29885eaaa9_2ab730e6-87bf-40cc-8baa-a4fdfb39c61a.webp?v=1714888586"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82c037487dcb3ac80f37ccb60671c46ecad1040_72843db2-6f17-4ac8-b9db-fbbf50c97129.webp?v=1714888576","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe72d01d0c356ecc556d8c6957dad48a58860907_7308020f-6b3e-47d4-9061-238a050bf6c5.webp?v=1714888579","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e439ac51a2fd6a269a41db8bfc563fc0d4bda9d6_21c90985-8289-49dc-8bc6-bbe883dd5cea.webp?v=1714888581","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eea071e13e1af09c94f3491723618c5e103ebfa7_b2d2c254-7499-4993-98db-bc6f137e2c13.webp?v=1714888584","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c4f1124b871c6997fb2ced075d0e29885eaaa9_2ab730e6-87bf-40cc-8baa-a4fdfb39c61a.webp?v=1714888586","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ae316bceab04de6bf7bf62c148330acfeb7853c_1861169b-455f-4928-a098-2da74a24e0a9.webp?v=1714888588","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2dea40d66160fedda8c8029223c3269ea2d22bf9_b8a47502-5b50-4743-b56e-9aed98b38ea9.webp?v=1714888590","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b2791b3bb838576117d5a228b71b9d0c520bf80_ed7282c9-69f1-46b6-b34e-4b5d9450e1bb.webp?v=1714888592","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/160dbbbee1b69d3ebd5df61bcc6476758e032df1_c8e5d621-6377-4e33-a0bb-5e5889c40914.webp?v=1714888595","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca0edbe78aaa1f16d4671e48bcb5ec736793d0f6_82e7e9f0-0d1f-494b-b1bf-9361eed6986f.webp?v=1714888597"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82c037487dcb3ac80f37ccb60671c46ecad1040_72843db2-6f17-4ac8-b9db-fbbf50c97129.webp?v=1714888576","options":["color"],"media":[{"alt":null,"id":23889692229731,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82c037487dcb3ac80f37ccb60671c46ecad1040_72843db2-6f17-4ac8-b9db-fbbf50c97129.webp?v=1714888576"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82c037487dcb3ac80f37ccb60671c46ecad1040_72843db2-6f17-4ac8-b9db-fbbf50c97129.webp?v=1714888576","width":2000},{"alt":null,"id":23889692688483,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe72d01d0c356ecc556d8c6957dad48a58860907_7308020f-6b3e-47d4-9061-238a050bf6c5.webp?v=1714888579"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe72d01d0c356ecc556d8c6957dad48a58860907_7308020f-6b3e-47d4-9061-238a050bf6c5.webp?v=1714888579","width":2000},{"alt":null,"id":23889693180003,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e439ac51a2fd6a269a41db8bfc563fc0d4bda9d6_21c90985-8289-49dc-8bc6-bbe883dd5cea.webp?v=1714888581"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e439ac51a2fd6a269a41db8bfc563fc0d4bda9d6_21c90985-8289-49dc-8bc6-bbe883dd5cea.webp?v=1714888581","width":2000},{"alt":null,"id":23889693638755,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eea071e13e1af09c94f3491723618c5e103ebfa7_b2d2c254-7499-4993-98db-bc6f137e2c13.webp?v=1714888584"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eea071e13e1af09c94f3491723618c5e103ebfa7_b2d2c254-7499-4993-98db-bc6f137e2c13.webp?v=1714888584","width":2000},{"alt":null,"id":23889694163043,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c4f1124b871c6997fb2ced075d0e29885eaaa9_2ab730e6-87bf-40cc-8baa-a4fdfb39c61a.webp?v=1714888586"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c4f1124b871c6997fb2ced075d0e29885eaaa9_2ab730e6-87bf-40cc-8baa-a4fdfb39c61a.webp?v=1714888586","width":2000},{"alt":null,"id":23889694621795,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ae316bceab04de6bf7bf62c148330acfeb7853c_1861169b-455f-4928-a098-2da74a24e0a9.webp?v=1714888588"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ae316bceab04de6bf7bf62c148330acfeb7853c_1861169b-455f-4928-a098-2da74a24e0a9.webp?v=1714888588","width":2000},{"alt":null,"id":23889695178851,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2dea40d66160fedda8c8029223c3269ea2d22bf9_b8a47502-5b50-4743-b56e-9aed98b38ea9.webp?v=1714888590"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2dea40d66160fedda8c8029223c3269ea2d22bf9_b8a47502-5b50-4743-b56e-9aed98b38ea9.webp?v=1714888590","width":2000},{"alt":null,"id":23889695506531,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b2791b3bb838576117d5a228b71b9d0c520bf80_ed7282c9-69f1-46b6-b34e-4b5d9450e1bb.webp?v=1714888592"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b2791b3bb838576117d5a228b71b9d0c520bf80_ed7282c9-69f1-46b6-b34e-4b5d9450e1bb.webp?v=1714888592","width":2000},{"alt":null,"id":23889696030819,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/160dbbbee1b69d3ebd5df61bcc6476758e032df1_c8e5d621-6377-4e33-a0bb-5e5889c40914.webp?v=1714888595"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/160dbbbee1b69d3ebd5df61bcc6476758e032df1_c8e5d621-6377-4e33-a0bb-5e5889c40914.webp?v=1714888595","width":2000},{"alt":null,"id":23889696424035,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca0edbe78aaa1f16d4671e48bcb5ec736793d0f6_82e7e9f0-0d1f-494b-b1bf-9361eed6986f.webp?v=1714888597"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca0edbe78aaa1f16d4671e48bcb5ec736793d0f6_82e7e9f0-0d1f-494b-b1bf-9361eed6986f.webp?v=1714888597","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41903036792931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31484399222883,"product_id":7413988360291,"position":3,"created_at":"2024-05-05T13:56:21+08:00","updated_at":"2024-05-05T13:56:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e439ac51a2fd6a269a41db8bfc563fc0d4bda9d6_21c90985-8289-49dc-8bc6-bbe883dd5cea.webp?v=1714888581","variant_ids":[41903036792931]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-PB109","featured_media":{"alt":null,"id":23889693180003,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e439ac51a2fd6a269a41db8bfc563fc0d4bda9d6_21c90985-8289-49dc-8bc6-bbe883dd5cea.webp?v=1714888581"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41903036924003,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31484398764131,"product_id":7413988360291,"position":2,"created_at":"2024-05-05T13:56:19+08:00","updated_at":"2024-05-05T13:56:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe72d01d0c356ecc556d8c6957dad48a58860907_7308020f-6b3e-47d4-9061-238a050bf6c5.webp?v=1714888579","variant_ids":[41903036924003]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122804-PB109","featured_media":{"alt":null,"id":23889692688483,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe72d01d0c356ecc556d8c6957dad48a58860907_7308020f-6b3e-47d4-9061-238a050bf6c5.webp?v=1714888579"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41903037382755,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31484400205923,"product_id":7413988360291,"position":5,"created_at":"2024-05-05T13:56:26+08:00","updated_at":"2024-05-05T13:56:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c4f1124b871c6997fb2ced075d0e29885eaaa9_2ab730e6-87bf-40cc-8baa-a4fdfb39c61a.webp?v=1714888586","variant_ids":[41903037382755]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01228J5-PB109","featured_media":{"alt":null,"id":23889694163043,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c4f1124b871c6997fb2ced075d0e29885eaaa9_2ab730e6-87bf-40cc-8baa-a4fdfb39c61a.webp?v=1714888586"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41903036792931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31484399222883,"product_id":7413988360291,"position":3,"created_at":"2024-05-05T13:56:21+08:00","updated_at":"2024-05-05T13:56:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e439ac51a2fd6a269a41db8bfc563fc0d4bda9d6_21c90985-8289-49dc-8bc6-bbe883dd5cea.webp?v=1714888581","variant_ids":[41903036792931]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-PB109","featured_media":{"alt":null,"id":23889693180003,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e439ac51a2fd6a269a41db8bfc563fc0d4bda9d6_21c90985-8289-49dc-8bc6-bbe883dd5cea.webp?v=1714888581"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null
var sellingStatus
if ($bumper) {
$(document).ready(function() {
var productImg = $product.images[0]
var bumperVariants = $bumper.variants;
var bumperColors = new Object();
var currentVariant = '';
var productType = '';
bumperVariants.forEach(variant => {
bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src;
});
if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') {
mergeImages(
[productImg, bumperColors[currentVariant]],
{ crossOrigin: 'anonymous' }
).then(mergedImg => {
$('.merged-img').attr('src', mergedImg);
});
} else {
mergeImages(
[bumperColors[currentVariant], productImg],
{ crossOrigin: 'anonymous' }
).then(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: "停產"
}