$product = {"id":7155888423011,"title":"iPhone 11 Pro SolidSuit 1G 抱一個","handle":"iphone-11-pro-solidsuit-classic-iv03","description":null,"published_at":"2024-01-24T16:42:25+08:00","created_at":"2024-01-23T17:06:07+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit專區1G","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-1chun","device-iPhone 11 Pro","merge","reseller-1chun"],"price":83000,"price_min":83000,"price_max":83000,"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":41197141917795,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0114752-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":36322429370467,"product_id":7155888423011,"position":18,"created_at":"2026-07-20T17:53:17+08:00","updated_at":"2026-07-20T17:53:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7dc48799048fada535f971b4c7b34752c276357_67d754be-cb2d-4098-9331-957a1d4a27da.webp?v=1784541199","variant_ids":[41197141917795]},"available":true,"name":"iPhone 11 Pro SolidSuit 1G 抱一個 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0114752-IV03","featured_media":{"alt":null,"id":27826337611875,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7dc48799048fada535f971b4c7b34752c276357_67d754be-cb2d-4098-9331-957a1d4a27da.webp?v=1784541199"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41197142114403,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"SST01147P2-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":36322429108323,"product_id":7155888423011,"position":17,"created_at":"2026-07-20T17:53:16+08:00","updated_at":"2026-07-20T17:53:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab2d1febb32b78dd664a2599e0e2aad606292e0_d6126706-f4d4-4143-8f69-1e8cd08a26a6.webp?v=1784541198","variant_ids":[41197142114403]},"available":true,"name":"iPhone 11 Pro SolidSuit 1G 抱一個 - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01147P2-IV03","featured_media":{"alt":null,"id":27826337349731,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab2d1febb32b78dd664a2599e0e2aad606292e0_d6126706-f4d4-4143-8f69-1e8cd08a26a6.webp?v=1784541198"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b9866b59bbbf9a92cfc5a49be4f6bdd61a943d1_0dbfedc5-0a7b-44c5-910d-dc63e5f71bab.webp?v=1706000770","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad33f3007c33af3af4da35bd3445c9f8b547669c_a224f242-e518-4295-8323-217199cf5070.webp?v=1706000772","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea83ffe98a824798b0af9ae515d0a8ee89870d08_aa61fffc-1341-4a26-b941-7dcdb733997f.webp?v=1706000775","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/353db513b747221476e320b5dd979377ecdc4041_98497d9a-10ab-4868-8723-32878df9e511.webp?v=1706000777","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f5051fc3e6f571d483af54be1d4fa0d69d98490_a2324015-e723-4693-937b-6944a3fb1f8a.webp?v=1706000780","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9a3c30b7f15f73d79165f22913077bcf58fe5ee_ba72b6f6-c0c8-4288-8ca8-638baf0ebd2f.webp?v=1706000782","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8441355ee6ff07052633ea6224472fac45b75f5_416033f4-ecf2-4c79-bcdf-837db87153f8.webp?v=1706000784","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8441355ee6ff07052633ea6224472fac45b75f5.webp?v=1706066610","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9a3c30b7f15f73d79165f22913077bcf58fe5ee.webp?v=1706066613","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b9866b59bbbf9a92cfc5a49be4f6bdd61a943d1.webp?v=1706066615","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad33f3007c33af3af4da35bd3445c9f8b547669c.webp?v=1706066617","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/353db513b747221476e320b5dd979377ecdc4041.webp?v=1706066619","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea83ffe98a824798b0af9ae515d0a8ee89870d08.webp?v=1706066621","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f5051fc3e6f571d483af54be1d4fa0d69d98490.webp?v=1706066624","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab2d1febb32b78dd664a2599e0e2aad606292e0.webp?v=1782879602","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7dc48799048fada535f971b4c7b34752c276357.webp?v=1782879602","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab2d1febb32b78dd664a2599e0e2aad606292e0_d6126706-f4d4-4143-8f69-1e8cd08a26a6.webp?v=1784541198","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7dc48799048fada535f971b4c7b34752c276357_67d754be-cb2d-4098-9331-957a1d4a27da.webp?v=1784541199"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b9866b59bbbf9a92cfc5a49be4f6bdd61a943d1_0dbfedc5-0a7b-44c5-910d-dc63e5f71bab.webp?v=1706000770","options":["color"],"media":[{"alt":null,"id":23201970782307,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b9866b59bbbf9a92cfc5a49be4f6bdd61a943d1_0dbfedc5-0a7b-44c5-910d-dc63e5f71bab.webp?v=1706000770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b9866b59bbbf9a92cfc5a49be4f6bdd61a943d1_0dbfedc5-0a7b-44c5-910d-dc63e5f71bab.webp?v=1706000770","width":2000},{"alt":null,"id":23201971306595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad33f3007c33af3af4da35bd3445c9f8b547669c_a224f242-e518-4295-8323-217199cf5070.webp?v=1706000772"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad33f3007c33af3af4da35bd3445c9f8b547669c_a224f242-e518-4295-8323-217199cf5070.webp?v=1706000772","width":2000},{"alt":null,"id":23201971961955,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea83ffe98a824798b0af9ae515d0a8ee89870d08_aa61fffc-1341-4a26-b941-7dcdb733997f.webp?v=1706000775"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea83ffe98a824798b0af9ae515d0a8ee89870d08_aa61fffc-1341-4a26-b941-7dcdb733997f.webp?v=1706000775","width":2000},{"alt":null,"id":23201972519011,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/353db513b747221476e320b5dd979377ecdc4041_98497d9a-10ab-4868-8723-32878df9e511.webp?v=1706000777"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/353db513b747221476e320b5dd979377ecdc4041_98497d9a-10ab-4868-8723-32878df9e511.webp?v=1706000777","width":2000},{"alt":null,"id":23201972977763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f5051fc3e6f571d483af54be1d4fa0d69d98490_a2324015-e723-4693-937b-6944a3fb1f8a.webp?v=1706000780"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f5051fc3e6f571d483af54be1d4fa0d69d98490_a2324015-e723-4693-937b-6944a3fb1f8a.webp?v=1706000780","width":2000},{"alt":null,"id":23201973633123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9a3c30b7f15f73d79165f22913077bcf58fe5ee_ba72b6f6-c0c8-4288-8ca8-638baf0ebd2f.webp?v=1706000782"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9a3c30b7f15f73d79165f22913077bcf58fe5ee_ba72b6f6-c0c8-4288-8ca8-638baf0ebd2f.webp?v=1706000782","width":2000},{"alt":null,"id":23201974222947,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8441355ee6ff07052633ea6224472fac45b75f5_416033f4-ecf2-4c79-bcdf-837db87153f8.webp?v=1706000784"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8441355ee6ff07052633ea6224472fac45b75f5_416033f4-ecf2-4c79-bcdf-837db87153f8.webp?v=1706000784","width":2000},{"alt":null,"id":23208579301475,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8441355ee6ff07052633ea6224472fac45b75f5.webp?v=1706066610"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8441355ee6ff07052633ea6224472fac45b75f5.webp?v=1706066610","width":2000},{"alt":null,"id":23208579924067,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9a3c30b7f15f73d79165f22913077bcf58fe5ee.webp?v=1706066613"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9a3c30b7f15f73d79165f22913077bcf58fe5ee.webp?v=1706066613","width":2000},{"alt":null,"id":23208580481123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b9866b59bbbf9a92cfc5a49be4f6bdd61a943d1.webp?v=1706066615"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b9866b59bbbf9a92cfc5a49be4f6bdd61a943d1.webp?v=1706066615","width":2000},{"alt":null,"id":23208580939875,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad33f3007c33af3af4da35bd3445c9f8b547669c.webp?v=1706066617"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad33f3007c33af3af4da35bd3445c9f8b547669c.webp?v=1706066617","width":2000},{"alt":null,"id":23208581431395,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/353db513b747221476e320b5dd979377ecdc4041.webp?v=1706066619"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/353db513b747221476e320b5dd979377ecdc4041.webp?v=1706066619","width":2000},{"alt":null,"id":23208582381667,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea83ffe98a824798b0af9ae515d0a8ee89870d08.webp?v=1706066621"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea83ffe98a824798b0af9ae515d0a8ee89870d08.webp?v=1706066621","width":2000},{"alt":null,"id":23208583102563,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f5051fc3e6f571d483af54be1d4fa0d69d98490.webp?v=1706066624"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f5051fc3e6f571d483af54be1d4fa0d69d98490.webp?v=1706066624","width":2000},{"alt":null,"id":27646545068131,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab2d1febb32b78dd664a2599e0e2aad606292e0.webp?v=1782879602"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab2d1febb32b78dd664a2599e0e2aad606292e0.webp?v=1782879602","width":2000},{"alt":null,"id":27646545461347,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7dc48799048fada535f971b4c7b34752c276357.webp?v=1782879602"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7dc48799048fada535f971b4c7b34752c276357.webp?v=1782879602","width":2000},{"alt":null,"id":27826337349731,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab2d1febb32b78dd664a2599e0e2aad606292e0_d6126706-f4d4-4143-8f69-1e8cd08a26a6.webp?v=1784541198"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab2d1febb32b78dd664a2599e0e2aad606292e0_d6126706-f4d4-4143-8f69-1e8cd08a26a6.webp?v=1784541198","width":2000},{"alt":null,"id":27826337611875,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7dc48799048fada535f971b4c7b34752c276357_67d754be-cb2d-4098-9331-957a1d4a27da.webp?v=1784541199"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7dc48799048fada535f971b4c7b34752c276357_67d754be-cb2d-4098-9331-957a1d4a27da.webp?v=1784541199","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41197141917795,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0114752-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":36322429370467,"product_id":7155888423011,"position":18,"created_at":"2026-07-20T17:53:17+08:00","updated_at":"2026-07-20T17:53:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7dc48799048fada535f971b4c7b34752c276357_67d754be-cb2d-4098-9331-957a1d4a27da.webp?v=1784541199","variant_ids":[41197141917795]},"available":true,"name":"iPhone 11 Pro SolidSuit 1G 抱一個 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0114752-IV03","featured_media":{"alt":null,"id":27826337611875,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7dc48799048fada535f971b4c7b34752c276357_67d754be-cb2d-4098-9331-957a1d4a27da.webp?v=1784541199"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41197142114403,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"SST01147P2-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":36322429108323,"product_id":7155888423011,"position":17,"created_at":"2026-07-20T17:53:16+08:00","updated_at":"2026-07-20T17:53:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab2d1febb32b78dd664a2599e0e2aad606292e0_d6126706-f4d4-4143-8f69-1e8cd08a26a6.webp?v=1784541198","variant_ids":[41197142114403]},"available":true,"name":"iPhone 11 Pro SolidSuit 1G 抱一個 - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01147P2-IV03","featured_media":{"alt":null,"id":27826337349731,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab2d1febb32b78dd664a2599e0e2aad606292e0_d6126706-f4d4-4143-8f69-1e8cd08a26a6.webp?v=1784541198"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41197141917795,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0114752-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":36322429370467,"product_id":7155888423011,"position":18,"created_at":"2026-07-20T17:53:17+08:00","updated_at":"2026-07-20T17:53:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7dc48799048fada535f971b4c7b34752c276357_67d754be-cb2d-4098-9331-957a1d4a27da.webp?v=1784541199","variant_ids":[41197141917795]},"available":true,"name":"iPhone 11 Pro SolidSuit 1G 抱一個 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0114752-IV03","featured_media":{"alt":null,"id":27826337611875,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7dc48799048fada535f971b4c7b34752c276357_67d754be-cb2d-4098-9331-957a1d4a27da.webp?v=1784541199"}},"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: "停產" }