$product = {"id":7876009689187,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 奧樂雞 OLOGY 花路展開","handle":"iphone-12-pro-mod-nx-magsafe-printable-eb79","description":null,"published_at":"2025-09-04T10:32:47+08:00","created_at":"2025-09-03T11:36:29+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-byebyechuchu","device-iPhone 12 Pro","merge","reseller-byebyechuchu"],"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":43674950762595,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-EB79","requires_shipping":true,"taxable":true,"featured_image":{"id":34415998042211,"product_id":7876009689187,"position":3,"created_at":"2025-09-03T11:36:36+08:00","updated_at":"2025-09-03T11:36:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a55cd0e6331a9c90cc9faa8bed70796be8467c37.webp?v=1756870598","variant_ids":[43674950762595]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 奧樂雞 OLOGY 花路展開 - 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-EB79","featured_media":{"alt":null,"id":25988272848995,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a55cd0e6331a9c90cc9faa8bed70796be8467c37.webp?v=1756870598"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43674954301539,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-EB79","requires_shipping":true,"taxable":true,"featured_image":{"id":34415999058019,"product_id":7876009689187,"position":8,"created_at":"2025-09-03T11:36:40+08:00","updated_at":"2025-09-03T11:36:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5d358235c9e1317fb589f385c246469d972ca0f.webp?v=1756870602","variant_ids":[43674954301539]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 奧樂雞 OLOGY 花路展開 - 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-EB79","featured_media":{"alt":null,"id":25988273832035,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5d358235c9e1317fb589f385c246469d972ca0f.webp?v=1756870602"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43674954367075,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-EB79","requires_shipping":true,"taxable":true,"featured_image":{"id":34415997419619,"product_id":7876009689187,"position":1,"created_at":"2025-09-03T11:36:35+08:00","updated_at":"2025-09-03T11:36:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e219d58e29cdfa43f38cc4161e1470b83450d6e7.webp?v=1756870597","variant_ids":[43674954367075]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 奧樂雞 OLOGY 花路展開 - 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-EB79","featured_media":{"alt":null,"id":25988272226403,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e219d58e29cdfa43f38cc4161e1470b83450d6e7.webp?v=1756870597"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43674954465379,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-EB79","requires_shipping":true,"taxable":true,"featured_image":{"id":34415997845603,"product_id":7876009689187,"position":2,"created_at":"2025-09-03T11:36:36+08:00","updated_at":"2025-09-03T11:36:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c55495db61253d53ddb7c9fe6284517c248c632d.webp?v=1756870598","variant_ids":[43674954465379]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 奧樂雞 OLOGY 花路展開 - 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-EB79","featured_media":{"alt":null,"id":25988272652387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c55495db61253d53ddb7c9fe6284517c248c632d.webp?v=1756870598"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43674954563683,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-EB79","requires_shipping":true,"taxable":true,"featured_image":{"id":34415998861411,"product_id":7876009689187,"position":7,"created_at":"2025-09-03T11:36:39+08:00","updated_at":"2025-09-03T11:36:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc3ae8bfeeef2662b8e7a60a25f253043caa15c2.webp?v=1756870601","variant_ids":[43674954563683]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 奧樂雞 OLOGY 花路展開 - 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-EB79","featured_media":{"alt":null,"id":25988273700963,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc3ae8bfeeef2662b8e7a60a25f253043caa15c2.webp?v=1756870601"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e219d58e29cdfa43f38cc4161e1470b83450d6e7.webp?v=1756870597","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c55495db61253d53ddb7c9fe6284517c248c632d.webp?v=1756870598","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a55cd0e6331a9c90cc9faa8bed70796be8467c37.webp?v=1756870598","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0bef2631245dcd20da31d3f380c21daae463063.webp?v=1756870599","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da345cf70e393343937bd4bb7083f67b80da7dec.webp?v=1756870600","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9fc0e8b8a9f5926537beca54e7d40ab8f00a5d.webp?v=1756870601","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc3ae8bfeeef2662b8e7a60a25f253043caa15c2.webp?v=1756870601","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5d358235c9e1317fb589f385c246469d972ca0f.webp?v=1756870602","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f7ebf9950df6be5c69ec6cc27e0be0bccb24bec.webp?v=1756870603","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d64be77a94b06682b63c6ba971b92f6605d15af7.webp?v=1756870603","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1441093641f17a7469ba155d3b75d4067b0d445c.webp?v=1756870604"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e219d58e29cdfa43f38cc4161e1470b83450d6e7.webp?v=1756870597","options":["color"],"media":[{"alt":null,"id":25988272226403,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e219d58e29cdfa43f38cc4161e1470b83450d6e7.webp?v=1756870597"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e219d58e29cdfa43f38cc4161e1470b83450d6e7.webp?v=1756870597","width":2000},{"alt":null,"id":25988272652387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c55495db61253d53ddb7c9fe6284517c248c632d.webp?v=1756870598"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c55495db61253d53ddb7c9fe6284517c248c632d.webp?v=1756870598","width":2000},{"alt":null,"id":25988272848995,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a55cd0e6331a9c90cc9faa8bed70796be8467c37.webp?v=1756870598"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a55cd0e6331a9c90cc9faa8bed70796be8467c37.webp?v=1756870598","width":2000},{"alt":null,"id":25988273045603,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0bef2631245dcd20da31d3f380c21daae463063.webp?v=1756870599"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0bef2631245dcd20da31d3f380c21daae463063.webp?v=1756870599","width":2000},{"alt":null,"id":25988273274979,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da345cf70e393343937bd4bb7083f67b80da7dec.webp?v=1756870600"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da345cf70e393343937bd4bb7083f67b80da7dec.webp?v=1756870600","width":2000},{"alt":null,"id":25988273406051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9fc0e8b8a9f5926537beca54e7d40ab8f00a5d.webp?v=1756870601"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9fc0e8b8a9f5926537beca54e7d40ab8f00a5d.webp?v=1756870601","width":2000},{"alt":null,"id":25988273700963,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc3ae8bfeeef2662b8e7a60a25f253043caa15c2.webp?v=1756870601"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc3ae8bfeeef2662b8e7a60a25f253043caa15c2.webp?v=1756870601","width":2000},{"alt":null,"id":25988273832035,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5d358235c9e1317fb589f385c246469d972ca0f.webp?v=1756870602"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5d358235c9e1317fb589f385c246469d972ca0f.webp?v=1756870602","width":2000},{"alt":null,"id":25988273995875,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f7ebf9950df6be5c69ec6cc27e0be0bccb24bec.webp?v=1756870603"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f7ebf9950df6be5c69ec6cc27e0be0bccb24bec.webp?v=1756870603","width":2000},{"alt":null,"id":25988274159715,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d64be77a94b06682b63c6ba971b92f6605d15af7.webp?v=1756870603"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d64be77a94b06682b63c6ba971b92f6605d15af7.webp?v=1756870603","width":2000},{"alt":null,"id":25988274258019,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1441093641f17a7469ba155d3b75d4067b0d445c.webp?v=1756870604"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1441093641f17a7469ba155d3b75d4067b0d445c.webp?v=1756870604","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43674950762595,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-EB79","requires_shipping":true,"taxable":true,"featured_image":{"id":34415998042211,"product_id":7876009689187,"position":3,"created_at":"2025-09-03T11:36:36+08:00","updated_at":"2025-09-03T11:36:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a55cd0e6331a9c90cc9faa8bed70796be8467c37.webp?v=1756870598","variant_ids":[43674950762595]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 奧樂雞 OLOGY 花路展開 - 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-EB79","featured_media":{"alt":null,"id":25988272848995,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a55cd0e6331a9c90cc9faa8bed70796be8467c37.webp?v=1756870598"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43674954301539,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-EB79","requires_shipping":true,"taxable":true,"featured_image":{"id":34415999058019,"product_id":7876009689187,"position":8,"created_at":"2025-09-03T11:36:40+08:00","updated_at":"2025-09-03T11:36:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5d358235c9e1317fb589f385c246469d972ca0f.webp?v=1756870602","variant_ids":[43674954301539]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 奧樂雞 OLOGY 花路展開 - 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-EB79","featured_media":{"alt":null,"id":25988273832035,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5d358235c9e1317fb589f385c246469d972ca0f.webp?v=1756870602"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43674954367075,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-EB79","requires_shipping":true,"taxable":true,"featured_image":{"id":34415997419619,"product_id":7876009689187,"position":1,"created_at":"2025-09-03T11:36:35+08:00","updated_at":"2025-09-03T11:36:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e219d58e29cdfa43f38cc4161e1470b83450d6e7.webp?v=1756870597","variant_ids":[43674954367075]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 奧樂雞 OLOGY 花路展開 - 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-EB79","featured_media":{"alt":null,"id":25988272226403,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e219d58e29cdfa43f38cc4161e1470b83450d6e7.webp?v=1756870597"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43674954465379,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-EB79","requires_shipping":true,"taxable":true,"featured_image":{"id":34415997845603,"product_id":7876009689187,"position":2,"created_at":"2025-09-03T11:36:36+08:00","updated_at":"2025-09-03T11:36:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c55495db61253d53ddb7c9fe6284517c248c632d.webp?v=1756870598","variant_ids":[43674954465379]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 奧樂雞 OLOGY 花路展開 - 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-EB79","featured_media":{"alt":null,"id":25988272652387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c55495db61253d53ddb7c9fe6284517c248c632d.webp?v=1756870598"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43674954563683,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-EB79","requires_shipping":true,"taxable":true,"featured_image":{"id":34415998861411,"product_id":7876009689187,"position":7,"created_at":"2025-09-03T11:36:39+08:00","updated_at":"2025-09-03T11:36:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc3ae8bfeeef2662b8e7a60a25f253043caa15c2.webp?v=1756870601","variant_ids":[43674954563683]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 奧樂雞 OLOGY 花路展開 - 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-EB79","featured_media":{"alt":null,"id":25988273700963,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc3ae8bfeeef2662b8e7a60a25f253043caa15c2.webp?v=1756870601"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43674950762595,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-EB79","requires_shipping":true,"taxable":true,"featured_image":{"id":34415998042211,"product_id":7876009689187,"position":3,"created_at":"2025-09-03T11:36:36+08:00","updated_at":"2025-09-03T11:36:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a55cd0e6331a9c90cc9faa8bed70796be8467c37.webp?v=1756870598","variant_ids":[43674950762595]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 奧樂雞 OLOGY 花路展開 - 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-EB79","featured_media":{"alt":null,"id":25988272848995,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a55cd0e6331a9c90cc9faa8bed70796be8467c37.webp?v=1756870598"}},"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: "停產" }