$product = {"id":7407797698659,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列","handle":"iphone-14-pro-mod-nx-printable-pb98","description":null,"published_at":"2024-06-11T16:23:19+08:00","created_at":"2024-05-03T10:52:40+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Pro","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41878967844963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126224-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31470403125347,"product_id":7407797698659,"position":10,"created_at":"2024-05-03T10:53:06+08:00","updated_at":"2024-05-03T10:53:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e74f5938e0cbba20fa825bae15a1682ec6fac5f_ba63977c-6a14-482a-8f4c-792e7aa597f6.webp?v=1714704786","variant_ids":[41878967844963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126224-PB98","featured_media":{"alt":null,"id":23875306389603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e74f5938e0cbba20fa825bae15a1682ec6fac5f_ba63977c-6a14-482a-8f4c-792e7aa597f6.webp?v=1714704786"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41878967910499,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"NPB0126204-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31470399160419,"product_id":7407797698659,"position":4,"created_at":"2024-05-03T10:52:51+08:00","updated_at":"2024-05-03T10:52:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d0b6559282c41c3cad56f200e9176da731ca829_7f76425a-737f-4374-8d96-5beb5f61246c.webp?v=1714704771","variant_ids":[41878967910499]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126204-PB98","featured_media":{"alt":null,"id":23875302424675,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d0b6559282c41c3cad56f200e9176da731ca829_7f76425a-737f-4374-8d96-5beb5f61246c.webp?v=1714704771"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41878968303715,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"NPB01262J5-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31470397063267,"product_id":7407797698659,"position":1,"created_at":"2024-05-03T10:52:43+08:00","updated_at":"2024-05-03T10:52:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb649d349e3d7cd0c1bb6c01db5d923c26f35d57_9a17f685-5b64-4017-b032-ca482f2834dc.webp?v=1714704763","variant_ids":[41878968303715]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01262J5-PB98","featured_media":{"alt":null,"id":23875300261987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb649d349e3d7cd0c1bb6c01db5d923c26f35d57_9a17f685-5b64-4017-b032-ca482f2834dc.webp?v=1714704763"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb649d349e3d7cd0c1bb6c01db5d923c26f35d57_9a17f685-5b64-4017-b032-ca482f2834dc.webp?v=1714704763","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5dd595463929620070bf5ebf5431f3605224974_e220e0cd-76ac-4596-a50b-e09f618ae35f.webp?v=1714704766","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b5724751ae6e61756f79321174611550a05a384_f1b8a070-2e73-4e03-bddc-ae25ecca6acd.webp?v=1714704768","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d0b6559282c41c3cad56f200e9176da731ca829_7f76425a-737f-4374-8d96-5beb5f61246c.webp?v=1714704771","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3331985b4ba593635dc8c5390d7e268572070c04_ecd63c1e-56d1-46aa-b3b7-dc675f6f0e5a.webp?v=1714704774","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0664a580679799dd8415186fcd22bc2588ce0155_9e6143c5-21aa-4a0e-8b6e-9e53552d1e8e.webp?v=1714704776","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7ba14bd9b861bbb109be84d81cc9d317f61ac50_b92a5a99-aaa5-43b7-9010-9f2c70cc16e5.webp?v=1714704779","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8aa3b87acf33b4bd4bcd2d12aeed12a6b236156_31e65669-17b6-4168-a1d6-f99c948fd8de.webp?v=1714704781","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb3ee8ba97bf81f4f9dcdb50ec3f6c4d78a5a86e_0451b94a-8ee9-4ef8-9fd2-4db80ccddbad.webp?v=1714704784","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e74f5938e0cbba20fa825bae15a1682ec6fac5f_ba63977c-6a14-482a-8f4c-792e7aa597f6.webp?v=1714704786"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb649d349e3d7cd0c1bb6c01db5d923c26f35d57_9a17f685-5b64-4017-b032-ca482f2834dc.webp?v=1714704763","options":["color"],"media":[{"alt":null,"id":23875300261987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb649d349e3d7cd0c1bb6c01db5d923c26f35d57_9a17f685-5b64-4017-b032-ca482f2834dc.webp?v=1714704763"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb649d349e3d7cd0c1bb6c01db5d923c26f35d57_9a17f685-5b64-4017-b032-ca482f2834dc.webp?v=1714704763","width":2000},{"alt":null,"id":23875301015651,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5dd595463929620070bf5ebf5431f3605224974_e220e0cd-76ac-4596-a50b-e09f618ae35f.webp?v=1714704766"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5dd595463929620070bf5ebf5431f3605224974_e220e0cd-76ac-4596-a50b-e09f618ae35f.webp?v=1714704766","width":2000},{"alt":null,"id":23875301736547,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b5724751ae6e61756f79321174611550a05a384_f1b8a070-2e73-4e03-bddc-ae25ecca6acd.webp?v=1714704768"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b5724751ae6e61756f79321174611550a05a384_f1b8a070-2e73-4e03-bddc-ae25ecca6acd.webp?v=1714704768","width":2000},{"alt":null,"id":23875302424675,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d0b6559282c41c3cad56f200e9176da731ca829_7f76425a-737f-4374-8d96-5beb5f61246c.webp?v=1714704771"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d0b6559282c41c3cad56f200e9176da731ca829_7f76425a-737f-4374-8d96-5beb5f61246c.webp?v=1714704771","width":2000},{"alt":null,"id":23875302981731,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3331985b4ba593635dc8c5390d7e268572070c04_ecd63c1e-56d1-46aa-b3b7-dc675f6f0e5a.webp?v=1714704774"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3331985b4ba593635dc8c5390d7e268572070c04_ecd63c1e-56d1-46aa-b3b7-dc675f6f0e5a.webp?v=1714704774","width":2000},{"alt":null,"id":23875303735395,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0664a580679799dd8415186fcd22bc2588ce0155_9e6143c5-21aa-4a0e-8b6e-9e53552d1e8e.webp?v=1714704776"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0664a580679799dd8415186fcd22bc2588ce0155_9e6143c5-21aa-4a0e-8b6e-9e53552d1e8e.webp?v=1714704776","width":2000},{"alt":null,"id":23875304456291,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7ba14bd9b861bbb109be84d81cc9d317f61ac50_b92a5a99-aaa5-43b7-9010-9f2c70cc16e5.webp?v=1714704779"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7ba14bd9b861bbb109be84d81cc9d317f61ac50_b92a5a99-aaa5-43b7-9010-9f2c70cc16e5.webp?v=1714704779","width":2000},{"alt":null,"id":23875304915043,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8aa3b87acf33b4bd4bcd2d12aeed12a6b236156_31e65669-17b6-4168-a1d6-f99c948fd8de.webp?v=1714704781"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8aa3b87acf33b4bd4bcd2d12aeed12a6b236156_31e65669-17b6-4168-a1d6-f99c948fd8de.webp?v=1714704781","width":2000},{"alt":null,"id":23875305570403,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb3ee8ba97bf81f4f9dcdb50ec3f6c4d78a5a86e_0451b94a-8ee9-4ef8-9fd2-4db80ccddbad.webp?v=1714704784"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb3ee8ba97bf81f4f9dcdb50ec3f6c4d78a5a86e_0451b94a-8ee9-4ef8-9fd2-4db80ccddbad.webp?v=1714704784","width":2000},{"alt":null,"id":23875306389603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e74f5938e0cbba20fa825bae15a1682ec6fac5f_ba63977c-6a14-482a-8f4c-792e7aa597f6.webp?v=1714704786"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e74f5938e0cbba20fa825bae15a1682ec6fac5f_ba63977c-6a14-482a-8f4c-792e7aa597f6.webp?v=1714704786","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41878967844963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126224-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31470403125347,"product_id":7407797698659,"position":10,"created_at":"2024-05-03T10:53:06+08:00","updated_at":"2024-05-03T10:53:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e74f5938e0cbba20fa825bae15a1682ec6fac5f_ba63977c-6a14-482a-8f4c-792e7aa597f6.webp?v=1714704786","variant_ids":[41878967844963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126224-PB98","featured_media":{"alt":null,"id":23875306389603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e74f5938e0cbba20fa825bae15a1682ec6fac5f_ba63977c-6a14-482a-8f4c-792e7aa597f6.webp?v=1714704786"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41878967910499,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"NPB0126204-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31470399160419,"product_id":7407797698659,"position":4,"created_at":"2024-05-03T10:52:51+08:00","updated_at":"2024-05-03T10:52:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d0b6559282c41c3cad56f200e9176da731ca829_7f76425a-737f-4374-8d96-5beb5f61246c.webp?v=1714704771","variant_ids":[41878967910499]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126204-PB98","featured_media":{"alt":null,"id":23875302424675,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d0b6559282c41c3cad56f200e9176da731ca829_7f76425a-737f-4374-8d96-5beb5f61246c.webp?v=1714704771"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41878968303715,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"NPB01262J5-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31470397063267,"product_id":7407797698659,"position":1,"created_at":"2024-05-03T10:52:43+08:00","updated_at":"2024-05-03T10:52:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb649d349e3d7cd0c1bb6c01db5d923c26f35d57_9a17f685-5b64-4017-b032-ca482f2834dc.webp?v=1714704763","variant_ids":[41878968303715]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01262J5-PB98","featured_media":{"alt":null,"id":23875300261987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb649d349e3d7cd0c1bb6c01db5d923c26f35d57_9a17f685-5b64-4017-b032-ca482f2834dc.webp?v=1714704763"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41878967844963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126224-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31470403125347,"product_id":7407797698659,"position":10,"created_at":"2024-05-03T10:53:06+08:00","updated_at":"2024-05-03T10:53:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e74f5938e0cbba20fa825bae15a1682ec6fac5f_ba63977c-6a14-482a-8f4c-792e7aa597f6.webp?v=1714704786","variant_ids":[41878967844963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126224-PB98","featured_media":{"alt":null,"id":23875306389603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e74f5938e0cbba20fa825bae15a1682ec6fac5f_ba63977c-6a14-482a-8f4c-792e7aa597f6.webp?v=1714704786"}},"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: "停產"
}