Home
›
iPhone 15 Clear (MagSafe 兼容) NBA Logo-芝加哥公牛 Chicago Bulls - Light
$product = {"id":7158967042147,"title":"iPhone 15 Clear (MagSafe 兼容) NBA Logo-芝加哥公牛 Chicago Bulls - Light","handle":"iphone-15-jellytint-magsafe-pm03","description":null,"published_at":"2024-02-01T17:34:09+08:00","created_at":"2024-01-26T17:14:23+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nba","device-iPhone 15","merge","reseller-nba"],"price":148000,"price_min":148000,"price_max":148000,"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":41212548120675,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012950G-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152377770083,"product_id":7158967042147,"position":12,"created_at":"2026-07-02T12:18:06+08:00","updated_at":"2026-07-02T12:18:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_8c44b61c-d627-4c19-90e9-ae5b6839f30c.webp?v=1782965888","variant_ids":[41212548120675]},"available":true,"name":"iPhone 15 Clear (MagSafe 兼容) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":1680,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012950G-PM03","featured_media":{"alt":null,"id":27657251258467,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_8c44b61c-d627-4c19-90e9-ae5b6839f30c.webp?v=1782965888"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41212548153443,"title":"Moody Green","option1":"Moody Green","option2":null,"option3":null,"sku":"MCN012950H-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152377966691,"product_id":7158967042147,"position":13,"created_at":"2026-07-02T12:18:06+08:00","updated_at":"2026-07-02T12:18:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_1b2cc316-7506-46ef-9a8a-f8be5d9dbaf0.webp?v=1782965888","variant_ids":[41212548153443]},"available":true,"name":"iPhone 15 Clear (MagSafe 兼容) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Moody Green","public_title":"Moody Green","options":["Moody Green"],"price":148000,"weight":1680,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012950H-PM03","featured_media":{"alt":null,"id":27657251455075,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_1b2cc316-7506-46ef-9a8a-f8be5d9dbaf0.webp?v=1782965888"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41212548218979,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"MCN012950J-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152377573475,"product_id":7158967042147,"position":11,"created_at":"2026-07-02T12:18:05+08:00","updated_at":"2026-07-02T12:18:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_534a5adc-3650-4f69-9607-ff33cb063de1.webp?v=1782965887","variant_ids":[41212548218979]},"available":true,"name":"iPhone 15 Clear (MagSafe 兼容) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":148000,"weight":1680,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012950J-PM03","featured_media":{"alt":null,"id":27657251061859,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_534a5adc-3650-4f69-9607-ff33cb063de1.webp?v=1782965887"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-295-PM03_93815d1b-9c77-45c4-81a1-0700004b378f.png?v=1706260466","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5.webp?v=1782208368","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9.webp?v=1782208369","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea.webp?v=1782208370","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_ca69d61e-e27d-4e47-8bf7-44846985af6e.webp?v=1782957977","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_d17972fa-0ee3-4039-9237-f9bf81ce1fd8.webp?v=1782957978","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_96f6032b-82bb-4921-968c-a92d24680be2.webp?v=1782957979","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_a847dc2a-e01d-4570-8b0a-ed2990b28aaa.webp?v=1782961461","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_5de36e8c-f9c5-4def-aa52-fe8d6f950f7a.webp?v=1782961465","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_559b15cc-564b-4022-a50a-40bd64352068.webp?v=1782961469","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_534a5adc-3650-4f69-9607-ff33cb063de1.webp?v=1782965887","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_8c44b61c-d627-4c19-90e9-ae5b6839f30c.webp?v=1782965888","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_1b2cc316-7506-46ef-9a8a-f8be5d9dbaf0.webp?v=1782965888"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-295-PM03_93815d1b-9c77-45c4-81a1-0700004b378f.png?v=1706260466","options":["color"],"media":[{"alt":null,"id":23219097043043,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-295-PM03_93815d1b-9c77-45c4-81a1-0700004b378f.png?v=1706260466"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-295-PM03_93815d1b-9c77-45c4-81a1-0700004b378f.png?v=1706260466","width":2000},{"alt":null,"id":27576295620707,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5.webp?v=1782208368"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5.webp?v=1782208368","width":2000},{"alt":null,"id":27576295948387,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9.webp?v=1782208369"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9.webp?v=1782208369","width":2000},{"alt":null,"id":27576296603747,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea.webp?v=1782208370"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea.webp?v=1782208370","width":2000},{"alt":null,"id":27655996080227,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_ca69d61e-e27d-4e47-8bf7-44846985af6e.webp?v=1782957977"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_ca69d61e-e27d-4e47-8bf7-44846985af6e.webp?v=1782957977","width":2000},{"alt":null,"id":27655996506211,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_d17972fa-0ee3-4039-9237-f9bf81ce1fd8.webp?v=1782957978"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_d17972fa-0ee3-4039-9237-f9bf81ce1fd8.webp?v=1782957978","width":2000},{"alt":null,"id":27655996833891,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_96f6032b-82bb-4921-968c-a92d24680be2.webp?v=1782957979"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_96f6032b-82bb-4921-968c-a92d24680be2.webp?v=1782957979","width":2000},{"alt":null,"id":27656770355299,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_a847dc2a-e01d-4570-8b0a-ed2990b28aaa.webp?v=1782961461"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_a847dc2a-e01d-4570-8b0a-ed2990b28aaa.webp?v=1782961461","width":2000},{"alt":null,"id":27656770977891,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_5de36e8c-f9c5-4def-aa52-fe8d6f950f7a.webp?v=1782961465"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_5de36e8c-f9c5-4def-aa52-fe8d6f950f7a.webp?v=1782961465","width":2000},{"alt":null,"id":27656772255843,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_559b15cc-564b-4022-a50a-40bd64352068.webp?v=1782961469"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_559b15cc-564b-4022-a50a-40bd64352068.webp?v=1782961469","width":2000},{"alt":null,"id":27657251061859,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_534a5adc-3650-4f69-9607-ff33cb063de1.webp?v=1782965887"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_534a5adc-3650-4f69-9607-ff33cb063de1.webp?v=1782965887","width":2000},{"alt":null,"id":27657251258467,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_8c44b61c-d627-4c19-90e9-ae5b6839f30c.webp?v=1782965888"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_8c44b61c-d627-4c19-90e9-ae5b6839f30c.webp?v=1782965888","width":2000},{"alt":null,"id":27657251455075,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_1b2cc316-7506-46ef-9a8a-f8be5d9dbaf0.webp?v=1782965888"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_1b2cc316-7506-46ef-9a8a-f8be5d9dbaf0.webp?v=1782965888","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41212548120675,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012950G-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152377770083,"product_id":7158967042147,"position":12,"created_at":"2026-07-02T12:18:06+08:00","updated_at":"2026-07-02T12:18:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_8c44b61c-d627-4c19-90e9-ae5b6839f30c.webp?v=1782965888","variant_ids":[41212548120675]},"available":true,"name":"iPhone 15 Clear (MagSafe 兼容) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":1680,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012950G-PM03","featured_media":{"alt":null,"id":27657251258467,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_8c44b61c-d627-4c19-90e9-ae5b6839f30c.webp?v=1782965888"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41212548153443,"title":"Moody Green","option1":"Moody Green","option2":null,"option3":null,"sku":"MCN012950H-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152377966691,"product_id":7158967042147,"position":13,"created_at":"2026-07-02T12:18:06+08:00","updated_at":"2026-07-02T12:18:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_1b2cc316-7506-46ef-9a8a-f8be5d9dbaf0.webp?v=1782965888","variant_ids":[41212548153443]},"available":true,"name":"iPhone 15 Clear (MagSafe 兼容) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Moody Green","public_title":"Moody Green","options":["Moody Green"],"price":148000,"weight":1680,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012950H-PM03","featured_media":{"alt":null,"id":27657251455075,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff30f0033d312c3c1ed3111e3176f4f67c9b33ea_1b2cc316-7506-46ef-9a8a-f8be5d9dbaf0.webp?v=1782965888"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41212548218979,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"MCN012950J-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152377573475,"product_id":7158967042147,"position":11,"created_at":"2026-07-02T12:18:05+08:00","updated_at":"2026-07-02T12:18:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_534a5adc-3650-4f69-9607-ff33cb063de1.webp?v=1782965887","variant_ids":[41212548218979]},"available":true,"name":"iPhone 15 Clear (MagSafe 兼容) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":148000,"weight":1680,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012950J-PM03","featured_media":{"alt":null,"id":27657251061859,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282eb1f55331cf1b48af484f4d547351980945b5_534a5adc-3650-4f69-9607-ff33cb063de1.webp?v=1782965887"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41212548120675,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012950G-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152377770083,"product_id":7158967042147,"position":12,"created_at":"2026-07-02T12:18:06+08:00","updated_at":"2026-07-02T12:18:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_8c44b61c-d627-4c19-90e9-ae5b6839f30c.webp?v=1782965888","variant_ids":[41212548120675]},"available":true,"name":"iPhone 15 Clear (MagSafe 兼容) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":1680,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012950G-PM03","featured_media":{"alt":null,"id":27657251258467,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6f7e4fef187a3dd53cfddd93ef78acf1a349c9_8c44b61c-d627-4c19-90e9-ae5b6839f30c.webp?v=1782965888"}},"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: "停產"
}