$product = {"id":7814673530979,"title":"iPhone 13 mini SolidSuit (MagSafe 兼容) 迪士尼公主系列 貼紙風格","handle":"iphone-13-mini-solidsuit-classic-magsafe-sf46","description":null,"published_at":"2025-06-11T09:35:11+08:00","created_at":"2025-06-10T10:22:35+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit MagSafe專區-迪士尼-公主系列 Disney Princess","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-disney-princess","device-iPhone 13 Mini","merge","reseller-disney-princess"],"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":43440167059555,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-SF46","requires_shipping":true,"taxable":true,"featured_image":{"id":36080230432867,"product_id":7814673530979,"position":11,"created_at":"2026-06-24T11:20:01+08:00","updated_at":"2026-06-24T11:20:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02859421ca2b5228ea3d83542c63b1e3553c8921_afe0d109-4913-456d-8bfd-6d0dac287fa2.webp?v=1782271203","variant_ids":[43440167059555]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 迪士尼公主系列 貼紙風格 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-SF46","featured_media":{"alt":null,"id":27589367267427,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02859421ca2b5228ea3d83542c63b1e3553c8921_afe0d109-4913-456d-8bfd-6d0dac287fa2.webp?v=1782271203"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43440172073059,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012280C-SF46","requires_shipping":true,"taxable":true,"featured_image":{"id":34000957472867,"product_id":7814673530979,"position":1,"created_at":"2025-06-10T10:22:42+08:00","updated_at":"2025-06-10T10:22:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fcef754b739977021456407c8da6894a7ee9b2.webp?v=1749522164","variant_ids":[43440172073059,43440172138595]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 迪士尼公主系列 貼紙風格 - 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":"MST012280C-SF46","featured_media":{"alt":null,"id":25685171830883,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fcef754b739977021456407c8da6894a7ee9b2.webp?v=1749522164"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43440172138595,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MST0122853-SF46","requires_shipping":true,"taxable":true,"featured_image":{"id":34000957472867,"product_id":7814673530979,"position":1,"created_at":"2025-06-10T10:22:42+08:00","updated_at":"2025-06-10T10:22:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fcef754b739977021456407c8da6894a7ee9b2.webp?v=1749522164","variant_ids":[43440172073059,43440172138595]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 迪士尼公主系列 貼紙風格 - White","public_title":"White","options":["White"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122853-SF46","featured_media":{"alt":null,"id":25685171830883,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fcef754b739977021456407c8da6894a7ee9b2.webp?v=1749522164"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43440172269667,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-SF46","requires_shipping":true,"taxable":true,"featured_image":{"id":36080230006883,"product_id":7814673530979,"position":10,"created_at":"2026-06-24T11:19:57+08:00","updated_at":"2026-06-24T11:19:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390c267e3813bff67c531fa149afa6db979275bd_4cd44106-c02d-42d1-b59a-cbd416172636.webp?v=1782271199","variant_ids":[43440172269667]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 迪士尼公主系列 貼紙風格 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-SF46","featured_media":{"alt":null,"id":27589366841443,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390c267e3813bff67c531fa149afa6db979275bd_4cd44106-c02d-42d1-b59a-cbd416172636.webp?v=1782271199"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fcef754b739977021456407c8da6894a7ee9b2.webp?v=1749522164","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd52343439c0057124c13c59a01e210f2f152be7.webp?v=1768793586","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390c267e3813bff67c531fa149afa6db979275bd.webp?v=1768793586","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3e5814213c9b0c78ee9d4e3f7221835d7a29701.webp?v=1768793587","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04b41a9a809555449f1c7f2ed69b53d5be2fb192.webp?v=1768793588","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef7144ea24b898e33250ddfd0775c6a8ee63a48f.webp?v=1768793588","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a379cc9803d6b508afdaedcdd028696906224ea8.webp?v=1768793589","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02859421ca2b5228ea3d83542c63b1e3553c8921.webp?v=1768793589","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6fcbd1f6a1fff195254dbb53104a9745dd3bfa9.webp?v=1768793590","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390c267e3813bff67c531fa149afa6db979275bd_4cd44106-c02d-42d1-b59a-cbd416172636.webp?v=1782271199","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02859421ca2b5228ea3d83542c63b1e3553c8921_afe0d109-4913-456d-8bfd-6d0dac287fa2.webp?v=1782271203","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04b41a9a809555449f1c7f2ed69b53d5be2fb192_68ab74d3-052e-482b-9d19-79a1f89fd172.webp?v=1782271205"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fcef754b739977021456407c8da6894a7ee9b2.webp?v=1749522164","options":["color"],"media":[{"alt":null,"id":25685171830883,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fcef754b739977021456407c8da6894a7ee9b2.webp?v=1749522164"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fcef754b739977021456407c8da6894a7ee9b2.webp?v=1749522164","width":2000},{"alt":null,"id":26675066601571,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd52343439c0057124c13c59a01e210f2f152be7.webp?v=1768793586"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd52343439c0057124c13c59a01e210f2f152be7.webp?v=1768793586","width":2000},{"alt":null,"id":26675066863715,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390c267e3813bff67c531fa149afa6db979275bd.webp?v=1768793586"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390c267e3813bff67c531fa149afa6db979275bd.webp?v=1768793586","width":2000},{"alt":null,"id":26675067682915,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3e5814213c9b0c78ee9d4e3f7221835d7a29701.webp?v=1768793587"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3e5814213c9b0c78ee9d4e3f7221835d7a29701.webp?v=1768793587","width":2000},{"alt":null,"id":26675068141667,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04b41a9a809555449f1c7f2ed69b53d5be2fb192.webp?v=1768793588"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04b41a9a809555449f1c7f2ed69b53d5be2fb192.webp?v=1768793588","width":2000},{"alt":null,"id":26675068633187,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef7144ea24b898e33250ddfd0775c6a8ee63a48f.webp?v=1768793588"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef7144ea24b898e33250ddfd0775c6a8ee63a48f.webp?v=1768793588","width":2000},{"alt":null,"id":26675069223011,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a379cc9803d6b508afdaedcdd028696906224ea8.webp?v=1768793589"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a379cc9803d6b508afdaedcdd028696906224ea8.webp?v=1768793589","width":2000},{"alt":null,"id":26675069681763,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02859421ca2b5228ea3d83542c63b1e3553c8921.webp?v=1768793589"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02859421ca2b5228ea3d83542c63b1e3553c8921.webp?v=1768793589","width":2000},{"alt":null,"id":26675070173283,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6fcbd1f6a1fff195254dbb53104a9745dd3bfa9.webp?v=1768793590"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6fcbd1f6a1fff195254dbb53104a9745dd3bfa9.webp?v=1768793590","width":2000},{"alt":null,"id":27589366841443,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390c267e3813bff67c531fa149afa6db979275bd_4cd44106-c02d-42d1-b59a-cbd416172636.webp?v=1782271199"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390c267e3813bff67c531fa149afa6db979275bd_4cd44106-c02d-42d1-b59a-cbd416172636.webp?v=1782271199","width":2000},{"alt":null,"id":27589367267427,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02859421ca2b5228ea3d83542c63b1e3553c8921_afe0d109-4913-456d-8bfd-6d0dac287fa2.webp?v=1782271203"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02859421ca2b5228ea3d83542c63b1e3553c8921_afe0d109-4913-456d-8bfd-6d0dac287fa2.webp?v=1782271203","width":2000},{"alt":null,"id":27589367595107,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04b41a9a809555449f1c7f2ed69b53d5be2fb192_68ab74d3-052e-482b-9d19-79a1f89fd172.webp?v=1782271205"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04b41a9a809555449f1c7f2ed69b53d5be2fb192_68ab74d3-052e-482b-9d19-79a1f89fd172.webp?v=1782271205","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43440167059555,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-SF46","requires_shipping":true,"taxable":true,"featured_image":{"id":36080230432867,"product_id":7814673530979,"position":11,"created_at":"2026-06-24T11:20:01+08:00","updated_at":"2026-06-24T11:20:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02859421ca2b5228ea3d83542c63b1e3553c8921_afe0d109-4913-456d-8bfd-6d0dac287fa2.webp?v=1782271203","variant_ids":[43440167059555]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 迪士尼公主系列 貼紙風格 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-SF46","featured_media":{"alt":null,"id":27589367267427,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02859421ca2b5228ea3d83542c63b1e3553c8921_afe0d109-4913-456d-8bfd-6d0dac287fa2.webp?v=1782271203"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43440172073059,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012280C-SF46","requires_shipping":true,"taxable":true,"featured_image":{"id":34000957472867,"product_id":7814673530979,"position":1,"created_at":"2025-06-10T10:22:42+08:00","updated_at":"2025-06-10T10:22:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fcef754b739977021456407c8da6894a7ee9b2.webp?v=1749522164","variant_ids":[43440172073059,43440172138595]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 迪士尼公主系列 貼紙風格 - 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":"MST012280C-SF46","featured_media":{"alt":null,"id":25685171830883,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fcef754b739977021456407c8da6894a7ee9b2.webp?v=1749522164"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43440172138595,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MST0122853-SF46","requires_shipping":true,"taxable":true,"featured_image":{"id":34000957472867,"product_id":7814673530979,"position":1,"created_at":"2025-06-10T10:22:42+08:00","updated_at":"2025-06-10T10:22:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fcef754b739977021456407c8da6894a7ee9b2.webp?v=1749522164","variant_ids":[43440172073059,43440172138595]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 迪士尼公主系列 貼紙風格 - White","public_title":"White","options":["White"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122853-SF46","featured_media":{"alt":null,"id":25685171830883,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fcef754b739977021456407c8da6894a7ee9b2.webp?v=1749522164"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43440172269667,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-SF46","requires_shipping":true,"taxable":true,"featured_image":{"id":36080230006883,"product_id":7814673530979,"position":10,"created_at":"2026-06-24T11:19:57+08:00","updated_at":"2026-06-24T11:19:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390c267e3813bff67c531fa149afa6db979275bd_4cd44106-c02d-42d1-b59a-cbd416172636.webp?v=1782271199","variant_ids":[43440172269667]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 迪士尼公主系列 貼紙風格 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-SF46","featured_media":{"alt":null,"id":27589366841443,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390c267e3813bff67c531fa149afa6db979275bd_4cd44106-c02d-42d1-b59a-cbd416172636.webp?v=1782271199"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43440167059555,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-SF46","requires_shipping":true,"taxable":true,"featured_image":{"id":36080230432867,"product_id":7814673530979,"position":11,"created_at":"2026-06-24T11:20:01+08:00","updated_at":"2026-06-24T11:20:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02859421ca2b5228ea3d83542c63b1e3553c8921_afe0d109-4913-456d-8bfd-6d0dac287fa2.webp?v=1782271203","variant_ids":[43440167059555]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 迪士尼公主系列 貼紙風格 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-SF46","featured_media":{"alt":null,"id":27589367267427,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02859421ca2b5228ea3d83542c63b1e3553c8921_afe0d109-4913-456d-8bfd-6d0dac287fa2.webp?v=1782271203"}},"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: "停產" }