$product = {"id":7411380715619,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 天行者路克-復古系列","handle":"iphone-14-pro-mod-nx-magsafe-printable-pb97","description":null,"published_at":"2024-06-11T17:43:24+08:00","created_at":"2024-05-05T00:18:41+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 14 Pro","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":41898159636579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB97","requires_shipping":true,"taxable":true,"featured_image":{"id":31480282284131,"product_id":7411380715619,"position":6,"created_at":"2024-05-05T00:18:55+08:00","updated_at":"2024-05-05T00:18:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20c2ce1df56adaa2f5bb172972442e3032367b80_5b248f6c-e928-485c-9760-73ff73443e10.webp?v=1714839535","variant_ids":[41898159636579]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 天行者路克-復古系列 - 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":"MPB0126224-PB97","featured_media":{"alt":null,"id":23885533642851,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20c2ce1df56adaa2f5bb172972442e3032367b80_5b248f6c-e928-485c-9760-73ff73443e10.webp?v=1714839535"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41898159702115,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0126204-PB97","requires_shipping":true,"taxable":true,"featured_image":{"id":31480281890915,"product_id":7411380715619,"position":5,"created_at":"2024-05-05T00:18:53+08:00","updated_at":"2024-05-05T00:18:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10e19c080ccdecc8e769beb8d903829ab9a9581b_c6976734-e4c2-499d-b11b-8cc977cce1be.webp?v=1714839533","variant_ids":[41898159702115]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 天行者路克-復古系列 - 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":"MPB0126204-PB97","featured_media":{"alt":null,"id":23885533249635,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10e19c080ccdecc8e769beb8d903829ab9a9581b_c6976734-e4c2-499d-b11b-8cc977cce1be.webp?v=1714839533"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41898159931491,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01262J5-PB97","requires_shipping":true,"taxable":true,"featured_image":{"id":31480280907875,"product_id":7411380715619,"position":3,"created_at":"2024-05-05T00:18:48+08:00","updated_at":"2024-05-05T00:18:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b376ca2052cd66a100dba6dd71d165e8b88d7e2d_d2bfbd46-81db-42b5-80ad-10bcfdc15a22.webp?v=1714839528","variant_ids":[41898159931491]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 天行者路克-復古系列 - 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":"MPB01262J5-PB97","featured_media":{"alt":null,"id":23885532299363,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b376ca2052cd66a100dba6dd71d165e8b88d7e2d_d2bfbd46-81db-42b5-80ad-10bcfdc15a22.webp?v=1714839528"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47e2ed25ca86b1154c2bdcdabe1db2e6e6cbc0ff_3227a092-bedc-452f-919d-0557e7b86e0c.webp?v=1714839523","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ce2a4b409887ddd3c279c541c8e03b4170b770e_863d0eac-7ce9-492e-87bc-39dc0d1a98a6.webp?v=1714839525","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b376ca2052cd66a100dba6dd71d165e8b88d7e2d_d2bfbd46-81db-42b5-80ad-10bcfdc15a22.webp?v=1714839528","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dea8c738daa39a6cc8d91b6c77e7238e7ed4fa26_8e17fafc-072c-4408-a031-437c043123bd.webp?v=1714839530","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10e19c080ccdecc8e769beb8d903829ab9a9581b_c6976734-e4c2-499d-b11b-8cc977cce1be.webp?v=1714839533","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20c2ce1df56adaa2f5bb172972442e3032367b80_5b248f6c-e928-485c-9760-73ff73443e10.webp?v=1714839535","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0788f6ee42db58824f64cf2c2e2c01c16087eb94_b1f7f901-eb73-456f-9a9c-a0da4d9b1c14.webp?v=1714839537","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c06be3f1ee22367e75527f6630af008a4e9f24fa_df2880dc-f73f-4e41-ad72-885e9ed916d4.webp?v=1714839540","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c44d529cccbe021775bfd1ed1cb43be2a72baa19_efd80687-c3c9-466f-a540-c7db044973d7.webp?v=1714839542","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/204b7ae89032dd370d8357cd39412d0f6d6d3194_5169a815-cc2f-4e9e-8385-4f5d807b15eb.webp?v=1714839544"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47e2ed25ca86b1154c2bdcdabe1db2e6e6cbc0ff_3227a092-bedc-452f-919d-0557e7b86e0c.webp?v=1714839523","options":["color"],"media":[{"alt":null,"id":23885531054179,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47e2ed25ca86b1154c2bdcdabe1db2e6e6cbc0ff_3227a092-bedc-452f-919d-0557e7b86e0c.webp?v=1714839523"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47e2ed25ca86b1154c2bdcdabe1db2e6e6cbc0ff_3227a092-bedc-452f-919d-0557e7b86e0c.webp?v=1714839523","width":2000},{"alt":null,"id":23885531480163,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ce2a4b409887ddd3c279c541c8e03b4170b770e_863d0eac-7ce9-492e-87bc-39dc0d1a98a6.webp?v=1714839525"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ce2a4b409887ddd3c279c541c8e03b4170b770e_863d0eac-7ce9-492e-87bc-39dc0d1a98a6.webp?v=1714839525","width":2000},{"alt":null,"id":23885532299363,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b376ca2052cd66a100dba6dd71d165e8b88d7e2d_d2bfbd46-81db-42b5-80ad-10bcfdc15a22.webp?v=1714839528"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b376ca2052cd66a100dba6dd71d165e8b88d7e2d_d2bfbd46-81db-42b5-80ad-10bcfdc15a22.webp?v=1714839528","width":2000},{"alt":null,"id":23885532692579,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dea8c738daa39a6cc8d91b6c77e7238e7ed4fa26_8e17fafc-072c-4408-a031-437c043123bd.webp?v=1714839530"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dea8c738daa39a6cc8d91b6c77e7238e7ed4fa26_8e17fafc-072c-4408-a031-437c043123bd.webp?v=1714839530","width":2000},{"alt":null,"id":23885533249635,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10e19c080ccdecc8e769beb8d903829ab9a9581b_c6976734-e4c2-499d-b11b-8cc977cce1be.webp?v=1714839533"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10e19c080ccdecc8e769beb8d903829ab9a9581b_c6976734-e4c2-499d-b11b-8cc977cce1be.webp?v=1714839533","width":2000},{"alt":null,"id":23885533642851,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20c2ce1df56adaa2f5bb172972442e3032367b80_5b248f6c-e928-485c-9760-73ff73443e10.webp?v=1714839535"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20c2ce1df56adaa2f5bb172972442e3032367b80_5b248f6c-e928-485c-9760-73ff73443e10.webp?v=1714839535","width":2000},{"alt":null,"id":23885534134371,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0788f6ee42db58824f64cf2c2e2c01c16087eb94_b1f7f901-eb73-456f-9a9c-a0da4d9b1c14.webp?v=1714839537"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0788f6ee42db58824f64cf2c2e2c01c16087eb94_b1f7f901-eb73-456f-9a9c-a0da4d9b1c14.webp?v=1714839537","width":2000},{"alt":null,"id":23885534756963,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c06be3f1ee22367e75527f6630af008a4e9f24fa_df2880dc-f73f-4e41-ad72-885e9ed916d4.webp?v=1714839540"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c06be3f1ee22367e75527f6630af008a4e9f24fa_df2880dc-f73f-4e41-ad72-885e9ed916d4.webp?v=1714839540","width":2000},{"alt":null,"id":23885535346787,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c44d529cccbe021775bfd1ed1cb43be2a72baa19_efd80687-c3c9-466f-a540-c7db044973d7.webp?v=1714839542"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c44d529cccbe021775bfd1ed1cb43be2a72baa19_efd80687-c3c9-466f-a540-c7db044973d7.webp?v=1714839542","width":2000},{"alt":null,"id":23885535805539,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/204b7ae89032dd370d8357cd39412d0f6d6d3194_5169a815-cc2f-4e9e-8385-4f5d807b15eb.webp?v=1714839544"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/204b7ae89032dd370d8357cd39412d0f6d6d3194_5169a815-cc2f-4e9e-8385-4f5d807b15eb.webp?v=1714839544","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41898159636579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB97","requires_shipping":true,"taxable":true,"featured_image":{"id":31480282284131,"product_id":7411380715619,"position":6,"created_at":"2024-05-05T00:18:55+08:00","updated_at":"2024-05-05T00:18:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20c2ce1df56adaa2f5bb172972442e3032367b80_5b248f6c-e928-485c-9760-73ff73443e10.webp?v=1714839535","variant_ids":[41898159636579]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 天行者路克-復古系列 - 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":"MPB0126224-PB97","featured_media":{"alt":null,"id":23885533642851,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20c2ce1df56adaa2f5bb172972442e3032367b80_5b248f6c-e928-485c-9760-73ff73443e10.webp?v=1714839535"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41898159702115,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0126204-PB97","requires_shipping":true,"taxable":true,"featured_image":{"id":31480281890915,"product_id":7411380715619,"position":5,"created_at":"2024-05-05T00:18:53+08:00","updated_at":"2024-05-05T00:18:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10e19c080ccdecc8e769beb8d903829ab9a9581b_c6976734-e4c2-499d-b11b-8cc977cce1be.webp?v=1714839533","variant_ids":[41898159702115]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 天行者路克-復古系列 - 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":"MPB0126204-PB97","featured_media":{"alt":null,"id":23885533249635,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10e19c080ccdecc8e769beb8d903829ab9a9581b_c6976734-e4c2-499d-b11b-8cc977cce1be.webp?v=1714839533"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41898159931491,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01262J5-PB97","requires_shipping":true,"taxable":true,"featured_image":{"id":31480280907875,"product_id":7411380715619,"position":3,"created_at":"2024-05-05T00:18:48+08:00","updated_at":"2024-05-05T00:18:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b376ca2052cd66a100dba6dd71d165e8b88d7e2d_d2bfbd46-81db-42b5-80ad-10bcfdc15a22.webp?v=1714839528","variant_ids":[41898159931491]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 天行者路克-復古系列 - 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":"MPB01262J5-PB97","featured_media":{"alt":null,"id":23885532299363,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b376ca2052cd66a100dba6dd71d165e8b88d7e2d_d2bfbd46-81db-42b5-80ad-10bcfdc15a22.webp?v=1714839528"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41898159636579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB97","requires_shipping":true,"taxable":true,"featured_image":{"id":31480282284131,"product_id":7411380715619,"position":6,"created_at":"2024-05-05T00:18:55+08:00","updated_at":"2024-05-05T00:18:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20c2ce1df56adaa2f5bb172972442e3032367b80_5b248f6c-e928-485c-9760-73ff73443e10.webp?v=1714839535","variant_ids":[41898159636579]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 天行者路克-復古系列 - 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":"MPB0126224-PB97","featured_media":{"alt":null,"id":23885533642851,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20c2ce1df56adaa2f5bb172972442e3032367b80_5b248f6c-e928-485c-9760-73ff73443e10.webp?v=1714839535"}},"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: "停產"
}