$product = {"id":7888996073571,"title":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Stickers","handle":"iphone-13-pro-max-solidsuit-classic-magsafe-tb31","description":null,"published_at":"2025-09-24T11:01:28+08:00","created_at":"2025-09-23T12:17:25+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-oracle-redbull-racing","device-iPhone 13 Pro Max","merge","reseller-oracle-redbull-racing"],"price":125000,"price_min":125000,"price_max":125000,"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":43744976011363,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012320C-TB31","requires_shipping":true,"taxable":true,"featured_image":{"id":36153793511523,"product_id":7888996073571,"position":10,"created_at":"2026-07-02T15:04:05+08:00","updated_at":"2026-07-02T15:04:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fe40a67c2942291c2e81b3749954e69d37433b4_157c75cc-8a57-4c17-95e6-2574a44729be.webp?v=1782975847","variant_ids":[43744976011363]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Stickers - Classic Blue","public_title":"Classic Blue","options":["Classic Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012320C-TB31","featured_media":{"alt":null,"id":27658666573923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fe40a67c2942291c2e81b3749954e69d37433b4_157c75cc-8a57-4c17-95e6-2574a44729be.webp?v=1782975847"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43744977748067,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"MST012320B-TB31","requires_shipping":true,"taxable":true,"featured_image":{"id":36153793839203,"product_id":7888996073571,"position":11,"created_at":"2026-07-02T15:04:05+08:00","updated_at":"2026-07-02T15:04:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30178e77da803692b1bb760298a91ee707a33a4e_c2ad88c0-8ff3-419f-b78c-9679637abf3b.webp?v=1782975847","variant_ids":[43744977748067]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Stickers - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012320B-TB31","featured_media":{"alt":null,"id":27658666901603,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30178e77da803692b1bb760298a91ee707a33a4e_c2ad88c0-8ff3-419f-b78c-9679637abf3b.webp?v=1782975847"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43744977813603,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01232Z9-TB31","requires_shipping":true,"taxable":true,"featured_image":{"id":36153793314915,"product_id":7888996073571,"position":9,"created_at":"2026-07-02T15:04:04+08:00","updated_at":"2026-07-02T15:04:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233df08c46a342ae44bdbe5990be3e3b1c683fbc_38ce31a2-ef66-4362-b4f2-b87476c850e4.webp?v=1782975846","variant_ids":[43744977813603]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Stickers - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01232Z9-TB31","featured_media":{"alt":null,"id":27658666377315,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233df08c46a342ae44bdbe5990be3e3b1c683fbc_38ce31a2-ef66-4362-b4f2-b87476c850e4.webp?v=1782975846"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43744977846371,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0123252-TB31","requires_shipping":true,"taxable":true,"featured_image":{"id":36153793183843,"product_id":7888996073571,"position":8,"created_at":"2026-07-02T15:04:03+08:00","updated_at":"2026-07-02T15:04:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/180491cef977b8f85ca0c029274916bf155f830e_2a5f37ee-e43f-46f3-adb4-8e3706cc0516.webp?v=1782975846","variant_ids":[43744977846371]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Stickers - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0123252-TB31","featured_media":{"alt":null,"id":27658665459811,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/180491cef977b8f85ca0c029274916bf155f830e_2a5f37ee-e43f-46f3-adb4-8e3706cc0516.webp?v=1782975846"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a6889fb056dc6759259e77550dc2528a084b8b8.webp?v=1758601052","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30178e77da803692b1bb760298a91ee707a33a4e.webp?v=1758601053","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/180491cef977b8f85ca0c029274916bf155f830e.webp?v=1758601053","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f35976dcc1bb47bc90a6c3fe035e5ca4da8d350.webp?v=1758601054","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fe40a67c2942291c2e81b3749954e69d37433b4.webp?v=1758601054","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b697a706739f8fea21f9935336a436fbbc420988.webp?v=1758601055","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233df08c46a342ae44bdbe5990be3e3b1c683fbc.webp?v=1758601056","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/180491cef977b8f85ca0c029274916bf155f830e_2a5f37ee-e43f-46f3-adb4-8e3706cc0516.webp?v=1782975846","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233df08c46a342ae44bdbe5990be3e3b1c683fbc_38ce31a2-ef66-4362-b4f2-b87476c850e4.webp?v=1782975846","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fe40a67c2942291c2e81b3749954e69d37433b4_157c75cc-8a57-4c17-95e6-2574a44729be.webp?v=1782975847","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30178e77da803692b1bb760298a91ee707a33a4e_c2ad88c0-8ff3-419f-b78c-9679637abf3b.webp?v=1782975847"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a6889fb056dc6759259e77550dc2528a084b8b8.webp?v=1758601052","options":["color"],"media":[{"alt":null,"id":26088927101027,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a6889fb056dc6759259e77550dc2528a084b8b8.webp?v=1758601052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a6889fb056dc6759259e77550dc2528a084b8b8.webp?v=1758601052","width":2000},{"alt":null,"id":26088927232099,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30178e77da803692b1bb760298a91ee707a33a4e.webp?v=1758601053"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30178e77da803692b1bb760298a91ee707a33a4e.webp?v=1758601053","width":2000},{"alt":null,"id":26088927330403,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/180491cef977b8f85ca0c029274916bf155f830e.webp?v=1758601053"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/180491cef977b8f85ca0c029274916bf155f830e.webp?v=1758601053","width":2000},{"alt":null,"id":26088927428707,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f35976dcc1bb47bc90a6c3fe035e5ca4da8d350.webp?v=1758601054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f35976dcc1bb47bc90a6c3fe035e5ca4da8d350.webp?v=1758601054","width":2000},{"alt":null,"id":26088927625315,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fe40a67c2942291c2e81b3749954e69d37433b4.webp?v=1758601054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fe40a67c2942291c2e81b3749954e69d37433b4.webp?v=1758601054","width":2000},{"alt":null,"id":26088927658083,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b697a706739f8fea21f9935336a436fbbc420988.webp?v=1758601055"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b697a706739f8fea21f9935336a436fbbc420988.webp?v=1758601055","width":2000},{"alt":null,"id":26088927690851,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233df08c46a342ae44bdbe5990be3e3b1c683fbc.webp?v=1758601056"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233df08c46a342ae44bdbe5990be3e3b1c683fbc.webp?v=1758601056","width":2000},{"alt":null,"id":27658665459811,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/180491cef977b8f85ca0c029274916bf155f830e_2a5f37ee-e43f-46f3-adb4-8e3706cc0516.webp?v=1782975846"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/180491cef977b8f85ca0c029274916bf155f830e_2a5f37ee-e43f-46f3-adb4-8e3706cc0516.webp?v=1782975846","width":2000},{"alt":null,"id":27658666377315,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233df08c46a342ae44bdbe5990be3e3b1c683fbc_38ce31a2-ef66-4362-b4f2-b87476c850e4.webp?v=1782975846"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233df08c46a342ae44bdbe5990be3e3b1c683fbc_38ce31a2-ef66-4362-b4f2-b87476c850e4.webp?v=1782975846","width":2000},{"alt":null,"id":27658666573923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fe40a67c2942291c2e81b3749954e69d37433b4_157c75cc-8a57-4c17-95e6-2574a44729be.webp?v=1782975847"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fe40a67c2942291c2e81b3749954e69d37433b4_157c75cc-8a57-4c17-95e6-2574a44729be.webp?v=1782975847","width":2000},{"alt":null,"id":27658666901603,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30178e77da803692b1bb760298a91ee707a33a4e_c2ad88c0-8ff3-419f-b78c-9679637abf3b.webp?v=1782975847"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30178e77da803692b1bb760298a91ee707a33a4e_c2ad88c0-8ff3-419f-b78c-9679637abf3b.webp?v=1782975847","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43744976011363,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012320C-TB31","requires_shipping":true,"taxable":true,"featured_image":{"id":36153793511523,"product_id":7888996073571,"position":10,"created_at":"2026-07-02T15:04:05+08:00","updated_at":"2026-07-02T15:04:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fe40a67c2942291c2e81b3749954e69d37433b4_157c75cc-8a57-4c17-95e6-2574a44729be.webp?v=1782975847","variant_ids":[43744976011363]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Stickers - Classic Blue","public_title":"Classic Blue","options":["Classic Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012320C-TB31","featured_media":{"alt":null,"id":27658666573923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fe40a67c2942291c2e81b3749954e69d37433b4_157c75cc-8a57-4c17-95e6-2574a44729be.webp?v=1782975847"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43744977748067,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"MST012320B-TB31","requires_shipping":true,"taxable":true,"featured_image":{"id":36153793839203,"product_id":7888996073571,"position":11,"created_at":"2026-07-02T15:04:05+08:00","updated_at":"2026-07-02T15:04:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30178e77da803692b1bb760298a91ee707a33a4e_c2ad88c0-8ff3-419f-b78c-9679637abf3b.webp?v=1782975847","variant_ids":[43744977748067]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Stickers - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012320B-TB31","featured_media":{"alt":null,"id":27658666901603,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30178e77da803692b1bb760298a91ee707a33a4e_c2ad88c0-8ff3-419f-b78c-9679637abf3b.webp?v=1782975847"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43744977813603,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01232Z9-TB31","requires_shipping":true,"taxable":true,"featured_image":{"id":36153793314915,"product_id":7888996073571,"position":9,"created_at":"2026-07-02T15:04:04+08:00","updated_at":"2026-07-02T15:04:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233df08c46a342ae44bdbe5990be3e3b1c683fbc_38ce31a2-ef66-4362-b4f2-b87476c850e4.webp?v=1782975846","variant_ids":[43744977813603]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Stickers - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01232Z9-TB31","featured_media":{"alt":null,"id":27658666377315,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233df08c46a342ae44bdbe5990be3e3b1c683fbc_38ce31a2-ef66-4362-b4f2-b87476c850e4.webp?v=1782975846"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43744977846371,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0123252-TB31","requires_shipping":true,"taxable":true,"featured_image":{"id":36153793183843,"product_id":7888996073571,"position":8,"created_at":"2026-07-02T15:04:03+08:00","updated_at":"2026-07-02T15:04:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/180491cef977b8f85ca0c029274916bf155f830e_2a5f37ee-e43f-46f3-adb4-8e3706cc0516.webp?v=1782975846","variant_ids":[43744977846371]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Stickers - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0123252-TB31","featured_media":{"alt":null,"id":27658665459811,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/180491cef977b8f85ca0c029274916bf155f830e_2a5f37ee-e43f-46f3-adb4-8e3706cc0516.webp?v=1782975846"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43744976011363,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012320C-TB31","requires_shipping":true,"taxable":true,"featured_image":{"id":36153793511523,"product_id":7888996073571,"position":10,"created_at":"2026-07-02T15:04:05+08:00","updated_at":"2026-07-02T15:04:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fe40a67c2942291c2e81b3749954e69d37433b4_157c75cc-8a57-4c17-95e6-2574a44729be.webp?v=1782975847","variant_ids":[43744976011363]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Stickers - Classic Blue","public_title":"Classic Blue","options":["Classic Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012320C-TB31","featured_media":{"alt":null,"id":27658666573923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fe40a67c2942291c2e81b3749954e69d37433b4_157c75cc-8a57-4c17-95e6-2574a44729be.webp?v=1782975847"}},"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: "停產"
}