$product = {"id":6983788920931,"title":"iPhone 13 mini SolidSuit (MagSafe 兼容) NBA B\u0026W-達拉斯獨行俠 Dallas Mavericks B\u0026W","handle":"iphone-13-mini-solidsuit-classic-magsafe-pm42","description":null,"published_at":"2023-08-02T22:16:08+08:00","created_at":"2023-07-28T12:50:37+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit MagSafe專區-爽爽貓 Song Song Meow By SECOND","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nba","device-iPhone 13 Mini","merge","reseller-nba"],"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":43102173167715,"title":"Black \/ Classic","option1":"Black","option2":"Classic","option3":null,"sku":"MST0122852-PM42","requires_shipping":true,"taxable":true,"featured_image":{"id":30278359973987,"product_id":6983788920931,"position":1,"created_at":"2023-07-28T12:50:40+08:00","updated_at":"2023-07-28T12:50:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840","variant_ids":[43102173167715,43102173331555]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) NBA B\u0026W-達拉斯獨行俠 Dallas Mavericks B\u0026W - Black \/ Classic","public_title":"Black \/ Classic","options":["Black","Classic"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-PM42","featured_media":{"alt":null,"id":22636991479907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43102173331555,"title":"Seaweed Green \/ Classic","option1":"Seaweed Green","option2":"Classic","option3":null,"sku":"MST01228Z8-PM42","requires_shipping":true,"taxable":true,"featured_image":{"id":30278359973987,"product_id":6983788920931,"position":1,"created_at":"2023-07-28T12:50:40+08:00","updated_at":"2023-07-28T12:50:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840","variant_ids":[43102173167715,43102173331555]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) NBA B\u0026W-達拉斯獨行俠 Dallas Mavericks B\u0026W - Seaweed Green \/ Classic","public_title":"Seaweed Green \/ Classic","options":["Seaweed Green","Classic"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-PM42","featured_media":{"alt":null,"id":22636991479907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2a0cff8acd1f56cb560eada2e08fa48d702a64.webp?v=1782205157","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d8b7592affb64ff539184d3b15da0431665f81.webp?v=1782205158","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099a31543f7cbba86538db15c1c892cd2f9dab6f.webp?v=1782205158","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2de7d358e40b3f76492966d55b39a057651db7.webp?v=1782205159","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2a0cff8acd1f56cb560eada2e08fa48d702a64_d0b1fbef-191c-400c-b40f-776749fa0e80.webp?v=1782218437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d8b7592affb64ff539184d3b15da0431665f81_f5139bab-a119-4c75-a89b-904587f086e4.webp?v=1782218438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099a31543f7cbba86538db15c1c892cd2f9dab6f_e84314af-d555-4f38-b115-e4d08cc539e3.webp?v=1782218439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2de7d358e40b3f76492966d55b39a057651db7_912fe7fd-99ea-49a8-b909-24cb97f0c251.webp?v=1782218439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2a0cff8acd1f56cb560eada2e08fa48d702a64_4a2c1f60-8f4d-4469-a388-bca416012a2b.webp?v=1782218761","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d8b7592affb64ff539184d3b15da0431665f81_55b88369-b316-4cc4-b96a-6d47a2f95b6e.webp?v=1782218761","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099a31543f7cbba86538db15c1c892cd2f9dab6f_abc81e1b-5126-41c8-8e00-40ed772aa611.webp?v=1782218762","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2de7d358e40b3f76492966d55b39a057651db7_1dccb3d3-aea8-47aa-a41c-f05369207418.webp?v=1782218763","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2a0cff8acd1f56cb560eada2e08fa48d702a64_4d069957-dfbf-4669-bf33-373d4e8a5656.webp?v=1782219050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d8b7592affb64ff539184d3b15da0431665f81_57c1fc75-46a5-4318-a83b-be2fe80549e8.webp?v=1782219050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099a31543f7cbba86538db15c1c892cd2f9dab6f_7600c5c4-c042-4a89-bc78-6bf51eb82839.webp?v=1782219052","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2de7d358e40b3f76492966d55b39a057651db7_cf43079e-a297-46cf-8eda-a32026c5b040.webp?v=1782219052"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840","options":["color","Types"],"media":[{"alt":null,"id":22636991479907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840","width":2000},{"alt":null,"id":27575147135075,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2a0cff8acd1f56cb560eada2e08fa48d702a64.webp?v=1782205157"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2a0cff8acd1f56cb560eada2e08fa48d702a64.webp?v=1782205157","width":2000},{"alt":null,"id":27575147266147,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d8b7592affb64ff539184d3b15da0431665f81.webp?v=1782205158"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d8b7592affb64ff539184d3b15da0431665f81.webp?v=1782205158","width":2000},{"alt":null,"id":27575147429987,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099a31543f7cbba86538db15c1c892cd2f9dab6f.webp?v=1782205158"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099a31543f7cbba86538db15c1c892cd2f9dab6f.webp?v=1782205158","width":2000},{"alt":null,"id":27575147692131,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2de7d358e40b3f76492966d55b39a057651db7.webp?v=1782205159"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2de7d358e40b3f76492966d55b39a057651db7.webp?v=1782205159","width":2000},{"alt":null,"id":27581461889123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2a0cff8acd1f56cb560eada2e08fa48d702a64_d0b1fbef-191c-400c-b40f-776749fa0e80.webp?v=1782218437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2a0cff8acd1f56cb560eada2e08fa48d702a64_d0b1fbef-191c-400c-b40f-776749fa0e80.webp?v=1782218437","width":2000},{"alt":null,"id":27581462478947,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d8b7592affb64ff539184d3b15da0431665f81_f5139bab-a119-4c75-a89b-904587f086e4.webp?v=1782218438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d8b7592affb64ff539184d3b15da0431665f81_f5139bab-a119-4c75-a89b-904587f086e4.webp?v=1782218438","width":2000},{"alt":null,"id":27581462970467,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099a31543f7cbba86538db15c1c892cd2f9dab6f_e84314af-d555-4f38-b115-e4d08cc539e3.webp?v=1782218439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099a31543f7cbba86538db15c1c892cd2f9dab6f_e84314af-d555-4f38-b115-e4d08cc539e3.webp?v=1782218439","width":2000},{"alt":null,"id":27581463461987,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2de7d358e40b3f76492966d55b39a057651db7_912fe7fd-99ea-49a8-b909-24cb97f0c251.webp?v=1782218439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2de7d358e40b3f76492966d55b39a057651db7_912fe7fd-99ea-49a8-b909-24cb97f0c251.webp?v=1782218439","width":2000},{"alt":null,"id":27581641687139,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2a0cff8acd1f56cb560eada2e08fa48d702a64_4a2c1f60-8f4d-4469-a388-bca416012a2b.webp?v=1782218761"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2a0cff8acd1f56cb560eada2e08fa48d702a64_4a2c1f60-8f4d-4469-a388-bca416012a2b.webp?v=1782218761","width":2000},{"alt":null,"id":27581642080355,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d8b7592affb64ff539184d3b15da0431665f81_55b88369-b316-4cc4-b96a-6d47a2f95b6e.webp?v=1782218761"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d8b7592affb64ff539184d3b15da0431665f81_55b88369-b316-4cc4-b96a-6d47a2f95b6e.webp?v=1782218761","width":2000},{"alt":null,"id":27581642276963,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099a31543f7cbba86538db15c1c892cd2f9dab6f_abc81e1b-5126-41c8-8e00-40ed772aa611.webp?v=1782218762"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099a31543f7cbba86538db15c1c892cd2f9dab6f_abc81e1b-5126-41c8-8e00-40ed772aa611.webp?v=1782218762","width":2000},{"alt":null,"id":27581642637411,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2de7d358e40b3f76492966d55b39a057651db7_1dccb3d3-aea8-47aa-a41c-f05369207418.webp?v=1782218763"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2de7d358e40b3f76492966d55b39a057651db7_1dccb3d3-aea8-47aa-a41c-f05369207418.webp?v=1782218763","width":2000},{"alt":null,"id":27581785800803,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2a0cff8acd1f56cb560eada2e08fa48d702a64_4d069957-dfbf-4669-bf33-373d4e8a5656.webp?v=1782219050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2a0cff8acd1f56cb560eada2e08fa48d702a64_4d069957-dfbf-4669-bf33-373d4e8a5656.webp?v=1782219050","width":2000},{"alt":null,"id":27581786194019,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d8b7592affb64ff539184d3b15da0431665f81_57c1fc75-46a5-4318-a83b-be2fe80549e8.webp?v=1782219050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42d8b7592affb64ff539184d3b15da0431665f81_57c1fc75-46a5-4318-a83b-be2fe80549e8.webp?v=1782219050","width":2000},{"alt":null,"id":27581786685539,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099a31543f7cbba86538db15c1c892cd2f9dab6f_7600c5c4-c042-4a89-bc78-6bf51eb82839.webp?v=1782219052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099a31543f7cbba86538db15c1c892cd2f9dab6f_7600c5c4-c042-4a89-bc78-6bf51eb82839.webp?v=1782219052","width":2000},{"alt":null,"id":27581786882147,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2de7d358e40b3f76492966d55b39a057651db7_cf43079e-a297-46cf-8eda-a32026c5b040.webp?v=1782219052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2de7d358e40b3f76492966d55b39a057651db7_cf43079e-a297-46cf-8eda-a32026c5b040.webp?v=1782219052","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43102173167715,"title":"Black \/ Classic","option1":"Black","option2":"Classic","option3":null,"sku":"MST0122852-PM42","requires_shipping":true,"taxable":true,"featured_image":{"id":30278359973987,"product_id":6983788920931,"position":1,"created_at":"2023-07-28T12:50:40+08:00","updated_at":"2023-07-28T12:50:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840","variant_ids":[43102173167715,43102173331555]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) NBA B\u0026W-達拉斯獨行俠 Dallas Mavericks B\u0026W - Black \/ Classic","public_title":"Black \/ Classic","options":["Black","Classic"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-PM42","featured_media":{"alt":null,"id":22636991479907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43102173331555,"title":"Seaweed Green \/ Classic","option1":"Seaweed Green","option2":"Classic","option3":null,"sku":"MST01228Z8-PM42","requires_shipping":true,"taxable":true,"featured_image":{"id":30278359973987,"product_id":6983788920931,"position":1,"created_at":"2023-07-28T12:50:40+08:00","updated_at":"2023-07-28T12:50:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840","variant_ids":[43102173167715,43102173331555]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) NBA B\u0026W-達拉斯獨行俠 Dallas Mavericks B\u0026W - Seaweed Green \/ Classic","public_title":"Seaweed Green \/ Classic","options":["Seaweed Green","Classic"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-PM42","featured_media":{"alt":null,"id":22636991479907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43102173167715,"title":"Black \/ Classic","option1":"Black","option2":"Classic","option3":null,"sku":"MST0122852-PM42","requires_shipping":true,"taxable":true,"featured_image":{"id":30278359973987,"product_id":6983788920931,"position":1,"created_at":"2023-07-28T12:50:40+08:00","updated_at":"2023-07-28T12:50:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840","variant_ids":[43102173167715,43102173331555]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) NBA B\u0026W-達拉斯獨行俠 Dallas Mavericks B\u0026W - Black \/ Classic","public_title":"Black \/ Classic","options":["Black","Classic"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-PM42","featured_media":{"alt":null,"id":22636991479907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-PM42.png?v=1690519840"}},"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: "停產" }