$product = {"id":7892722090083,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Take Ivy","handle":"iphone-12-pro-mod-nx-magsafe-printable-aar09","description":null,"published_at":"2025-10-03T09:34:06+08:00","created_at":"2025-10-02T10:20:22+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-aaronchang","device-iPhone 12 Pro","merge","reseller-aaronchang"],"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":43756904710243,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543960359011,"product_id":7892722090083,"position":6,"created_at":"2025-10-02T10:20:26+08:00","updated_at":"2025-10-02T10:20:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4d8db6f4ceec9ffbd79f275739f2cf69e0c16a1.webp?v=1759371628","variant_ids":[43756904710243]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Take Ivy - Lavender","public_title":"Lavender","options":["Lavender"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185C1-AAR09","featured_media":{"alt":null,"id":26113715241059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4d8db6f4ceec9ffbd79f275739f2cf69e0c16a1.webp?v=1759371628"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756907888739,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543961276515,"product_id":7892722090083,"position":11,"created_at":"2025-10-02T10:20:30+08:00","updated_at":"2025-10-02T10:20:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18f986608f8084556f8d00c011ab8a1491e6ae54.webp?v=1759371632","variant_ids":[43756907888739]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Take Ivy - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185J5-AAR09","featured_media":{"alt":null,"id":26113716158563,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18f986608f8084556f8d00c011ab8a1491e6ae54.webp?v=1759371632"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756907921507,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543959310435,"product_id":7892722090083,"position":1,"created_at":"2025-10-02T10:20:23+08:00","updated_at":"2025-10-02T10:20:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b3d34ac0edc209d7f781f32996d800888474089.webp?v=1759371625","variant_ids":[43756907921507]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Take Ivy - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118504-AAR09","featured_media":{"alt":null,"id":26113714192483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b3d34ac0edc209d7f781f32996d800888474089.webp?v=1759371625"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756907987043,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543961145443,"product_id":7892722090083,"position":10,"created_at":"2025-10-02T10:20:29+08:00","updated_at":"2025-10-02T10:20:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1386d442ccf1ba3016c0b2f087112d002b97e2e.webp?v=1759371631","variant_ids":[43756907987043]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Take Ivy - Graphite","public_title":"Graphite","options":["Graphite"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118569-AAR09","featured_media":{"alt":null,"id":26113716027491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1386d442ccf1ba3016c0b2f087112d002b97e2e.webp?v=1759371631"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756908118115,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543960195171,"product_id":7892722090083,"position":5,"created_at":"2025-10-02T10:20:26+08:00","updated_at":"2025-10-02T10:20:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90840eefe494851fdbba262a00fd594bf9c05458.webp?v=1759371628","variant_ids":[43756908118115]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Take Ivy - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118524-AAR09","featured_media":{"alt":null,"id":26113715077219,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90840eefe494851fdbba262a00fd594bf9c05458.webp?v=1759371628"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b3d34ac0edc209d7f781f32996d800888474089.webp?v=1759371625","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d26c90ce86f492d7ad2aaa757db3535654e1ffda.webp?v=1759371626","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8fe1cedec35e2a13a46a192d28551dd46dabb07.webp?v=1759371627","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/600a74508807b156525f7737b70349e5277b5a61.webp?v=1759371627","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90840eefe494851fdbba262a00fd594bf9c05458.webp?v=1759371628","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4d8db6f4ceec9ffbd79f275739f2cf69e0c16a1.webp?v=1759371628","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2821cc0743d511375fb49aeeaf78831f9079b674.webp?v=1759371629","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ac8d81929c5dab8de5f666ce8b6f6fa930c8090.webp?v=1759371630","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d47e4aa1c27470234aa6c25a27e032c925a82339.webp?v=1759371631","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1386d442ccf1ba3016c0b2f087112d002b97e2e.webp?v=1759371631","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18f986608f8084556f8d00c011ab8a1491e6ae54.webp?v=1759371632"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b3d34ac0edc209d7f781f32996d800888474089.webp?v=1759371625","options":["color"],"media":[{"alt":null,"id":26113714192483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b3d34ac0edc209d7f781f32996d800888474089.webp?v=1759371625"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b3d34ac0edc209d7f781f32996d800888474089.webp?v=1759371625","width":2000},{"alt":null,"id":26113714454627,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d26c90ce86f492d7ad2aaa757db3535654e1ffda.webp?v=1759371626"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d26c90ce86f492d7ad2aaa757db3535654e1ffda.webp?v=1759371626","width":2000},{"alt":null,"id":26113714684003,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8fe1cedec35e2a13a46a192d28551dd46dabb07.webp?v=1759371627"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8fe1cedec35e2a13a46a192d28551dd46dabb07.webp?v=1759371627","width":2000},{"alt":null,"id":26113714880611,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/600a74508807b156525f7737b70349e5277b5a61.webp?v=1759371627"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/600a74508807b156525f7737b70349e5277b5a61.webp?v=1759371627","width":2000},{"alt":null,"id":26113715077219,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90840eefe494851fdbba262a00fd594bf9c05458.webp?v=1759371628"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90840eefe494851fdbba262a00fd594bf9c05458.webp?v=1759371628","width":2000},{"alt":null,"id":26113715241059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4d8db6f4ceec9ffbd79f275739f2cf69e0c16a1.webp?v=1759371628"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4d8db6f4ceec9ffbd79f275739f2cf69e0c16a1.webp?v=1759371628","width":2000},{"alt":null,"id":26113715404899,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2821cc0743d511375fb49aeeaf78831f9079b674.webp?v=1759371629"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2821cc0743d511375fb49aeeaf78831f9079b674.webp?v=1759371629","width":2000},{"alt":null,"id":26113715634275,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ac8d81929c5dab8de5f666ce8b6f6fa930c8090.webp?v=1759371630"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ac8d81929c5dab8de5f666ce8b6f6fa930c8090.webp?v=1759371630","width":2000},{"alt":null,"id":26113715798115,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d47e4aa1c27470234aa6c25a27e032c925a82339.webp?v=1759371631"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d47e4aa1c27470234aa6c25a27e032c925a82339.webp?v=1759371631","width":2000},{"alt":null,"id":26113716027491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1386d442ccf1ba3016c0b2f087112d002b97e2e.webp?v=1759371631"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1386d442ccf1ba3016c0b2f087112d002b97e2e.webp?v=1759371631","width":2000},{"alt":null,"id":26113716158563,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18f986608f8084556f8d00c011ab8a1491e6ae54.webp?v=1759371632"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18f986608f8084556f8d00c011ab8a1491e6ae54.webp?v=1759371632","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43756904710243,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543960359011,"product_id":7892722090083,"position":6,"created_at":"2025-10-02T10:20:26+08:00","updated_at":"2025-10-02T10:20:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4d8db6f4ceec9ffbd79f275739f2cf69e0c16a1.webp?v=1759371628","variant_ids":[43756904710243]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Take Ivy - Lavender","public_title":"Lavender","options":["Lavender"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185C1-AAR09","featured_media":{"alt":null,"id":26113715241059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4d8db6f4ceec9ffbd79f275739f2cf69e0c16a1.webp?v=1759371628"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756907888739,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543961276515,"product_id":7892722090083,"position":11,"created_at":"2025-10-02T10:20:30+08:00","updated_at":"2025-10-02T10:20:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18f986608f8084556f8d00c011ab8a1491e6ae54.webp?v=1759371632","variant_ids":[43756907888739]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Take Ivy - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185J5-AAR09","featured_media":{"alt":null,"id":26113716158563,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18f986608f8084556f8d00c011ab8a1491e6ae54.webp?v=1759371632"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756907921507,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543959310435,"product_id":7892722090083,"position":1,"created_at":"2025-10-02T10:20:23+08:00","updated_at":"2025-10-02T10:20:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b3d34ac0edc209d7f781f32996d800888474089.webp?v=1759371625","variant_ids":[43756907921507]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Take Ivy - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118504-AAR09","featured_media":{"alt":null,"id":26113714192483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b3d34ac0edc209d7f781f32996d800888474089.webp?v=1759371625"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756907987043,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543961145443,"product_id":7892722090083,"position":10,"created_at":"2025-10-02T10:20:29+08:00","updated_at":"2025-10-02T10:20:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1386d442ccf1ba3016c0b2f087112d002b97e2e.webp?v=1759371631","variant_ids":[43756907987043]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Take Ivy - Graphite","public_title":"Graphite","options":["Graphite"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118569-AAR09","featured_media":{"alt":null,"id":26113716027491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1386d442ccf1ba3016c0b2f087112d002b97e2e.webp?v=1759371631"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756908118115,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543960195171,"product_id":7892722090083,"position":5,"created_at":"2025-10-02T10:20:26+08:00","updated_at":"2025-10-02T10:20:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90840eefe494851fdbba262a00fd594bf9c05458.webp?v=1759371628","variant_ids":[43756908118115]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Take Ivy - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118524-AAR09","featured_media":{"alt":null,"id":26113715077219,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90840eefe494851fdbba262a00fd594bf9c05458.webp?v=1759371628"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43756904710243,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543960359011,"product_id":7892722090083,"position":6,"created_at":"2025-10-02T10:20:26+08:00","updated_at":"2025-10-02T10:20:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4d8db6f4ceec9ffbd79f275739f2cf69e0c16a1.webp?v=1759371628","variant_ids":[43756904710243]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Take Ivy - Lavender","public_title":"Lavender","options":["Lavender"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185C1-AAR09","featured_media":{"alt":null,"id":26113715241059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4d8db6f4ceec9ffbd79f275739f2cf69e0c16a1.webp?v=1759371628"}},"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: "停產" }