$product = {"id":7888927457379,"title":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Composition","handle":"iphone-13-pro-max-solidsuit-classic-magsafe-tb33","description":null,"published_at":"2025-09-24T11:32:26+08:00","created_at":"2025-09-23T12:00:01+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":43744791887971,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012320C-TB33","requires_shipping":true,"taxable":true,"featured_image":{"id":36153792233571,"product_id":7888927457379,"position":8,"created_at":"2026-07-02T15:04:00+08:00","updated_at":"2026-07-02T15:04:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1444ca77b58698134e6e166165fad2373537d38e_3db12588-6905-415c-abcb-ea196d8bc29c.webp?v=1782975842","variant_ids":[43744791887971]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Composition - 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-TB33","featured_media":{"alt":null,"id":27658664509539,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1444ca77b58698134e6e166165fad2373537d38e_3db12588-6905-415c-abcb-ea196d8bc29c.webp?v=1782975842"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43744793722979,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"MST012320B-TB33","requires_shipping":true,"taxable":true,"featured_image":{"id":36153792495715,"product_id":7888927457379,"position":9,"created_at":"2026-07-02T15:04:01+08:00","updated_at":"2026-07-02T15:04:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fbc18b4784ec02515e828f06505c172ceb3f788_d3e82856-9c13-4912-8735-007b3c80e8bd.webp?v=1782975843","variant_ids":[43744793722979]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Composition - 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-TB33","featured_media":{"alt":null,"id":27658664771683,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fbc18b4784ec02515e828f06505c172ceb3f788_d3e82856-9c13-4912-8735-007b3c80e8bd.webp?v=1782975843"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43744793788515,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01232Z9-TB33","requires_shipping":true,"taxable":true,"featured_image":{"id":36153792659555,"product_id":7888927457379,"position":10,"created_at":"2026-07-02T15:04:02+08:00","updated_at":"2026-07-02T15:04:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d6dde3fc6a89fcc14cd6f0a051247309128af0b_6c8aaa1c-0807-4d38-99bf-cc197cb4e053.webp?v=1782975844","variant_ids":[43744793788515]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Composition - 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-TB33","featured_media":{"alt":null,"id":27658664935523,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d6dde3fc6a89fcc14cd6f0a051247309128af0b_6c8aaa1c-0807-4d38-99bf-cc197cb4e053.webp?v=1782975844"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43744793821283,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0123252-TB33","requires_shipping":true,"taxable":true,"featured_image":{"id":36153792888931,"product_id":7888927457379,"position":11,"created_at":"2026-07-02T15:04:02+08:00","updated_at":"2026-07-02T15:04:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66a7643bd91988b3111cad39ec4962067be722b2_d9e86c12-a40a-4b10-a10d-2bedb7498062.webp?v=1782975844","variant_ids":[43744793821283]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Composition - 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-TB33","featured_media":{"alt":null,"id":27658665164899,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66a7643bd91988b3111cad39ec4962067be722b2_d9e86c12-a40a-4b10-a10d-2bedb7498062.webp?v=1782975844"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fbc18b4784ec02515e828f06505c172ceb3f788.webp?v=1758600016","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4fc8623a82b2e814309f2237193cc81e9d841c1.webp?v=1758600017","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8360273f79c96ebe3be78ca9ce4e00385ea24263.webp?v=1758600018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/276a56c4f1bebdaab3db95aa4df3a64191ec06bd.webp?v=1758600019","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1444ca77b58698134e6e166165fad2373537d38e.webp?v=1758600018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66a7643bd91988b3111cad39ec4962067be722b2.webp?v=1758600015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d6dde3fc6a89fcc14cd6f0a051247309128af0b.webp?v=1758600015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1444ca77b58698134e6e166165fad2373537d38e_3db12588-6905-415c-abcb-ea196d8bc29c.webp?v=1782975842","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fbc18b4784ec02515e828f06505c172ceb3f788_d3e82856-9c13-4912-8735-007b3c80e8bd.webp?v=1782975843","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d6dde3fc6a89fcc14cd6f0a051247309128af0b_6c8aaa1c-0807-4d38-99bf-cc197cb4e053.webp?v=1782975844","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66a7643bd91988b3111cad39ec4962067be722b2_d9e86c12-a40a-4b10-a10d-2bedb7498062.webp?v=1782975844"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fbc18b4784ec02515e828f06505c172ceb3f788.webp?v=1758600016","options":["color"],"media":[{"alt":null,"id":26088716796003,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fbc18b4784ec02515e828f06505c172ceb3f788.webp?v=1758600016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fbc18b4784ec02515e828f06505c172ceb3f788.webp?v=1758600016","width":2000},{"alt":null,"id":26088716894307,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4fc8623a82b2e814309f2237193cc81e9d841c1.webp?v=1758600017"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4fc8623a82b2e814309f2237193cc81e9d841c1.webp?v=1758600017","width":2000},{"alt":null,"id":26088717123683,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8360273f79c96ebe3be78ca9ce4e00385ea24263.webp?v=1758600018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8360273f79c96ebe3be78ca9ce4e00385ea24263.webp?v=1758600018","width":2000},{"alt":null,"id":26088717287523,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/276a56c4f1bebdaab3db95aa4df3a64191ec06bd.webp?v=1758600019"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/276a56c4f1bebdaab3db95aa4df3a64191ec06bd.webp?v=1758600019","width":2000},{"alt":null,"id":26088717451363,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1444ca77b58698134e6e166165fad2373537d38e.webp?v=1758600018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1444ca77b58698134e6e166165fad2373537d38e.webp?v=1758600018","width":2000},{"alt":null,"id":26088717680739,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66a7643bd91988b3111cad39ec4962067be722b2.webp?v=1758600015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66a7643bd91988b3111cad39ec4962067be722b2.webp?v=1758600015","width":2000},{"alt":null,"id":26088717811811,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d6dde3fc6a89fcc14cd6f0a051247309128af0b.webp?v=1758600015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d6dde3fc6a89fcc14cd6f0a051247309128af0b.webp?v=1758600015","width":2000},{"alt":null,"id":27658664509539,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1444ca77b58698134e6e166165fad2373537d38e_3db12588-6905-415c-abcb-ea196d8bc29c.webp?v=1782975842"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1444ca77b58698134e6e166165fad2373537d38e_3db12588-6905-415c-abcb-ea196d8bc29c.webp?v=1782975842","width":2000},{"alt":null,"id":27658664771683,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fbc18b4784ec02515e828f06505c172ceb3f788_d3e82856-9c13-4912-8735-007b3c80e8bd.webp?v=1782975843"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fbc18b4784ec02515e828f06505c172ceb3f788_d3e82856-9c13-4912-8735-007b3c80e8bd.webp?v=1782975843","width":2000},{"alt":null,"id":27658664935523,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d6dde3fc6a89fcc14cd6f0a051247309128af0b_6c8aaa1c-0807-4d38-99bf-cc197cb4e053.webp?v=1782975844"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d6dde3fc6a89fcc14cd6f0a051247309128af0b_6c8aaa1c-0807-4d38-99bf-cc197cb4e053.webp?v=1782975844","width":2000},{"alt":null,"id":27658665164899,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66a7643bd91988b3111cad39ec4962067be722b2_d9e86c12-a40a-4b10-a10d-2bedb7498062.webp?v=1782975844"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66a7643bd91988b3111cad39ec4962067be722b2_d9e86c12-a40a-4b10-a10d-2bedb7498062.webp?v=1782975844","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43744791887971,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012320C-TB33","requires_shipping":true,"taxable":true,"featured_image":{"id":36153792233571,"product_id":7888927457379,"position":8,"created_at":"2026-07-02T15:04:00+08:00","updated_at":"2026-07-02T15:04:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1444ca77b58698134e6e166165fad2373537d38e_3db12588-6905-415c-abcb-ea196d8bc29c.webp?v=1782975842","variant_ids":[43744791887971]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Composition - 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-TB33","featured_media":{"alt":null,"id":27658664509539,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1444ca77b58698134e6e166165fad2373537d38e_3db12588-6905-415c-abcb-ea196d8bc29c.webp?v=1782975842"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43744793722979,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"MST012320B-TB33","requires_shipping":true,"taxable":true,"featured_image":{"id":36153792495715,"product_id":7888927457379,"position":9,"created_at":"2026-07-02T15:04:01+08:00","updated_at":"2026-07-02T15:04:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fbc18b4784ec02515e828f06505c172ceb3f788_d3e82856-9c13-4912-8735-007b3c80e8bd.webp?v=1782975843","variant_ids":[43744793722979]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Composition - 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-TB33","featured_media":{"alt":null,"id":27658664771683,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fbc18b4784ec02515e828f06505c172ceb3f788_d3e82856-9c13-4912-8735-007b3c80e8bd.webp?v=1782975843"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43744793788515,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01232Z9-TB33","requires_shipping":true,"taxable":true,"featured_image":{"id":36153792659555,"product_id":7888927457379,"position":10,"created_at":"2026-07-02T15:04:02+08:00","updated_at":"2026-07-02T15:04:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d6dde3fc6a89fcc14cd6f0a051247309128af0b_6c8aaa1c-0807-4d38-99bf-cc197cb4e053.webp?v=1782975844","variant_ids":[43744793788515]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Composition - 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-TB33","featured_media":{"alt":null,"id":27658664935523,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d6dde3fc6a89fcc14cd6f0a051247309128af0b_6c8aaa1c-0807-4d38-99bf-cc197cb4e053.webp?v=1782975844"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43744793821283,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0123252-TB33","requires_shipping":true,"taxable":true,"featured_image":{"id":36153792888931,"product_id":7888927457379,"position":11,"created_at":"2026-07-02T15:04:02+08:00","updated_at":"2026-07-02T15:04:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66a7643bd91988b3111cad39ec4962067be722b2_d9e86c12-a40a-4b10-a10d-2bedb7498062.webp?v=1782975844","variant_ids":[43744793821283]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Composition - 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-TB33","featured_media":{"alt":null,"id":27658665164899,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66a7643bd91988b3111cad39ec4962067be722b2_d9e86c12-a40a-4b10-a10d-2bedb7498062.webp?v=1782975844"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43744791887971,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012320C-TB33","requires_shipping":true,"taxable":true,"featured_image":{"id":36153792233571,"product_id":7888927457379,"position":8,"created_at":"2026-07-02T15:04:00+08:00","updated_at":"2026-07-02T15:04:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1444ca77b58698134e6e166165fad2373537d38e_3db12588-6905-415c-abcb-ea196d8bc29c.webp?v=1782975842","variant_ids":[43744791887971]},"available":true,"name":"iPhone 13 Pro Max SolidSuit (MagSafe 兼容) Oracle Red Bull Racing ORBR - Composition - 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-TB33","featured_media":{"alt":null,"id":27658664509539,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1444ca77b58698134e6e166165fad2373537d38e_3db12588-6905-415c-abcb-ea196d8bc29c.webp?v=1782975842"}},"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: "停產" }