$product = {"id":7189498134627,"title":"iPhone 13 mini SolidSuit (MagSafe 兼容) Batman 蝙蝠俠 黑白畫風-小丑","handle":"iphone-13-mini-solidsuit-classic-magsafe-sb13","description":null,"published_at":"2024-02-27T14:27:30+08:00","created_at":"2024-02-23T18:35:07+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit MagSafe專區-Batman","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-batman","device-iPhone 13 Mini","merge","reseller-batman"],"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":41312739459171,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-SB13","requires_shipping":true,"taxable":true,"featured_image":{"id":36319002656867,"product_id":7189498134627,"position":16,"created_at":"2026-07-20T12:34:16+08:00","updated_at":"2026-07-20T12:34:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a583317a14fa1457053a114ba363fce25e6f1e2.webp?v=1784522059","variant_ids":[41312739459171]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Batman 蝙蝠俠 黑白畫風-小丑 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-SB13","featured_media":{"alt":null,"id":27822954938467,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a583317a14fa1457053a114ba363fce25e6f1e2.webp?v=1784522059"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41312739819619,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-SB13","requires_shipping":true,"taxable":true,"featured_image":{"id":36319002984547,"product_id":7189498134627,"position":17,"created_at":"2026-07-20T12:34:17+08:00","updated_at":"2026-07-20T12:34:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfa9d5d22b80e34d036d439492788e6bd4ff4e35.webp?v=1784522059","variant_ids":[41312739819619]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Batman 蝙蝠俠 黑白畫風-小丑 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-SB13","featured_media":{"alt":null,"id":27822955266147,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfa9d5d22b80e34d036d439492788e6bd4ff4e35.webp?v=1784522059"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea4f09de3e696d1ff3a46e33a034c488caa7f7db_a57b0dbe-5dbd-4ce2-bd17-012312f7a127.webp?v=1708919925","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62604d182c90c5d078048cc74f3d0512b1670290_15d5ab2f-e321-4335-9a06-ca70511d8029.webp?v=1708919927","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06ac3254c0c356c29ff1e6244a83ea61022edac1_c336aff9-20a8-4b44-a6c0-6403125a9e66.webp?v=1708919929","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d5db03d98d92776eaee895df0007b24eec49123_7f256ebc-0b4e-4f18-8813-653e70ade6f4.webp?v=1708919934","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc6e03ca362daccafd50febc880d77b320caec17_34a4ecb9-985a-467d-b7d6-d2cc468f98f0.webp?v=1708919936","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0db8a71ee6b25657ed507cade9948b089d0ac2df_06a5f084-6604-499d-a540-7a90ae42d17c.webp?v=1708919939","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fa35cde248524919cd9a748b913bac55409356c_caf72202-b66a-4a0a-8601-818939100414.webp?v=1708919941","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa1fa16d6ac9074b9d1c1faff11da59c774d32d3_f1db43f5-aae7-4aa2-81f6-f829119ed6c3.webp?v=1708919943","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccc6cb436acc54f31f516c60ca3d294fb9a2df12_13acf123-7fa2-4b6d-84eb-9834cca80f65.webp?v=1708919946","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4323b0792085d3b0115ac3b409136120d678385_0d6e96f5-9bb1-4d09-bf37-fbfef1c4d14e.webp?v=1708919948","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d3ef761690401d8ce94eb4e4d93bffefc70c5e7_c03d33b6-c313-4108-8665-93c341ac8d6a.webp?v=1708919950","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dc80e2ade736f7b9a8d444fca503f8c2d1cceba_63958bab-d872-41bb-af9f-9873240e4ffe.webp?v=1708919952","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e14e5710a2dc8ee012530d293351b0ef92ca86bd_c195269d-da03-4100-bc77-73709b860a44.webp?v=1708919955","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d60264e1325c22064e9cb1549374f068b24705b2_a72e263d-933c-4101-9159-d06c4bd0ad9d.webp?v=1708919957","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/060804b8185715fdf3517764a6637fefa8707f1f_d11088ab-7c6d-4b05-aa5f-7cf00ae065a9.webp?v=1708919960","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a583317a14fa1457053a114ba363fce25e6f1e2.webp?v=1784522059","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfa9d5d22b80e34d036d439492788e6bd4ff4e35.webp?v=1784522059"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea4f09de3e696d1ff3a46e33a034c488caa7f7db_a57b0dbe-5dbd-4ce2-bd17-012312f7a127.webp?v=1708919925","options":["color"],"media":[{"alt":null,"id":23352862703715,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea4f09de3e696d1ff3a46e33a034c488caa7f7db_a57b0dbe-5dbd-4ce2-bd17-012312f7a127.webp?v=1708919925"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea4f09de3e696d1ff3a46e33a034c488caa7f7db_a57b0dbe-5dbd-4ce2-bd17-012312f7a127.webp?v=1708919925","width":2000},{"alt":null,"id":23352863686755,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62604d182c90c5d078048cc74f3d0512b1670290_15d5ab2f-e321-4335-9a06-ca70511d8029.webp?v=1708919927"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62604d182c90c5d078048cc74f3d0512b1670290_15d5ab2f-e321-4335-9a06-ca70511d8029.webp?v=1708919927","width":2000},{"alt":null,"id":23352864833635,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06ac3254c0c356c29ff1e6244a83ea61022edac1_c336aff9-20a8-4b44-a6c0-6403125a9e66.webp?v=1708919929"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06ac3254c0c356c29ff1e6244a83ea61022edac1_c336aff9-20a8-4b44-a6c0-6403125a9e66.webp?v=1708919929","width":2000},{"alt":null,"id":23352866963555,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d5db03d98d92776eaee895df0007b24eec49123_7f256ebc-0b4e-4f18-8813-653e70ade6f4.webp?v=1708919934"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d5db03d98d92776eaee895df0007b24eec49123_7f256ebc-0b4e-4f18-8813-653e70ade6f4.webp?v=1708919934","width":2000},{"alt":null,"id":23352868012131,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc6e03ca362daccafd50febc880d77b320caec17_34a4ecb9-985a-467d-b7d6-d2cc468f98f0.webp?v=1708919936"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc6e03ca362daccafd50febc880d77b320caec17_34a4ecb9-985a-467d-b7d6-d2cc468f98f0.webp?v=1708919936","width":2000},{"alt":null,"id":23352869093475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0db8a71ee6b25657ed507cade9948b089d0ac2df_06a5f084-6604-499d-a540-7a90ae42d17c.webp?v=1708919939"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0db8a71ee6b25657ed507cade9948b089d0ac2df_06a5f084-6604-499d-a540-7a90ae42d17c.webp?v=1708919939","width":2000},{"alt":null,"id":23352869847139,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fa35cde248524919cd9a748b913bac55409356c_caf72202-b66a-4a0a-8601-818939100414.webp?v=1708919941"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fa35cde248524919cd9a748b913bac55409356c_caf72202-b66a-4a0a-8601-818939100414.webp?v=1708919941","width":2000},{"alt":null,"id":23352870699107,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa1fa16d6ac9074b9d1c1faff11da59c774d32d3_f1db43f5-aae7-4aa2-81f6-f829119ed6c3.webp?v=1708919943"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa1fa16d6ac9074b9d1c1faff11da59c774d32d3_f1db43f5-aae7-4aa2-81f6-f829119ed6c3.webp?v=1708919943","width":2000},{"alt":null,"id":23352871452771,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccc6cb436acc54f31f516c60ca3d294fb9a2df12_13acf123-7fa2-4b6d-84eb-9834cca80f65.webp?v=1708919946"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccc6cb436acc54f31f516c60ca3d294fb9a2df12_13acf123-7fa2-4b6d-84eb-9834cca80f65.webp?v=1708919946","width":2000},{"alt":null,"id":23352872468579,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4323b0792085d3b0115ac3b409136120d678385_0d6e96f5-9bb1-4d09-bf37-fbfef1c4d14e.webp?v=1708919948"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4323b0792085d3b0115ac3b409136120d678385_0d6e96f5-9bb1-4d09-bf37-fbfef1c4d14e.webp?v=1708919948","width":2000},{"alt":null,"id":23352873123939,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d3ef761690401d8ce94eb4e4d93bffefc70c5e7_c03d33b6-c313-4108-8665-93c341ac8d6a.webp?v=1708919950"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d3ef761690401d8ce94eb4e4d93bffefc70c5e7_c03d33b6-c313-4108-8665-93c341ac8d6a.webp?v=1708919950","width":2000},{"alt":null,"id":23352873943139,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dc80e2ade736f7b9a8d444fca503f8c2d1cceba_63958bab-d872-41bb-af9f-9873240e4ffe.webp?v=1708919952"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dc80e2ade736f7b9a8d444fca503f8c2d1cceba_63958bab-d872-41bb-af9f-9873240e4ffe.webp?v=1708919952","width":2000},{"alt":null,"id":23352874827875,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e14e5710a2dc8ee012530d293351b0ef92ca86bd_c195269d-da03-4100-bc77-73709b860a44.webp?v=1708919955"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e14e5710a2dc8ee012530d293351b0ef92ca86bd_c195269d-da03-4100-bc77-73709b860a44.webp?v=1708919955","width":2000},{"alt":null,"id":23352875614307,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d60264e1325c22064e9cb1549374f068b24705b2_a72e263d-933c-4101-9159-d06c4bd0ad9d.webp?v=1708919957"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d60264e1325c22064e9cb1549374f068b24705b2_a72e263d-933c-4101-9159-d06c4bd0ad9d.webp?v=1708919957","width":2000},{"alt":null,"id":23352876630115,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/060804b8185715fdf3517764a6637fefa8707f1f_d11088ab-7c6d-4b05-aa5f-7cf00ae065a9.webp?v=1708919960"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/060804b8185715fdf3517764a6637fefa8707f1f_d11088ab-7c6d-4b05-aa5f-7cf00ae065a9.webp?v=1708919960","width":2000},{"alt":null,"id":27822954938467,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a583317a14fa1457053a114ba363fce25e6f1e2.webp?v=1784522059"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a583317a14fa1457053a114ba363fce25e6f1e2.webp?v=1784522059","width":2000},{"alt":null,"id":27822955266147,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfa9d5d22b80e34d036d439492788e6bd4ff4e35.webp?v=1784522059"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfa9d5d22b80e34d036d439492788e6bd4ff4e35.webp?v=1784522059","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41312739459171,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-SB13","requires_shipping":true,"taxable":true,"featured_image":{"id":36319002656867,"product_id":7189498134627,"position":16,"created_at":"2026-07-20T12:34:16+08:00","updated_at":"2026-07-20T12:34:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a583317a14fa1457053a114ba363fce25e6f1e2.webp?v=1784522059","variant_ids":[41312739459171]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Batman 蝙蝠俠 黑白畫風-小丑 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-SB13","featured_media":{"alt":null,"id":27822954938467,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a583317a14fa1457053a114ba363fce25e6f1e2.webp?v=1784522059"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41312739819619,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-SB13","requires_shipping":true,"taxable":true,"featured_image":{"id":36319002984547,"product_id":7189498134627,"position":17,"created_at":"2026-07-20T12:34:17+08:00","updated_at":"2026-07-20T12:34:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfa9d5d22b80e34d036d439492788e6bd4ff4e35.webp?v=1784522059","variant_ids":[41312739819619]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Batman 蝙蝠俠 黑白畫風-小丑 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-SB13","featured_media":{"alt":null,"id":27822955266147,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfa9d5d22b80e34d036d439492788e6bd4ff4e35.webp?v=1784522059"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41312739459171,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-SB13","requires_shipping":true,"taxable":true,"featured_image":{"id":36319002656867,"product_id":7189498134627,"position":16,"created_at":"2026-07-20T12:34:16+08:00","updated_at":"2026-07-20T12:34:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a583317a14fa1457053a114ba363fce25e6f1e2.webp?v=1784522059","variant_ids":[41312739459171]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Batman 蝙蝠俠 黑白畫風-小丑 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-SB13","featured_media":{"alt":null,"id":27822954938467,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a583317a14fa1457053a114ba363fce25e6f1e2.webp?v=1784522059"}},"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: "停產"
}