$product = {"id":7407891021923,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術","handle":"iphone-14-pro-mod-nx-printable-pb39","description":null,"published_at":"2024-06-11T16:25:44+08:00","created_at":"2024-05-03T11:10:19+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":41880147918947,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126224-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31470629126243,"product_id":7407891021923,"position":1,"created_at":"2024-05-03T11:10:22+08:00","updated_at":"2024-05-03T11:10:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59dfe4896685e4238023ecb61aacf435bc9a6e0b_b8b00467-f3bc-49ef-a85c-06432fd1f462.webp?v=1714705822","variant_ids":[41880147918947]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23875533045859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59dfe4896685e4238023ecb61aacf435bc9a6e0b_b8b00467-f3bc-49ef-a85c-06432fd1f462.webp?v=1714705822"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41880147984483,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"NPB0126204-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31470632665187,"product_id":7407891021923,"position":9,"created_at":"2024-05-03T11:10:40+08:00","updated_at":"2024-05-03T11:10:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f95761cadaedb1ab65812aa84f95c2ca99fedf8b_10320aeb-caa2-4fbf-8272-a7cd0ce7d872.webp?v=1714705840","variant_ids":[41880147984483]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23875536584803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f95761cadaedb1ab65812aa84f95c2ca99fedf8b_10320aeb-caa2-4fbf-8272-a7cd0ce7d872.webp?v=1714705840"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41880148476003,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"NPB01262J5-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31470630338659,"product_id":7407891021923,"position":4,"created_at":"2024-05-03T11:10:29+08:00","updated_at":"2024-05-03T11:10:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2be0a4ca30e635d4099660e4e3d6fc161592266_2d8d3c72-56e3-47c8-af4f-5534c4a4deb2.webp?v=1714705829","variant_ids":[41880148476003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23875534258275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2be0a4ca30e635d4099660e4e3d6fc161592266_2d8d3c72-56e3-47c8-af4f-5534c4a4deb2.webp?v=1714705829"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59dfe4896685e4238023ecb61aacf435bc9a6e0b_b8b00467-f3bc-49ef-a85c-06432fd1f462.webp?v=1714705822","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cea81a75d66c1099b8dc04fd95b8cf7c41f35db7_44e1bbb3-57dc-464a-b8fe-eaf301b67588.webp?v=1714705824","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3d83af99d0c891a37c27fc6a0f6bf5a9600700f_9e152906-d5ba-4a9d-be0c-27ebb95b0f74.webp?v=1714705826","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2be0a4ca30e635d4099660e4e3d6fc161592266_2d8d3c72-56e3-47c8-af4f-5534c4a4deb2.webp?v=1714705829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea57b13fac55b9e5e2ca22a3a344b856ad80460_abfb0db7-2c16-460b-b401-4050bc2292ec.webp?v=1714705831","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e45d4dc43f3e770b65d6edf50ca317b5c2ea87_f87f449e-cbe0-4837-8761-b06155b2ccfd.webp?v=1714705833","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0589d9b8a65e7307b30a223d348fd141b3508f5_fd50e848-ae24-49a2-a5b5-ee8a854605cd.webp?v=1714705835","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/caa620337ed297ecd00ae00deeb4c42363a262ff_c673a2b3-8a6b-4e49-8223-fe231a36fd66.webp?v=1714705838","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f95761cadaedb1ab65812aa84f95c2ca99fedf8b_10320aeb-caa2-4fbf-8272-a7cd0ce7d872.webp?v=1714705840","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da99ce685d0b94f7274f52bbd5ba2fb4f3fdd6bc_aef22409-273a-4863-8e0c-36f751436569.webp?v=1714705843"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59dfe4896685e4238023ecb61aacf435bc9a6e0b_b8b00467-f3bc-49ef-a85c-06432fd1f462.webp?v=1714705822","options":["color"],"media":[{"alt":null,"id":23875533045859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59dfe4896685e4238023ecb61aacf435bc9a6e0b_b8b00467-f3bc-49ef-a85c-06432fd1f462.webp?v=1714705822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59dfe4896685e4238023ecb61aacf435bc9a6e0b_b8b00467-f3bc-49ef-a85c-06432fd1f462.webp?v=1714705822","width":2000},{"alt":null,"id":23875533439075,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cea81a75d66c1099b8dc04fd95b8cf7c41f35db7_44e1bbb3-57dc-464a-b8fe-eaf301b67588.webp?v=1714705824"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cea81a75d66c1099b8dc04fd95b8cf7c41f35db7_44e1bbb3-57dc-464a-b8fe-eaf301b67588.webp?v=1714705824","width":2000},{"alt":null,"id":23875533897827,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3d83af99d0c891a37c27fc6a0f6bf5a9600700f_9e152906-d5ba-4a9d-be0c-27ebb95b0f74.webp?v=1714705826"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3d83af99d0c891a37c27fc6a0f6bf5a9600700f_9e152906-d5ba-4a9d-be0c-27ebb95b0f74.webp?v=1714705826","width":2000},{"alt":null,"id":23875534258275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2be0a4ca30e635d4099660e4e3d6fc161592266_2d8d3c72-56e3-47c8-af4f-5534c4a4deb2.webp?v=1714705829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2be0a4ca30e635d4099660e4e3d6fc161592266_2d8d3c72-56e3-47c8-af4f-5534c4a4deb2.webp?v=1714705829","width":2000},{"alt":null,"id":23875534782563,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea57b13fac55b9e5e2ca22a3a344b856ad80460_abfb0db7-2c16-460b-b401-4050bc2292ec.webp?v=1714705831"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea57b13fac55b9e5e2ca22a3a344b856ad80460_abfb0db7-2c16-460b-b401-4050bc2292ec.webp?v=1714705831","width":2000},{"alt":null,"id":23875535143011,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e45d4dc43f3e770b65d6edf50ca317b5c2ea87_f87f449e-cbe0-4837-8761-b06155b2ccfd.webp?v=1714705833"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e45d4dc43f3e770b65d6edf50ca317b5c2ea87_f87f449e-cbe0-4837-8761-b06155b2ccfd.webp?v=1714705833","width":2000},{"alt":null,"id":23875535634531,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0589d9b8a65e7307b30a223d348fd141b3508f5_fd50e848-ae24-49a2-a5b5-ee8a854605cd.webp?v=1714705835"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0589d9b8a65e7307b30a223d348fd141b3508f5_fd50e848-ae24-49a2-a5b5-ee8a854605cd.webp?v=1714705835","width":2000},{"alt":null,"id":23875536158819,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/caa620337ed297ecd00ae00deeb4c42363a262ff_c673a2b3-8a6b-4e49-8223-fe231a36fd66.webp?v=1714705838"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/caa620337ed297ecd00ae00deeb4c42363a262ff_c673a2b3-8a6b-4e49-8223-fe231a36fd66.webp?v=1714705838","width":2000},{"alt":null,"id":23875536584803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f95761cadaedb1ab65812aa84f95c2ca99fedf8b_10320aeb-caa2-4fbf-8272-a7cd0ce7d872.webp?v=1714705840"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f95761cadaedb1ab65812aa84f95c2ca99fedf8b_10320aeb-caa2-4fbf-8272-a7cd0ce7d872.webp?v=1714705840","width":2000},{"alt":null,"id":23875537371235,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da99ce685d0b94f7274f52bbd5ba2fb4f3fdd6bc_aef22409-273a-4863-8e0c-36f751436569.webp?v=1714705843"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da99ce685d0b94f7274f52bbd5ba2fb4f3fdd6bc_aef22409-273a-4863-8e0c-36f751436569.webp?v=1714705843","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41880147918947,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126224-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31470629126243,"product_id":7407891021923,"position":1,"created_at":"2024-05-03T11:10:22+08:00","updated_at":"2024-05-03T11:10:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59dfe4896685e4238023ecb61aacf435bc9a6e0b_b8b00467-f3bc-49ef-a85c-06432fd1f462.webp?v=1714705822","variant_ids":[41880147918947]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23875533045859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59dfe4896685e4238023ecb61aacf435bc9a6e0b_b8b00467-f3bc-49ef-a85c-06432fd1f462.webp?v=1714705822"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41880147984483,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"NPB0126204-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31470632665187,"product_id":7407891021923,"position":9,"created_at":"2024-05-03T11:10:40+08:00","updated_at":"2024-05-03T11:10:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f95761cadaedb1ab65812aa84f95c2ca99fedf8b_10320aeb-caa2-4fbf-8272-a7cd0ce7d872.webp?v=1714705840","variant_ids":[41880147984483]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23875536584803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f95761cadaedb1ab65812aa84f95c2ca99fedf8b_10320aeb-caa2-4fbf-8272-a7cd0ce7d872.webp?v=1714705840"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41880148476003,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"NPB01262J5-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31470630338659,"product_id":7407891021923,"position":4,"created_at":"2024-05-03T11:10:29+08:00","updated_at":"2024-05-03T11:10:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2be0a4ca30e635d4099660e4e3d6fc161592266_2d8d3c72-56e3-47c8-af4f-5534c4a4deb2.webp?v=1714705829","variant_ids":[41880148476003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23875534258275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2be0a4ca30e635d4099660e4e3d6fc161592266_2d8d3c72-56e3-47c8-af4f-5534c4a4deb2.webp?v=1714705829"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41880147918947,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126224-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31470629126243,"product_id":7407891021923,"position":1,"created_at":"2024-05-03T11:10:22+08:00","updated_at":"2024-05-03T11:10:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59dfe4896685e4238023ecb61aacf435bc9a6e0b_b8b00467-f3bc-49ef-a85c-06432fd1f462.webp?v=1714705822","variant_ids":[41880147918947]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23875533045859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59dfe4896685e4238023ecb61aacf435bc9a6e0b_b8b00467-f3bc-49ef-a85c-06432fd1f462.webp?v=1714705822"}},"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: "停產"
}