$product = {"id":7954134335587,"title":"iPhone 14 Pro Clear 布丁狗30週年 點點星光","handle":"iphone-14-pro-jellytint-rp12","description":null,"published_at":"2026-01-20T11:22:36+08:00","created_at":"2026-01-19T15:31:09+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-pompompurin-cinnamoroll","device-iPhone 14 Pro","merge","reseller-pompompurin-cinnamoroll"],"price":128000,"price_min":128000,"price_max":128000,"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":43957462270051,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012620G-RP12","requires_shipping":true,"taxable":true,"featured_image":{"id":36059851849827,"product_id":7954134335587,"position":10,"created_at":"2026-06-23T15:34:25+08:00","updated_at":"2026-06-23T15:34:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f_1616b560-dadc-4c27-b9e5-80af8d14ebf4.webp?v=1782200067","variant_ids":[43957462270051]},"available":true,"name":"iPhone 14 Pro Clear 布丁狗30週年 點點星光 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012620G-RP12","featured_media":{"alt":null,"id":27572698415203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f_1616b560-dadc-4c27-b9e5-80af8d14ebf4.webp?v=1782200067"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43957470625891,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012620J-RP12","requires_shipping":true,"taxable":true,"featured_image":{"id":36059852144739,"product_id":7954134335587,"position":12,"created_at":"2026-06-23T15:34:26+08:00","updated_at":"2026-06-23T15:34:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076_b8446904-6c4e-461d-86b4-218bbd60a199.webp?v=1782200068","variant_ids":[43957470625891]},"available":true,"name":"iPhone 14 Pro Clear 布丁狗30週年 點點星光 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012620J-RP12","featured_media":{"alt":null,"id":27572698710115,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076_b8446904-6c4e-461d-86b4-218bbd60a199.webp?v=1782200068"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43957470920803,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"CCN012620I-RP12","requires_shipping":true,"taxable":true,"featured_image":{"id":36059851587683,"product_id":7954134335587,"position":9,"created_at":"2026-06-23T15:34:24+08:00","updated_at":"2026-06-23T15:34:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5_a3214dfb-dc13-41b9-93fb-08053f06c603.webp?v=1782200066","variant_ids":[43957470920803]},"available":true,"name":"iPhone 14 Pro Clear 布丁狗30週年 點點星光 - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012620I-RP12","featured_media":{"alt":null,"id":27572698153059,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5_a3214dfb-dc13-41b9-93fb-08053f06c603.webp?v=1782200066"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43957471248483,"title":"Moody Green","option1":"Moody Green","option2":null,"option3":null,"sku":"CCN012620H-RP12","requires_shipping":true,"taxable":true,"featured_image":{"id":36059852013667,"product_id":7954134335587,"position":11,"created_at":"2026-06-23T15:34:25+08:00","updated_at":"2026-06-23T15:34:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851_037161c2-c85a-49f5-8531-f6d524f32437.webp?v=1782200067","variant_ids":[43957471248483]},"available":true,"name":"iPhone 14 Pro Clear 布丁狗30週年 點點星光 - Moody Green","public_title":"Moody Green","options":["Moody Green"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012620H-RP12","featured_media":{"alt":null,"id":27572698579043,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851_037161c2-c85a-49f5-8531-f6d524f32437.webp?v=1782200067"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076.webp?v=1768807887","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851.webp?v=1768807888","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f.webp?v=1768807889","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5.webp?v=1768807889","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851_bdb3ea74-554c-4035-b717-24048aefbffb.webp?v=1768814980","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076_589aa4c9-c982-451b-942c-c211b4e1a654.webp?v=1768814981","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f_88aa469b-9829-4833-bd6d-f43e90844d5e.webp?v=1768814982","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5_001d80b4-8b56-4295-99e2-0bd39ac495f8.webp?v=1768814982","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5_a3214dfb-dc13-41b9-93fb-08053f06c603.webp?v=1782200066","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f_1616b560-dadc-4c27-b9e5-80af8d14ebf4.webp?v=1782200067","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851_037161c2-c85a-49f5-8531-f6d524f32437.webp?v=1782200067","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076_b8446904-6c4e-461d-86b4-218bbd60a199.webp?v=1782200068"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076.webp?v=1768807887","options":["color"],"media":[{"alt":null,"id":26675818430563,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076.webp?v=1768807887"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076.webp?v=1768807887","width":2000},{"alt":null,"id":26675818627171,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851.webp?v=1768807888"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851.webp?v=1768807888","width":2000},{"alt":null,"id":26675818659939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f.webp?v=1768807889"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f.webp?v=1768807889","width":2000},{"alt":null,"id":26675818791011,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5.webp?v=1768807889"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5.webp?v=1768807889","width":2000},{"alt":null,"id":26676317716579,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851_bdb3ea74-554c-4035-b717-24048aefbffb.webp?v=1768814980"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851_bdb3ea74-554c-4035-b717-24048aefbffb.webp?v=1768814980","width":2000},{"alt":null,"id":26676317782115,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076_589aa4c9-c982-451b-942c-c211b4e1a654.webp?v=1768814981"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076_589aa4c9-c982-451b-942c-c211b4e1a654.webp?v=1768814981","width":2000},{"alt":null,"id":26676318109795,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f_88aa469b-9829-4833-bd6d-f43e90844d5e.webp?v=1768814982"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f_88aa469b-9829-4833-bd6d-f43e90844d5e.webp?v=1768814982","width":2000},{"alt":null,"id":26676318470243,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5_001d80b4-8b56-4295-99e2-0bd39ac495f8.webp?v=1768814982"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5_001d80b4-8b56-4295-99e2-0bd39ac495f8.webp?v=1768814982","width":2000},{"alt":null,"id":27572698153059,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5_a3214dfb-dc13-41b9-93fb-08053f06c603.webp?v=1782200066"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5_a3214dfb-dc13-41b9-93fb-08053f06c603.webp?v=1782200066","width":2000},{"alt":null,"id":27572698415203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f_1616b560-dadc-4c27-b9e5-80af8d14ebf4.webp?v=1782200067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f_1616b560-dadc-4c27-b9e5-80af8d14ebf4.webp?v=1782200067","width":2000},{"alt":null,"id":27572698579043,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851_037161c2-c85a-49f5-8531-f6d524f32437.webp?v=1782200067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851_037161c2-c85a-49f5-8531-f6d524f32437.webp?v=1782200067","width":2000},{"alt":null,"id":27572698710115,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076_b8446904-6c4e-461d-86b4-218bbd60a199.webp?v=1782200068"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076_b8446904-6c4e-461d-86b4-218bbd60a199.webp?v=1782200068","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43957462270051,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012620G-RP12","requires_shipping":true,"taxable":true,"featured_image":{"id":36059851849827,"product_id":7954134335587,"position":10,"created_at":"2026-06-23T15:34:25+08:00","updated_at":"2026-06-23T15:34:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f_1616b560-dadc-4c27-b9e5-80af8d14ebf4.webp?v=1782200067","variant_ids":[43957462270051]},"available":true,"name":"iPhone 14 Pro Clear 布丁狗30週年 點點星光 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012620G-RP12","featured_media":{"alt":null,"id":27572698415203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f_1616b560-dadc-4c27-b9e5-80af8d14ebf4.webp?v=1782200067"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43957470625891,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012620J-RP12","requires_shipping":true,"taxable":true,"featured_image":{"id":36059852144739,"product_id":7954134335587,"position":12,"created_at":"2026-06-23T15:34:26+08:00","updated_at":"2026-06-23T15:34:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076_b8446904-6c4e-461d-86b4-218bbd60a199.webp?v=1782200068","variant_ids":[43957470625891]},"available":true,"name":"iPhone 14 Pro Clear 布丁狗30週年 點點星光 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012620J-RP12","featured_media":{"alt":null,"id":27572698710115,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35dd6477536ad77050c41ea52f020e978ec2076_b8446904-6c4e-461d-86b4-218bbd60a199.webp?v=1782200068"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43957470920803,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"CCN012620I-RP12","requires_shipping":true,"taxable":true,"featured_image":{"id":36059851587683,"product_id":7954134335587,"position":9,"created_at":"2026-06-23T15:34:24+08:00","updated_at":"2026-06-23T15:34:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5_a3214dfb-dc13-41b9-93fb-08053f06c603.webp?v=1782200066","variant_ids":[43957470920803]},"available":true,"name":"iPhone 14 Pro Clear 布丁狗30週年 點點星光 - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012620I-RP12","featured_media":{"alt":null,"id":27572698153059,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a199a7fd4f5df51788954e97524cbb85256ca5_a3214dfb-dc13-41b9-93fb-08053f06c603.webp?v=1782200066"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43957471248483,"title":"Moody Green","option1":"Moody Green","option2":null,"option3":null,"sku":"CCN012620H-RP12","requires_shipping":true,"taxable":true,"featured_image":{"id":36059852013667,"product_id":7954134335587,"position":11,"created_at":"2026-06-23T15:34:25+08:00","updated_at":"2026-06-23T15:34:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851_037161c2-c85a-49f5-8531-f6d524f32437.webp?v=1782200067","variant_ids":[43957471248483]},"available":true,"name":"iPhone 14 Pro Clear 布丁狗30週年 點點星光 - Moody Green","public_title":"Moody Green","options":["Moody Green"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012620H-RP12","featured_media":{"alt":null,"id":27572698579043,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17231cf20197bd0a1a67115859329aaeb4183851_037161c2-c85a-49f5-8531-f6d524f32437.webp?v=1782200067"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43957462270051,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012620G-RP12","requires_shipping":true,"taxable":true,"featured_image":{"id":36059851849827,"product_id":7954134335587,"position":10,"created_at":"2026-06-23T15:34:25+08:00","updated_at":"2026-06-23T15:34:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f_1616b560-dadc-4c27-b9e5-80af8d14ebf4.webp?v=1782200067","variant_ids":[43957462270051]},"available":true,"name":"iPhone 14 Pro Clear 布丁狗30週年 點點星光 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012620G-RP12","featured_media":{"alt":null,"id":27572698415203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444c9112673b01ec04dd78a6f7eb74179db6c11f_1616b560-dadc-4c27-b9e5-80af8d14ebf4.webp?v=1782200067"}},"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: "停產" }