$product = {"id":7414140272739,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列","handle":"iphone-13-mini-mod-nx-magsafe-printable-pb44","description":null,"published_at":"2024-06-11T17:49:22+08:00","created_at":"2024-05-05T14:12:38+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":41904392700003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31484766158947,"product_id":7414140272739,"position":4,"created_at":"2024-05-05T14:12:47+08:00","updated_at":"2024-05-05T14:12:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df36bd8b347cd0357b9fc075589d5426eea8a86c_d088452b-045e-44df-87f8-83ea3e353fd6.webp?v=1714889567","variant_ids":[41904392700003]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - 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-PB44","featured_media":{"alt":null,"id":23890061688931,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df36bd8b347cd0357b9fc075589d5426eea8a86c_d088452b-045e-44df-87f8-83ea3e353fd6.webp?v=1714889567"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41904392765539,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31484764192867,"product_id":7414140272739,"position":3,"created_at":"2024-05-05T14:12:45+08:00","updated_at":"2024-05-05T14:12:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/833f41d666812ec6d04932e9fbb5d95cec8a83bb_be4da695-ce76-4f0d-a264-e9abbad76b0b.webp?v=1714889565","variant_ids":[41904392765539]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - 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-PB44","featured_media":{"alt":null,"id":23890059886691,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/833f41d666812ec6d04932e9fbb5d95cec8a83bb_be4da695-ce76-4f0d-a264-e9abbad76b0b.webp?v=1714889565"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41904393027683,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31484772352099,"product_id":7414140272739,"position":8,"created_at":"2024-05-05T14:12:56+08:00","updated_at":"2024-05-05T14:12:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af94d68d7366e6548c383e54970d569811b5b401_366b42dd-7cb8-4449-95b8-ed0e289a2179.webp?v=1714889576","variant_ids":[41904393027683]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - 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-PB44","featured_media":{"alt":null,"id":23890067783779,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af94d68d7366e6548c383e54970d569811b5b401_366b42dd-7cb8-4449-95b8-ed0e289a2179.webp?v=1714889576"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b502134552842a7be377bbc96b662b6a2043ab33_8b254110-e572-4ef2-a72f-d52a83af58fa.webp?v=1714889560","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acc4e4bd0d7da1ed50d7f090c2b1c2d944a1cf4e_11e04de7-d676-40c3-b013-00e5d7b54c9e.webp?v=1714889562","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/833f41d666812ec6d04932e9fbb5d95cec8a83bb_be4da695-ce76-4f0d-a264-e9abbad76b0b.webp?v=1714889565","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df36bd8b347cd0357b9fc075589d5426eea8a86c_d088452b-045e-44df-87f8-83ea3e353fd6.webp?v=1714889567","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c431a2758c09ad5f78404cd3edcca0c1758c775_b1ad4716-3323-43a4-be99-3c2e83b21a5f.webp?v=1714889569","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca635e18809c9bf2da40c5f38f9e1917aaac6ed2_8849d6c9-805e-497a-96fb-f49b9643c11a.webp?v=1714889571","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce5f07407f25c93dafc4da8fc6927abee60bdf7b_472c74b9-c68e-4bbf-ae5c-525cf15cf480.webp?v=1714889574","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af94d68d7366e6548c383e54970d569811b5b401_366b42dd-7cb8-4449-95b8-ed0e289a2179.webp?v=1714889576","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda9dd8ca0d02bc9c837b41631e0fa3c35bf8953_6029ecc0-82f3-4a37-8607-6566277c503a.webp?v=1714889578","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83f99b077f2ea13e87e40628f8bd07e05d8051f3_da7e0bc6-b3c3-4b24-9f6f-1a0534f75bb6.webp?v=1714889581"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b502134552842a7be377bbc96b662b6a2043ab33_8b254110-e572-4ef2-a72f-d52a83af58fa.webp?v=1714889560","options":["color"],"media":[{"alt":null,"id":23890056347747,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b502134552842a7be377bbc96b662b6a2043ab33_8b254110-e572-4ef2-a72f-d52a83af58fa.webp?v=1714889560"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b502134552842a7be377bbc96b662b6a2043ab33_8b254110-e572-4ef2-a72f-d52a83af58fa.webp?v=1714889560","width":2000},{"alt":null,"id":23890057855075,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acc4e4bd0d7da1ed50d7f090c2b1c2d944a1cf4e_11e04de7-d676-40c3-b013-00e5d7b54c9e.webp?v=1714889562"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acc4e4bd0d7da1ed50d7f090c2b1c2d944a1cf4e_11e04de7-d676-40c3-b013-00e5d7b54c9e.webp?v=1714889562","width":2000},{"alt":null,"id":23890059886691,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/833f41d666812ec6d04932e9fbb5d95cec8a83bb_be4da695-ce76-4f0d-a264-e9abbad76b0b.webp?v=1714889565"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/833f41d666812ec6d04932e9fbb5d95cec8a83bb_be4da695-ce76-4f0d-a264-e9abbad76b0b.webp?v=1714889565","width":2000},{"alt":null,"id":23890061688931,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df36bd8b347cd0357b9fc075589d5426eea8a86c_d088452b-045e-44df-87f8-83ea3e353fd6.webp?v=1714889567"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df36bd8b347cd0357b9fc075589d5426eea8a86c_d088452b-045e-44df-87f8-83ea3e353fd6.webp?v=1714889567","width":2000},{"alt":null,"id":23890063458403,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c431a2758c09ad5f78404cd3edcca0c1758c775_b1ad4716-3323-43a4-be99-3c2e83b21a5f.webp?v=1714889569"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c431a2758c09ad5f78404cd3edcca0c1758c775_b1ad4716-3323-43a4-be99-3c2e83b21a5f.webp?v=1714889569","width":2000},{"alt":null,"id":23890064867427,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca635e18809c9bf2da40c5f38f9e1917aaac6ed2_8849d6c9-805e-497a-96fb-f49b9643c11a.webp?v=1714889571"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca635e18809c9bf2da40c5f38f9e1917aaac6ed2_8849d6c9-805e-497a-96fb-f49b9643c11a.webp?v=1714889571","width":2000},{"alt":null,"id":23890066178147,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce5f07407f25c93dafc4da8fc6927abee60bdf7b_472c74b9-c68e-4bbf-ae5c-525cf15cf480.webp?v=1714889574"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce5f07407f25c93dafc4da8fc6927abee60bdf7b_472c74b9-c68e-4bbf-ae5c-525cf15cf480.webp?v=1714889574","width":2000},{"alt":null,"id":23890067783779,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af94d68d7366e6548c383e54970d569811b5b401_366b42dd-7cb8-4449-95b8-ed0e289a2179.webp?v=1714889576"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af94d68d7366e6548c383e54970d569811b5b401_366b42dd-7cb8-4449-95b8-ed0e289a2179.webp?v=1714889576","width":2000},{"alt":null,"id":23890069094499,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda9dd8ca0d02bc9c837b41631e0fa3c35bf8953_6029ecc0-82f3-4a37-8607-6566277c503a.webp?v=1714889578"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda9dd8ca0d02bc9c837b41631e0fa3c35bf8953_6029ecc0-82f3-4a37-8607-6566277c503a.webp?v=1714889578","width":2000},{"alt":null,"id":23890070732899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83f99b077f2ea13e87e40628f8bd07e05d8051f3_da7e0bc6-b3c3-4b24-9f6f-1a0534f75bb6.webp?v=1714889581"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83f99b077f2ea13e87e40628f8bd07e05d8051f3_da7e0bc6-b3c3-4b24-9f6f-1a0534f75bb6.webp?v=1714889581","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41904392700003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31484766158947,"product_id":7414140272739,"position":4,"created_at":"2024-05-05T14:12:47+08:00","updated_at":"2024-05-05T14:12:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df36bd8b347cd0357b9fc075589d5426eea8a86c_d088452b-045e-44df-87f8-83ea3e353fd6.webp?v=1714889567","variant_ids":[41904392700003]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - 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-PB44","featured_media":{"alt":null,"id":23890061688931,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df36bd8b347cd0357b9fc075589d5426eea8a86c_d088452b-045e-44df-87f8-83ea3e353fd6.webp?v=1714889567"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41904392765539,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31484764192867,"product_id":7414140272739,"position":3,"created_at":"2024-05-05T14:12:45+08:00","updated_at":"2024-05-05T14:12:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/833f41d666812ec6d04932e9fbb5d95cec8a83bb_be4da695-ce76-4f0d-a264-e9abbad76b0b.webp?v=1714889565","variant_ids":[41904392765539]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - 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-PB44","featured_media":{"alt":null,"id":23890059886691,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/833f41d666812ec6d04932e9fbb5d95cec8a83bb_be4da695-ce76-4f0d-a264-e9abbad76b0b.webp?v=1714889565"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41904393027683,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31484772352099,"product_id":7414140272739,"position":8,"created_at":"2024-05-05T14:12:56+08:00","updated_at":"2024-05-05T14:12:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af94d68d7366e6548c383e54970d569811b5b401_366b42dd-7cb8-4449-95b8-ed0e289a2179.webp?v=1714889576","variant_ids":[41904393027683]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - 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-PB44","featured_media":{"alt":null,"id":23890067783779,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af94d68d7366e6548c383e54970d569811b5b401_366b42dd-7cb8-4449-95b8-ed0e289a2179.webp?v=1714889576"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41904392700003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31484766158947,"product_id":7414140272739,"position":4,"created_at":"2024-05-05T14:12:47+08:00","updated_at":"2024-05-05T14:12:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df36bd8b347cd0357b9fc075589d5426eea8a86c_d088452b-045e-44df-87f8-83ea3e353fd6.webp?v=1714889567","variant_ids":[41904392700003]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - 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-PB44","featured_media":{"alt":null,"id":23890061688931,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df36bd8b347cd0357b9fc075589d5426eea8a86c_d088452b-045e-44df-87f8-83ea3e353fd6.webp?v=1714889567"}},"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: "停產"
}