$product = {"id":7920656547939,"title":"iPhone 15 Plus SolidX 咒術迴戰 懷玉・玉折角色系列-夏油傑","handle":"iphone-15-plus-solidx-ptt07","description":null,"published_at":"2025-11-10T16:15:41+08:00","created_at":"2025-11-10T16:05:59+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jujutsu-kaisen","device-iPhone 15 Plus","merge","reseller-jujutsu-kaisen"],"price":125000,"price_min":125000,"price_max":125000,"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":43829331034211,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012960B-PTT07","requires_shipping":true,"taxable":true,"featured_image":{"id":36125151068259,"product_id":7920656547939,"position":18,"created_at":"2026-06-29T15:42:37+08:00","updated_at":"2026-06-29T15:42:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_5f185570-8fc4-461d-acf9-7d0e1ecc3078.webp?v=1782718959","variant_ids":[43829331034211]},"available":true,"name":"iPhone 15 Plus SolidX 咒術迴戰 懷玉・玉折角色系列-夏油傑 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST012960B-PTT07","featured_media":{"alt":null,"id":27630393852003,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_5f185570-8fc4-461d-acf9-7d0e1ecc3078.webp?v=1782718959"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43829334114403,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129652-PTT07","requires_shipping":true,"taxable":true,"featured_image":{"id":36125152280675,"product_id":7920656547939,"position":19,"created_at":"2026-06-29T15:42:39+08:00","updated_at":"2026-06-29T15:42:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_215ad36f-a835-4a47-aba4-dae1d6aa8376.webp?v=1782718961","variant_ids":[43829334114403]},"available":true,"name":"iPhone 15 Plus SolidX 咒術迴戰 懷玉・玉折角色系列-夏油傑 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129652-PTT07","featured_media":{"alt":null,"id":27630395064419,"position":19,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_215ad36f-a835-4a47-aba4-dae1d6aa8376.webp?v=1782718961"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a1b92b9b98016101bc7c07e0ad6ae0bc59d9e6f.webp?v=1762761966","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71577aa2d7c7c883d4d3208031af20331d52e0a9.webp?v=1762761967","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d6f072c79f0bed836bc64e454b70409f0ebb17a.webp?v=1762761967","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc76f431d28a6adff4bf4d98cc1269249b384294.webp?v=1762761967","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598.webp?v=1762761969","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef58a346b996c27a2095a6eae6c5bc4f292e13b7.webp?v=1762761969","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e855b5d2d524825b2911d7be2e4440d141eca4.webp?v=1762761970","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d.webp?v=1762761970","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5b3f2c7df133574a6e01c60bcdd277178fb5e4.webp?v=1762761971","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f34bedf02e704d8458aca750491be692e304a575.webp?v=1762761972","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e855b5d2d524825b2911d7be2e4440d141eca4_890115f1-95eb-4eae-981d-48dee07d5d69.webp?v=1782266135","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_b0406220-13d2-4986-b4d5-fa00f838dc09.webp?v=1782266139","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_5704dfde-6355-4f51-adfa-6d012cbba759.webp?v=1782266140","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e855b5d2d524825b2911d7be2e4440d141eca4_3fef12ce-f6b1-4998-9fb8-b739a8aaa290.webp?v=1782291740","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_141c88ca-9e3d-43d9-b493-7d1d7c535d5a.webp?v=1782291741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_34f6b318-d875-4ecd-b854-a2a01ed3c322.webp?v=1782291743","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e855b5d2d524825b2911d7be2e4440d141eca4_792ca9bc-da64-41bd-9d9f-ffeff2f7ef58.webp?v=1782718956","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_5f185570-8fc4-461d-acf9-7d0e1ecc3078.webp?v=1782718959","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_215ad36f-a835-4a47-aba4-dae1d6aa8376.webp?v=1782718961"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a1b92b9b98016101bc7c07e0ad6ae0bc59d9e6f.webp?v=1762761966","options":["color"],"media":[{"alt":null,"id":26348318949475,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a1b92b9b98016101bc7c07e0ad6ae0bc59d9e6f.webp?v=1762761966"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a1b92b9b98016101bc7c07e0ad6ae0bc59d9e6f.webp?v=1762761966","width":2000},{"alt":null,"id":26348319342691,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71577aa2d7c7c883d4d3208031af20331d52e0a9.webp?v=1762761967"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71577aa2d7c7c883d4d3208031af20331d52e0a9.webp?v=1762761967","width":2000},{"alt":null,"id":26348319572067,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d6f072c79f0bed836bc64e454b70409f0ebb17a.webp?v=1762761967"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d6f072c79f0bed836bc64e454b70409f0ebb17a.webp?v=1762761967","width":2000},{"alt":null,"id":26348319768675,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc76f431d28a6adff4bf4d98cc1269249b384294.webp?v=1762761967"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc76f431d28a6adff4bf4d98cc1269249b384294.webp?v=1762761967","width":2000},{"alt":null,"id":26348320030819,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598.webp?v=1762761969"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598.webp?v=1762761969","width":2000},{"alt":null,"id":26348320129123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef58a346b996c27a2095a6eae6c5bc4f292e13b7.webp?v=1762761969"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef58a346b996c27a2095a6eae6c5bc4f292e13b7.webp?v=1762761969","width":2000},{"alt":null,"id":26348320260195,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e855b5d2d524825b2911d7be2e4440d141eca4.webp?v=1762761970"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e855b5d2d524825b2911d7be2e4440d141eca4.webp?v=1762761970","width":2000},{"alt":null,"id":26348320555107,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d.webp?v=1762761970"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d.webp?v=1762761970","width":2000},{"alt":null,"id":26348320587875,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5b3f2c7df133574a6e01c60bcdd277178fb5e4.webp?v=1762761971"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5b3f2c7df133574a6e01c60bcdd277178fb5e4.webp?v=1762761971","width":2000},{"alt":null,"id":26348320653411,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f34bedf02e704d8458aca750491be692e304a575.webp?v=1762761972"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f34bedf02e704d8458aca750491be692e304a575.webp?v=1762761972","width":2000},{"alt":null,"id":27587408068707,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e855b5d2d524825b2911d7be2e4440d141eca4_890115f1-95eb-4eae-981d-48dee07d5d69.webp?v=1782266135"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e855b5d2d524825b2911d7be2e4440d141eca4_890115f1-95eb-4eae-981d-48dee07d5d69.webp?v=1782266135","width":2000},{"alt":null,"id":27587409182819,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_b0406220-13d2-4986-b4d5-fa00f838dc09.webp?v=1782266139"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_b0406220-13d2-4986-b4d5-fa00f838dc09.webp?v=1782266139","width":2000},{"alt":null,"id":27587410264163,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_5704dfde-6355-4f51-adfa-6d012cbba759.webp?v=1782266140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_5704dfde-6355-4f51-adfa-6d012cbba759.webp?v=1782266140","width":2000},{"alt":null,"id":27594718380131,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e855b5d2d524825b2911d7be2e4440d141eca4_3fef12ce-f6b1-4998-9fb8-b739a8aaa290.webp?v=1782291740"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e855b5d2d524825b2911d7be2e4440d141eca4_3fef12ce-f6b1-4998-9fb8-b739a8aaa290.webp?v=1782291740","width":2000},{"alt":null,"id":27594719363171,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_141c88ca-9e3d-43d9-b493-7d1d7c535d5a.webp?v=1782291741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_141c88ca-9e3d-43d9-b493-7d1d7c535d5a.webp?v=1782291741","width":2000},{"alt":null,"id":27594719723619,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_34f6b318-d875-4ecd-b854-a2a01ed3c322.webp?v=1782291743"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_34f6b318-d875-4ecd-b854-a2a01ed3c322.webp?v=1782291743","width":2000},{"alt":null,"id":27630393000035,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e855b5d2d524825b2911d7be2e4440d141eca4_792ca9bc-da64-41bd-9d9f-ffeff2f7ef58.webp?v=1782718956"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e855b5d2d524825b2911d7be2e4440d141eca4_792ca9bc-da64-41bd-9d9f-ffeff2f7ef58.webp?v=1782718956","width":2000},{"alt":null,"id":27630393852003,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_5f185570-8fc4-461d-acf9-7d0e1ecc3078.webp?v=1782718959"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_5f185570-8fc4-461d-acf9-7d0e1ecc3078.webp?v=1782718959","width":2000},{"alt":null,"id":27630395064419,"position":19,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_215ad36f-a835-4a47-aba4-dae1d6aa8376.webp?v=1782718961"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_215ad36f-a835-4a47-aba4-dae1d6aa8376.webp?v=1782718961","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43829331034211,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012960B-PTT07","requires_shipping":true,"taxable":true,"featured_image":{"id":36125151068259,"product_id":7920656547939,"position":18,"created_at":"2026-06-29T15:42:37+08:00","updated_at":"2026-06-29T15:42:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_5f185570-8fc4-461d-acf9-7d0e1ecc3078.webp?v=1782718959","variant_ids":[43829331034211]},"available":true,"name":"iPhone 15 Plus SolidX 咒術迴戰 懷玉・玉折角色系列-夏油傑 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST012960B-PTT07","featured_media":{"alt":null,"id":27630393852003,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_5f185570-8fc4-461d-acf9-7d0e1ecc3078.webp?v=1782718959"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43829334114403,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129652-PTT07","requires_shipping":true,"taxable":true,"featured_image":{"id":36125152280675,"product_id":7920656547939,"position":19,"created_at":"2026-06-29T15:42:39+08:00","updated_at":"2026-06-29T15:42:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_215ad36f-a835-4a47-aba4-dae1d6aa8376.webp?v=1782718961","variant_ids":[43829334114403]},"available":true,"name":"iPhone 15 Plus SolidX 咒術迴戰 懷玉・玉折角色系列-夏油傑 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129652-PTT07","featured_media":{"alt":null,"id":27630395064419,"position":19,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fccfdc2d2ca2a277a7103c89864ce652a6f07d_215ad36f-a835-4a47-aba4-dae1d6aa8376.webp?v=1782718961"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43829331034211,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012960B-PTT07","requires_shipping":true,"taxable":true,"featured_image":{"id":36125151068259,"product_id":7920656547939,"position":18,"created_at":"2026-06-29T15:42:37+08:00","updated_at":"2026-06-29T15:42:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_5f185570-8fc4-461d-acf9-7d0e1ecc3078.webp?v=1782718959","variant_ids":[43829331034211]},"available":true,"name":"iPhone 15 Plus SolidX 咒術迴戰 懷玉・玉折角色系列-夏油傑 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST012960B-PTT07","featured_media":{"alt":null,"id":27630393852003,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae5600d9f044f54a2fad9c4b2f8ecb8b90d6598_5f185570-8fc4-461d-acf9-7d0e1ecc3078.webp?v=1782718959"}},"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: "停產" }