$product = {"id":7921982013539,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 橙香貓","handle":"iphone-12-pro-mod-nx-magsafe-toc07","description":null,"published_at":"2025-11-14T08:18:43+08:00","created_at":"2025-11-13T10:23:44+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-tocorocomugi","device-iPhone 12 Pro","merge","reseller-tocorocomugi"],"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":43834781761635,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-TOC07","requires_shipping":true,"taxable":true,"featured_image":{"id":34794197188707,"product_id":7921982013539,"position":9,"created_at":"2025-11-13T10:23:53+08:00","updated_at":"2025-11-13T10:23:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b1cb4021cea6c651915d29702b09c5536a4244.webp?v=1763000635","variant_ids":[43834781761635]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 橙香貓 - 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-TOC07","featured_media":{"alt":null,"id":26359616667747,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b1cb4021cea6c651915d29702b09c5536a4244.webp?v=1763000635"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834785005667,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-TOC07","requires_shipping":true,"taxable":true,"featured_image":{"id":34794195877987,"product_id":7921982013539,"position":2,"created_at":"2025-11-13T10:23:48+08:00","updated_at":"2025-11-13T10:23:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfa6253aa823967117961781383efc448c86ea8.webp?v=1763000630","variant_ids":[43834785005667]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 橙香貓 - 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-TOC07","featured_media":{"alt":null,"id":26359615291491,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfa6253aa823967117961781383efc448c86ea8.webp?v=1763000630"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834785038435,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-TOC07","requires_shipping":true,"taxable":true,"featured_image":{"id":34794196205667,"product_id":7921982013539,"position":4,"created_at":"2025-11-13T10:23:50+08:00","updated_at":"2025-11-13T10:23:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bfddcb28676db00f9da09e8cd33f7805b9b014c.webp?v=1763000632","variant_ids":[43834785038435]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 橙香貓 - 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-TOC07","featured_media":{"alt":null,"id":26359615783011,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bfddcb28676db00f9da09e8cd33f7805b9b014c.webp?v=1763000632"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834785136739,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-TOC07","requires_shipping":true,"taxable":true,"featured_image":{"id":34794196762723,"product_id":7921982013539,"position":7,"created_at":"2025-11-13T10:23:52+08:00","updated_at":"2025-11-13T10:23:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a5a14050affd7e438296426f4eeb2497d2cc6b.webp?v=1763000634","variant_ids":[43834785136739]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 橙香貓 - 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-TOC07","featured_media":{"alt":null,"id":26359616241763,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a5a14050affd7e438296426f4eeb2497d2cc6b.webp?v=1763000634"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834785169507,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-TOC07","requires_shipping":true,"taxable":true,"featured_image":{"id":34794197483619,"product_id":7921982013539,"position":11,"created_at":"2025-11-13T10:23:54+08:00","updated_at":"2025-11-13T10:23:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4f99f3b04849fd45df2d5e764f5c8aefc4e5d58.webp?v=1763000636","variant_ids":[43834785169507]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 橙香貓 - 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-TOC07","featured_media":{"alt":null,"id":26359616962659,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4f99f3b04849fd45df2d5e764f5c8aefc4e5d58.webp?v=1763000636"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e36e6ecb94bb90999f1701b0835368fdb5171088.webp?v=1763000629","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfa6253aa823967117961781383efc448c86ea8.webp?v=1763000630","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a763879bd2f3940ce027291914ad358c66310c0.webp?v=1763000631","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bfddcb28676db00f9da09e8cd33f7805b9b014c.webp?v=1763000632","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8b71a4532c0a1169338f002d9f1d9be72da621f.webp?v=1763000632","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2283a0f26d809782dec3927e4f2fe9000ac8e39.webp?v=1763000633","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a5a14050affd7e438296426f4eeb2497d2cc6b.webp?v=1763000634","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18cb49c16ed108e09690a7c1bb9e73c1a3a5e982.webp?v=1763000634","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b1cb4021cea6c651915d29702b09c5536a4244.webp?v=1763000635","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66670a842539c8c590f5749ab66c1aa1a7c7e429.webp?v=1763000636","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4f99f3b04849fd45df2d5e764f5c8aefc4e5d58.webp?v=1763000636"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e36e6ecb94bb90999f1701b0835368fdb5171088.webp?v=1763000629","options":["color"],"media":[{"alt":null,"id":26359615193187,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e36e6ecb94bb90999f1701b0835368fdb5171088.webp?v=1763000629"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e36e6ecb94bb90999f1701b0835368fdb5171088.webp?v=1763000629","width":2000},{"alt":null,"id":26359615291491,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfa6253aa823967117961781383efc448c86ea8.webp?v=1763000630"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfa6253aa823967117961781383efc448c86ea8.webp?v=1763000630","width":2000},{"alt":null,"id":26359615488099,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a763879bd2f3940ce027291914ad358c66310c0.webp?v=1763000631"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a763879bd2f3940ce027291914ad358c66310c0.webp?v=1763000631","width":2000},{"alt":null,"id":26359615783011,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bfddcb28676db00f9da09e8cd33f7805b9b014c.webp?v=1763000632"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bfddcb28676db00f9da09e8cd33f7805b9b014c.webp?v=1763000632","width":2000},{"alt":null,"id":26359615946851,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8b71a4532c0a1169338f002d9f1d9be72da621f.webp?v=1763000632"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8b71a4532c0a1169338f002d9f1d9be72da621f.webp?v=1763000632","width":2000},{"alt":null,"id":26359616045155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2283a0f26d809782dec3927e4f2fe9000ac8e39.webp?v=1763000633"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2283a0f26d809782dec3927e4f2fe9000ac8e39.webp?v=1763000633","width":2000},{"alt":null,"id":26359616241763,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a5a14050affd7e438296426f4eeb2497d2cc6b.webp?v=1763000634"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a5a14050affd7e438296426f4eeb2497d2cc6b.webp?v=1763000634","width":2000},{"alt":null,"id":26359616438371,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18cb49c16ed108e09690a7c1bb9e73c1a3a5e982.webp?v=1763000634"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18cb49c16ed108e09690a7c1bb9e73c1a3a5e982.webp?v=1763000634","width":2000},{"alt":null,"id":26359616667747,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b1cb4021cea6c651915d29702b09c5536a4244.webp?v=1763000635"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b1cb4021cea6c651915d29702b09c5536a4244.webp?v=1763000635","width":2000},{"alt":null,"id":26359616798819,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66670a842539c8c590f5749ab66c1aa1a7c7e429.webp?v=1763000636"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66670a842539c8c590f5749ab66c1aa1a7c7e429.webp?v=1763000636","width":2000},{"alt":null,"id":26359616962659,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4f99f3b04849fd45df2d5e764f5c8aefc4e5d58.webp?v=1763000636"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4f99f3b04849fd45df2d5e764f5c8aefc4e5d58.webp?v=1763000636","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43834781761635,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-TOC07","requires_shipping":true,"taxable":true,"featured_image":{"id":34794197188707,"product_id":7921982013539,"position":9,"created_at":"2025-11-13T10:23:53+08:00","updated_at":"2025-11-13T10:23:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b1cb4021cea6c651915d29702b09c5536a4244.webp?v=1763000635","variant_ids":[43834781761635]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 橙香貓 - 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-TOC07","featured_media":{"alt":null,"id":26359616667747,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b1cb4021cea6c651915d29702b09c5536a4244.webp?v=1763000635"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834785005667,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-TOC07","requires_shipping":true,"taxable":true,"featured_image":{"id":34794195877987,"product_id":7921982013539,"position":2,"created_at":"2025-11-13T10:23:48+08:00","updated_at":"2025-11-13T10:23:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfa6253aa823967117961781383efc448c86ea8.webp?v=1763000630","variant_ids":[43834785005667]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 橙香貓 - 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-TOC07","featured_media":{"alt":null,"id":26359615291491,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfa6253aa823967117961781383efc448c86ea8.webp?v=1763000630"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834785038435,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-TOC07","requires_shipping":true,"taxable":true,"featured_image":{"id":34794196205667,"product_id":7921982013539,"position":4,"created_at":"2025-11-13T10:23:50+08:00","updated_at":"2025-11-13T10:23:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bfddcb28676db00f9da09e8cd33f7805b9b014c.webp?v=1763000632","variant_ids":[43834785038435]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 橙香貓 - 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-TOC07","featured_media":{"alt":null,"id":26359615783011,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bfddcb28676db00f9da09e8cd33f7805b9b014c.webp?v=1763000632"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834785136739,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-TOC07","requires_shipping":true,"taxable":true,"featured_image":{"id":34794196762723,"product_id":7921982013539,"position":7,"created_at":"2025-11-13T10:23:52+08:00","updated_at":"2025-11-13T10:23:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a5a14050affd7e438296426f4eeb2497d2cc6b.webp?v=1763000634","variant_ids":[43834785136739]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 橙香貓 - 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-TOC07","featured_media":{"alt":null,"id":26359616241763,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a5a14050affd7e438296426f4eeb2497d2cc6b.webp?v=1763000634"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43834785169507,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-TOC07","requires_shipping":true,"taxable":true,"featured_image":{"id":34794197483619,"product_id":7921982013539,"position":11,"created_at":"2025-11-13T10:23:54+08:00","updated_at":"2025-11-13T10:23:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4f99f3b04849fd45df2d5e764f5c8aefc4e5d58.webp?v=1763000636","variant_ids":[43834785169507]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 橙香貓 - 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-TOC07","featured_media":{"alt":null,"id":26359616962659,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4f99f3b04849fd45df2d5e764f5c8aefc4e5d58.webp?v=1763000636"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43834781761635,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-TOC07","requires_shipping":true,"taxable":true,"featured_image":{"id":34794197188707,"product_id":7921982013539,"position":9,"created_at":"2025-11-13T10:23:53+08:00","updated_at":"2025-11-13T10:23:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b1cb4021cea6c651915d29702b09c5536a4244.webp?v=1763000635","variant_ids":[43834781761635]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) TOCOROCOMUGI 橙香貓 - 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-TOC07","featured_media":{"alt":null,"id":26359616667747,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b1cb4021cea6c651915d29702b09c5536a4244.webp?v=1763000635"}},"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: "停產" }