$product = {"id":7764443922531,"title":"iPhone 16 Pro Max CircularNext(MagSafe 兼容 \u0026 相機按鈕)","handle":"iphone-16-pro-max-circularnext-magsafe-bumper-with-capture-button-featured-product","description":null,"published_at":"2025-04-09T09:40:38+08:00","created_at":"2025-04-02T09:41:31+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"CircularNext MagSafe With Capture Button","tags":["20%","25%","30%","35%","40%","45%","50%","all-phone-case-fp","brand-Apple","device-iPhone 16 Pro Max","discountable","discountable-item","dropdownDevice-Apple iPhone 16 Pro Max","featured-product","member","quickbuy","refresh-kelly-2025","reseller","reseller-circularnext-magsafe-bumper-with-capture-button","type-circularnext-magsafe-with-capture-button-featured-product","viewable"],"price":118000,"price_min":118000,"price_max":118000,"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":43282374328419,"title":"海豚粉","option1":"海豚粉","option2":null,"option3":null,"sku":"MNB013283X","requires_shipping":true,"taxable":true,"featured_image":{"id":33681081827427,"product_id":7764443922531,"position":6,"created_at":"2025-04-07T16:56:24+08:00","updated_at":"2025-04-07T16:56:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6be8652fdeaf3ca2342366cb899d7d8620c18c2e_252f6a81-0c97-43a0-812e-4bef095e287b.webp?v=1744016186","variant_ids":[43282374328419]},"available":true,"name":"iPhone 16 Pro Max CircularNext(MagSafe 兼容 \u0026 相機按鈕) - 海豚粉","public_title":"海豚粉","options":["海豚粉"],"price":118000,"weight":0,"compare_at_price":null,"inventory_quantity":-2,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109654","featured_media":{"alt":null,"id":25469973037155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6be8652fdeaf3ca2342366cb899d7d8620c18c2e_252f6a81-0c97-43a0-812e-4bef095e287b.webp?v=1744016186"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43282374361187,"title":"北極灰","option1":"北極灰","option2":null,"option3":null,"sku":"MNB013283W","requires_shipping":true,"taxable":true,"featured_image":{"id":33681082384483,"product_id":7764443922531,"position":7,"created_at":"2025-04-07T16:56:25+08:00","updated_at":"2025-04-07T16:56:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c55c005bfeeb201056e06c8ad849aebc2b94f92_5b9bd977-b437-4577-ba9e-f10fd2bfedb3.webp?v=1744016187","variant_ids":[43282374361187]},"available":true,"name":"iPhone 16 Pro Max CircularNext(MagSafe 兼容 \u0026 相機按鈕) - 北極灰","public_title":"北極灰","options":["北極灰"],"price":118000,"weight":0,"compare_at_price":null,"inventory_quantity":-6,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109647","featured_media":{"alt":null,"id":25469973528675,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c55c005bfeeb201056e06c8ad849aebc2b94f92_5b9bd977-b437-4577-ba9e-f10fd2bfedb3.webp?v=1744016187"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43282374393955,"title":"藻華綠","option1":"藻華綠","option2":null,"option3":null,"sku":"MNB013283Y","requires_shipping":true,"taxable":true,"featured_image":{"id":33681083105379,"product_id":7764443922531,"position":9,"created_at":"2025-04-07T16:56:27+08:00","updated_at":"2025-04-07T16:56:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ab91c71f153b4cfb3ba3dd7bfde84d49f286f_b8e1b04e-6458-464e-bd27-652e8552ad75.webp?v=1744016188","variant_ids":[43282374393955]},"available":true,"name":"iPhone 16 Pro Max CircularNext(MagSafe 兼容 \u0026 相機按鈕) - 藻華綠","public_title":"藻華綠","options":["藻華綠"],"price":118000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109661","featured_media":{"alt":null,"id":25469974085731,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ab91c71f153b4cfb3ba3dd7bfde84d49f286f_b8e1b04e-6458-464e-bd27-652e8552ad75.webp?v=1744016188"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43282374426723,"title":"珊瑚白","option1":"珊瑚白","option2":null,"option3":null,"sku":"MNB013283Z","requires_shipping":true,"taxable":true,"featured_image":{"id":33681083269219,"product_id":7764443922531,"position":10,"created_at":"2025-04-07T16:56:27+08:00","updated_at":"2025-04-07T16:56:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/755458f7c3565d006806795a43b13fb1e35e79ee_7b7761e4-753c-432e-a7ca-c49871105865.webp?v=1744016189","variant_ids":[43282374426723]},"available":true,"name":"iPhone 16 Pro Max CircularNext(MagSafe 兼容 \u0026 相機按鈕) - 珊瑚白","public_title":"珊瑚白","options":["珊瑚白"],"price":118000,"weight":0,"compare_at_price":null,"inventory_quantity":-1,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109678","featured_media":{"alt":null,"id":25469974216803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/755458f7c3565d006806795a43b13fb1e35e79ee_7b7761e4-753c-432e-a7ca-c49871105865.webp?v=1744016189"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fb17e23e9b30c39f1d35cdfb3204386a540508a_d8ec4bf5-89f1-4f46-8c0e-9552a46a7ff6.webp?v=1743558100","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/755458f7c3565d006806795a43b13fb1e35e79ee_db148b1b-471a-44a1-802e-a59e0fdc2665.webp?v=1743558101","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ab91c71f153b4cfb3ba3dd7bfde84d49f286f_cb716e62-bf66-472e-85f3-a3344ac4a647.webp?v=1743558102","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c55c005bfeeb201056e06c8ad849aebc2b94f92_5c5a13f4-6ede-44a4-9fc3-ef91b6af97ff.webp?v=1743558104","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6be8652fdeaf3ca2342366cb899d7d8620c18c2e_f3ad6d4b-84e3-4b05-b0ab-cbd3961d52df.webp?v=1743558105","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6be8652fdeaf3ca2342366cb899d7d8620c18c2e_252f6a81-0c97-43a0-812e-4bef095e287b.webp?v=1744016186","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c55c005bfeeb201056e06c8ad849aebc2b94f92_5b9bd977-b437-4577-ba9e-f10fd2bfedb3.webp?v=1744016187","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fb17e23e9b30c39f1d35cdfb3204386a540508a_e2d946b3-df41-44ef-93d5-e28fb83dfc59.webp?v=1744016187","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ab91c71f153b4cfb3ba3dd7bfde84d49f286f_b8e1b04e-6458-464e-bd27-652e8552ad75.webp?v=1744016188","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/755458f7c3565d006806795a43b13fb1e35e79ee_7b7761e4-753c-432e-a7ca-c49871105865.webp?v=1744016189"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fb17e23e9b30c39f1d35cdfb3204386a540508a_d8ec4bf5-89f1-4f46-8c0e-9552a46a7ff6.webp?v=1743558100","options":["color"],"media":[{"alt":null,"id":25457460314211,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fb17e23e9b30c39f1d35cdfb3204386a540508a_d8ec4bf5-89f1-4f46-8c0e-9552a46a7ff6.webp?v=1743558100"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fb17e23e9b30c39f1d35cdfb3204386a540508a_d8ec4bf5-89f1-4f46-8c0e-9552a46a7ff6.webp?v=1743558100","width":2000},{"alt":null,"id":25457460609123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/755458f7c3565d006806795a43b13fb1e35e79ee_db148b1b-471a-44a1-802e-a59e0fdc2665.webp?v=1743558101"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/755458f7c3565d006806795a43b13fb1e35e79ee_db148b1b-471a-44a1-802e-a59e0fdc2665.webp?v=1743558101","width":2000},{"alt":null,"id":25457460838499,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ab91c71f153b4cfb3ba3dd7bfde84d49f286f_cb716e62-bf66-472e-85f3-a3344ac4a647.webp?v=1743558102"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ab91c71f153b4cfb3ba3dd7bfde84d49f286f_cb716e62-bf66-472e-85f3-a3344ac4a647.webp?v=1743558102","width":2000},{"alt":null,"id":25457461067875,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c55c005bfeeb201056e06c8ad849aebc2b94f92_5c5a13f4-6ede-44a4-9fc3-ef91b6af97ff.webp?v=1743558104"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c55c005bfeeb201056e06c8ad849aebc2b94f92_5c5a13f4-6ede-44a4-9fc3-ef91b6af97ff.webp?v=1743558104","width":2000},{"alt":null,"id":25457461297251,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6be8652fdeaf3ca2342366cb899d7d8620c18c2e_f3ad6d4b-84e3-4b05-b0ab-cbd3961d52df.webp?v=1743558105"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6be8652fdeaf3ca2342366cb899d7d8620c18c2e_f3ad6d4b-84e3-4b05-b0ab-cbd3961d52df.webp?v=1743558105","width":2000},{"alt":null,"id":25469973037155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6be8652fdeaf3ca2342366cb899d7d8620c18c2e_252f6a81-0c97-43a0-812e-4bef095e287b.webp?v=1744016186"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6be8652fdeaf3ca2342366cb899d7d8620c18c2e_252f6a81-0c97-43a0-812e-4bef095e287b.webp?v=1744016186","width":2000},{"alt":null,"id":25469973528675,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c55c005bfeeb201056e06c8ad849aebc2b94f92_5b9bd977-b437-4577-ba9e-f10fd2bfedb3.webp?v=1744016187"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c55c005bfeeb201056e06c8ad849aebc2b94f92_5b9bd977-b437-4577-ba9e-f10fd2bfedb3.webp?v=1744016187","width":2000},{"alt":null,"id":25469973823587,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fb17e23e9b30c39f1d35cdfb3204386a540508a_e2d946b3-df41-44ef-93d5-e28fb83dfc59.webp?v=1744016187"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fb17e23e9b30c39f1d35cdfb3204386a540508a_e2d946b3-df41-44ef-93d5-e28fb83dfc59.webp?v=1744016187","width":2000},{"alt":null,"id":25469974085731,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ab91c71f153b4cfb3ba3dd7bfde84d49f286f_b8e1b04e-6458-464e-bd27-652e8552ad75.webp?v=1744016188"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ab91c71f153b4cfb3ba3dd7bfde84d49f286f_b8e1b04e-6458-464e-bd27-652e8552ad75.webp?v=1744016188","width":2000},{"alt":null,"id":25469974216803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/755458f7c3565d006806795a43b13fb1e35e79ee_7b7761e4-753c-432e-a7ca-c49871105865.webp?v=1744016189"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/755458f7c3565d006806795a43b13fb1e35e79ee_7b7761e4-753c-432e-a7ca-c49871105865.webp?v=1744016189","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43282374328419,"title":"海豚粉","option1":"海豚粉","option2":null,"option3":null,"sku":"MNB013283X","requires_shipping":true,"taxable":true,"featured_image":{"id":33681081827427,"product_id":7764443922531,"position":6,"created_at":"2025-04-07T16:56:24+08:00","updated_at":"2025-04-07T16:56:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6be8652fdeaf3ca2342366cb899d7d8620c18c2e_252f6a81-0c97-43a0-812e-4bef095e287b.webp?v=1744016186","variant_ids":[43282374328419]},"available":true,"name":"iPhone 16 Pro Max CircularNext(MagSafe 兼容 \u0026 相機按鈕) - 海豚粉","public_title":"海豚粉","options":["海豚粉"],"price":118000,"weight":0,"compare_at_price":null,"inventory_quantity":-2,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109654","featured_media":{"alt":null,"id":25469973037155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6be8652fdeaf3ca2342366cb899d7d8620c18c2e_252f6a81-0c97-43a0-812e-4bef095e287b.webp?v=1744016186"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43282374361187,"title":"北極灰","option1":"北極灰","option2":null,"option3":null,"sku":"MNB013283W","requires_shipping":true,"taxable":true,"featured_image":{"id":33681082384483,"product_id":7764443922531,"position":7,"created_at":"2025-04-07T16:56:25+08:00","updated_at":"2025-04-07T16:56:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c55c005bfeeb201056e06c8ad849aebc2b94f92_5b9bd977-b437-4577-ba9e-f10fd2bfedb3.webp?v=1744016187","variant_ids":[43282374361187]},"available":true,"name":"iPhone 16 Pro Max CircularNext(MagSafe 兼容 \u0026 相機按鈕) - 北極灰","public_title":"北極灰","options":["北極灰"],"price":118000,"weight":0,"compare_at_price":null,"inventory_quantity":-6,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109647","featured_media":{"alt":null,"id":25469973528675,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c55c005bfeeb201056e06c8ad849aebc2b94f92_5b9bd977-b437-4577-ba9e-f10fd2bfedb3.webp?v=1744016187"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43282374393955,"title":"藻華綠","option1":"藻華綠","option2":null,"option3":null,"sku":"MNB013283Y","requires_shipping":true,"taxable":true,"featured_image":{"id":33681083105379,"product_id":7764443922531,"position":9,"created_at":"2025-04-07T16:56:27+08:00","updated_at":"2025-04-07T16:56:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ab91c71f153b4cfb3ba3dd7bfde84d49f286f_b8e1b04e-6458-464e-bd27-652e8552ad75.webp?v=1744016188","variant_ids":[43282374393955]},"available":true,"name":"iPhone 16 Pro Max CircularNext(MagSafe 兼容 \u0026 相機按鈕) - 藻華綠","public_title":"藻華綠","options":["藻華綠"],"price":118000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109661","featured_media":{"alt":null,"id":25469974085731,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ab91c71f153b4cfb3ba3dd7bfde84d49f286f_b8e1b04e-6458-464e-bd27-652e8552ad75.webp?v=1744016188"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43282374426723,"title":"珊瑚白","option1":"珊瑚白","option2":null,"option3":null,"sku":"MNB013283Z","requires_shipping":true,"taxable":true,"featured_image":{"id":33681083269219,"product_id":7764443922531,"position":10,"created_at":"2025-04-07T16:56:27+08:00","updated_at":"2025-04-07T16:56:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/755458f7c3565d006806795a43b13fb1e35e79ee_7b7761e4-753c-432e-a7ca-c49871105865.webp?v=1744016189","variant_ids":[43282374426723]},"available":true,"name":"iPhone 16 Pro Max CircularNext(MagSafe 兼容 \u0026 相機按鈕) - 珊瑚白","public_title":"珊瑚白","options":["珊瑚白"],"price":118000,"weight":0,"compare_at_price":null,"inventory_quantity":-1,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109678","featured_media":{"alt":null,"id":25469974216803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/755458f7c3565d006806795a43b13fb1e35e79ee_7b7761e4-753c-432e-a7ca-c49871105865.webp?v=1744016189"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43282374328419,"title":"海豚粉","option1":"海豚粉","option2":null,"option3":null,"sku":"MNB013283X","requires_shipping":true,"taxable":true,"featured_image":{"id":33681081827427,"product_id":7764443922531,"position":6,"created_at":"2025-04-07T16:56:24+08:00","updated_at":"2025-04-07T16:56:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6be8652fdeaf3ca2342366cb899d7d8620c18c2e_252f6a81-0c97-43a0-812e-4bef095e287b.webp?v=1744016186","variant_ids":[43282374328419]},"available":true,"name":"iPhone 16 Pro Max CircularNext(MagSafe 兼容 \u0026 相機按鈕) - 海豚粉","public_title":"海豚粉","options":["海豚粉"],"price":118000,"weight":0,"compare_at_price":null,"inventory_quantity":-2,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109654","featured_media":{"alt":null,"id":25469973037155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6be8652fdeaf3ca2342366cb899d7d8620c18c2e_252f6a81-0c97-43a0-812e-4bef095e287b.webp?v=1744016186"}},"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: "停產" }