$product = {"id":7413974728803,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - X翼戰機-經典","handle":"iphone-13-mini-mod-nx-magsafe-printable-pb80","description":null,"published_at":"2024-06-11T17:46:37+08:00","created_at":"2024-05-05T13:53:38+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 13 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41902885109859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31484369633379,"product_id":7413974728803,"position":10,"created_at":"2024-05-05T13:54:02+08:00","updated_at":"2024-05-05T13:54:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec54190c88d0bbffb4e8d5a1aed6fb1f74bf4d1_9b23f0fa-9d93-4c3b-a4a2-80b8636b4839.webp?v=1714888442","variant_ids":[41902885109859]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-PB80","featured_media":{"alt":null,"id":23889663361123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec54190c88d0bbffb4e8d5a1aed6fb1f74bf4d1_9b23f0fa-9d93-4c3b-a4a2-80b8636b4839.webp?v=1714888442"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41902885175395,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31484368453731,"product_id":7413974728803,"position":8,"created_at":"2024-05-05T13:53:57+08:00","updated_at":"2024-05-05T13:53:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06f984661afafe88b13ae442ce6eef06f5bc8790_25255f6e-d121-4acb-83b4-3bd7682d8155.webp?v=1714888437","variant_ids":[41902885175395]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122804-PB80","featured_media":{"alt":null,"id":23889662148707,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06f984661afafe88b13ae442ce6eef06f5bc8790_25255f6e-d121-4acb-83b4-3bd7682d8155.webp?v=1714888437"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41902885404771,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31484367470691,"product_id":7413974728803,"position":6,"created_at":"2024-05-05T13:53:52+08:00","updated_at":"2024-05-05T13:53:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8014aba2af7de9e4f65ed9a43e5e5d295e04d0a_c1f65f08-5a97-4ff4-910f-515d03358a34.webp?v=1714888432","variant_ids":[41902885404771]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01228J5-PB80","featured_media":{"alt":null,"id":23889661165667,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8014aba2af7de9e4f65ed9a43e5e5d295e04d0a_c1f65f08-5a97-4ff4-910f-515d03358a34.webp?v=1714888432"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6c2fbea2dab2a92a819f2d2e9566f327a5b2b98_66eae507-8999-4f9f-9c21-0f4bc3969929.webp?v=1714888421","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cea5c361d866154a5ac9789c25c8c11c142bcae0_61ca82f2-1111-4ff4-8e94-0777c68e98e9.webp?v=1714888423","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0dd43a606e56decba3fbd3ecf661fffee24a659_81655a2c-a649-48f1-9574-c233ce7de2cb.webp?v=1714888425","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/932a85cd4b8ca09d752523d5e1b958806f5c895e_d5cdbc21-8196-4145-8254-1657de1005f2.webp?v=1714888428","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dc7f9852ff1158b415614a689c6a743043d2a18_2a3080ae-d5de-4d6f-bbdb-fb42fa0287da.webp?v=1714888430","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8014aba2af7de9e4f65ed9a43e5e5d295e04d0a_c1f65f08-5a97-4ff4-910f-515d03358a34.webp?v=1714888432","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/649249386f252777eb4e2fb09220d59de7c15fe0_3e4796cd-bebb-4da6-b946-17b50085604e.webp?v=1714888435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06f984661afafe88b13ae442ce6eef06f5bc8790_25255f6e-d121-4acb-83b4-3bd7682d8155.webp?v=1714888437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13978c8117b98145d2087421f47fc2d0c5e28e6d_aa3851b0-8509-4e0f-8d5e-d80913ab6485.webp?v=1714888439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec54190c88d0bbffb4e8d5a1aed6fb1f74bf4d1_9b23f0fa-9d93-4c3b-a4a2-80b8636b4839.webp?v=1714888442"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6c2fbea2dab2a92a819f2d2e9566f327a5b2b98_66eae507-8999-4f9f-9c21-0f4bc3969929.webp?v=1714888421","options":["color"],"media":[{"alt":null,"id":23889658740835,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6c2fbea2dab2a92a819f2d2e9566f327a5b2b98_66eae507-8999-4f9f-9c21-0f4bc3969929.webp?v=1714888421"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6c2fbea2dab2a92a819f2d2e9566f327a5b2b98_66eae507-8999-4f9f-9c21-0f4bc3969929.webp?v=1714888421","width":2000},{"alt":null,"id":23889659265123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cea5c361d866154a5ac9789c25c8c11c142bcae0_61ca82f2-1111-4ff4-8e94-0777c68e98e9.webp?v=1714888423"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cea5c361d866154a5ac9789c25c8c11c142bcae0_61ca82f2-1111-4ff4-8e94-0777c68e98e9.webp?v=1714888423","width":2000},{"alt":null,"id":23889659560035,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0dd43a606e56decba3fbd3ecf661fffee24a659_81655a2c-a649-48f1-9574-c233ce7de2cb.webp?v=1714888425"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0dd43a606e56decba3fbd3ecf661fffee24a659_81655a2c-a649-48f1-9574-c233ce7de2cb.webp?v=1714888425","width":2000},{"alt":null,"id":23889660051555,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/932a85cd4b8ca09d752523d5e1b958806f5c895e_d5cdbc21-8196-4145-8254-1657de1005f2.webp?v=1714888428"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/932a85cd4b8ca09d752523d5e1b958806f5c895e_d5cdbc21-8196-4145-8254-1657de1005f2.webp?v=1714888428","width":2000},{"alt":null,"id":23889660543075,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dc7f9852ff1158b415614a689c6a743043d2a18_2a3080ae-d5de-4d6f-bbdb-fb42fa0287da.webp?v=1714888430"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dc7f9852ff1158b415614a689c6a743043d2a18_2a3080ae-d5de-4d6f-bbdb-fb42fa0287da.webp?v=1714888430","width":2000},{"alt":null,"id":23889661165667,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8014aba2af7de9e4f65ed9a43e5e5d295e04d0a_c1f65f08-5a97-4ff4-910f-515d03358a34.webp?v=1714888432"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8014aba2af7de9e4f65ed9a43e5e5d295e04d0a_c1f65f08-5a97-4ff4-910f-515d03358a34.webp?v=1714888432","width":2000},{"alt":null,"id":23889661722723,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/649249386f252777eb4e2fb09220d59de7c15fe0_3e4796cd-bebb-4da6-b946-17b50085604e.webp?v=1714888435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/649249386f252777eb4e2fb09220d59de7c15fe0_3e4796cd-bebb-4da6-b946-17b50085604e.webp?v=1714888435","width":2000},{"alt":null,"id":23889662148707,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06f984661afafe88b13ae442ce6eef06f5bc8790_25255f6e-d121-4acb-83b4-3bd7682d8155.webp?v=1714888437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06f984661afafe88b13ae442ce6eef06f5bc8790_25255f6e-d121-4acb-83b4-3bd7682d8155.webp?v=1714888437","width":2000},{"alt":null,"id":23889662738531,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13978c8117b98145d2087421f47fc2d0c5e28e6d_aa3851b0-8509-4e0f-8d5e-d80913ab6485.webp?v=1714888439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13978c8117b98145d2087421f47fc2d0c5e28e6d_aa3851b0-8509-4e0f-8d5e-d80913ab6485.webp?v=1714888439","width":2000},{"alt":null,"id":23889663361123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec54190c88d0bbffb4e8d5a1aed6fb1f74bf4d1_9b23f0fa-9d93-4c3b-a4a2-80b8636b4839.webp?v=1714888442"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec54190c88d0bbffb4e8d5a1aed6fb1f74bf4d1_9b23f0fa-9d93-4c3b-a4a2-80b8636b4839.webp?v=1714888442","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41902885109859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31484369633379,"product_id":7413974728803,"position":10,"created_at":"2024-05-05T13:54:02+08:00","updated_at":"2024-05-05T13:54:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec54190c88d0bbffb4e8d5a1aed6fb1f74bf4d1_9b23f0fa-9d93-4c3b-a4a2-80b8636b4839.webp?v=1714888442","variant_ids":[41902885109859]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-PB80","featured_media":{"alt":null,"id":23889663361123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec54190c88d0bbffb4e8d5a1aed6fb1f74bf4d1_9b23f0fa-9d93-4c3b-a4a2-80b8636b4839.webp?v=1714888442"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41902885175395,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31484368453731,"product_id":7413974728803,"position":8,"created_at":"2024-05-05T13:53:57+08:00","updated_at":"2024-05-05T13:53:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06f984661afafe88b13ae442ce6eef06f5bc8790_25255f6e-d121-4acb-83b4-3bd7682d8155.webp?v=1714888437","variant_ids":[41902885175395]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122804-PB80","featured_media":{"alt":null,"id":23889662148707,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06f984661afafe88b13ae442ce6eef06f5bc8790_25255f6e-d121-4acb-83b4-3bd7682d8155.webp?v=1714888437"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41902885404771,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31484367470691,"product_id":7413974728803,"position":6,"created_at":"2024-05-05T13:53:52+08:00","updated_at":"2024-05-05T13:53:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8014aba2af7de9e4f65ed9a43e5e5d295e04d0a_c1f65f08-5a97-4ff4-910f-515d03358a34.webp?v=1714888432","variant_ids":[41902885404771]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01228J5-PB80","featured_media":{"alt":null,"id":23889661165667,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8014aba2af7de9e4f65ed9a43e5e5d295e04d0a_c1f65f08-5a97-4ff4-910f-515d03358a34.webp?v=1714888432"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41902885109859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31484369633379,"product_id":7413974728803,"position":10,"created_at":"2024-05-05T13:54:02+08:00","updated_at":"2024-05-05T13:54:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec54190c88d0bbffb4e8d5a1aed6fb1f74bf4d1_9b23f0fa-9d93-4c3b-a4a2-80b8636b4839.webp?v=1714888442","variant_ids":[41902885109859]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-PB80","featured_media":{"alt":null,"id":23889663361123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec54190c88d0bbffb4e8d5a1aed6fb1f74bf4d1_9b23f0fa-9d93-4c3b-a4a2-80b8636b4839.webp?v=1714888442"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }