$product = {"id":7769458475107,"title":"iPhone XR Mod NX ilovedoodle Hug One Line - 愛與擁抱","handle":"iphone-xr-mod-nx-printable-xf55","description":null,"published_at":"2025-07-16T17:34:13+08:00","created_at":"2025-04-15T16:23:47+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-I Love Doodle","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-ilovedoodle","device-iPhone XR","merge","reseller-ilovedoodle"],"price":90000,"price_min":90000,"price_max":90000,"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":43302444859491,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108524-XF55","requires_shipping":true,"taxable":true,"featured_image":{"id":34197165342819,"product_id":7769458475107,"position":8,"created_at":"2025-07-16T14:59:55+08:00","updated_at":"2025-07-16T14:59:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcab03bf5e577e6f83ca2774a4291ee84d3219b3_a0ddafd2-01c9-482b-9186-a4b2a416689f.webp?v=1752649197","variant_ids":[43302444859491]},"available":true,"name":"iPhone XR Mod NX ilovedoodle Hug One Line - 愛與擁抱 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108524-XF55","featured_media":{"alt":null,"id":25829750538339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcab03bf5e577e6f83ca2774a4291ee84d3219b3_a0ddafd2-01c9-482b-9186-a4b2a416689f.webp?v=1752649197"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43302450987107,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NPB0108504-XF55","requires_shipping":true,"taxable":true,"featured_image":{"id":34197164687459,"product_id":7769458475107,"position":6,"created_at":"2025-07-16T14:59:54+08:00","updated_at":"2025-07-16T14:59:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf5c0e46c033c265b2fb8464e13e88fb78d3b2a2_59de7d41-bf7e-43d1-a442-c2c26c0408c9.webp?v=1752649196","variant_ids":[43302450987107]},"available":true,"name":"iPhone XR Mod NX ilovedoodle Hug One Line - 愛與擁抱 - White","public_title":"White","options":["White"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108504-XF55","featured_media":{"alt":null,"id":25829750210659,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf5c0e46c033c265b2fb8464e13e88fb78d3b2a2_59de7d41-bf7e-43d1-a442-c2c26c0408c9.webp?v=1752649196"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43302451085411,"title":"Camo Green","option1":"Camo Green","option2":null,"option3":null,"sku":"NPB0108515-XF55","requires_shipping":true,"taxable":true,"featured_image":{"id":34197167177827,"product_id":7769458475107,"position":11,"created_at":"2025-07-16T14:59:57+08:00","updated_at":"2025-07-16T14:59:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65f44cebbd5f7c5b30c03d7a09d15991c5f146d1_b82171fd-f971-424c-bfb2-20c9d2925112.webp?v=1752649199","variant_ids":[43302451085411]},"available":true,"name":"iPhone XR Mod NX ilovedoodle Hug One Line - 愛與擁抱 - Camo Green","public_title":"Camo Green","options":["Camo Green"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108515-XF55","featured_media":{"alt":null,"id":25829751095395,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65f44cebbd5f7c5b30c03d7a09d15991c5f146d1_b82171fd-f971-424c-bfb2-20c9d2925112.webp?v=1752649199"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43302451118179,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"NPB01085C1-XF55","requires_shipping":true,"taxable":true,"featured_image":{"id":34197164949603,"product_id":7769458475107,"position":7,"created_at":"2025-07-16T14:59:55+08:00","updated_at":"2025-07-16T14:59:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f75068a045c6463b59f339752163a4caa7382a58_2d91bed7-6c9f-4fd2-86a3-a5f17f731200.webp?v=1752649196","variant_ids":[43302451118179]},"available":true,"name":"iPhone XR Mod NX ilovedoodle Hug One Line - 愛與擁抱 - Lavender","public_title":"Lavender","options":["Lavender"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01085C1-XF55","featured_media":{"alt":null,"id":25829750308963,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f75068a045c6463b59f339752163a4caa7382a58_2d91bed7-6c9f-4fd2-86a3-a5f17f731200.webp?v=1752649196"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d39822c7e16bb1be4cc166ca01958fbdd8baec34.webp?v=1744705434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6b8a36e5b94787be26726e4e2a3e0b6925234bb_803dae53-fbef-418e-bfc5-bfec2664d652.webp?v=1752649194","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a50d5e82f8bdf0d3befd9349340df9670880b23_2c6f4182-5765-4be9-badb-ddfa5125601f.webp?v=1752649194","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1262be37ac5f94b49e19125d1e3e6b6a0ef00f19_ab9f1f55-339c-42e9-be0b-598b015ede7d.webp?v=1752649195","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a57674789791a50b1472d03bff2eeba5f1d4689_a2e4266a-a00e-449b-9323-9a54f3504f24.webp?v=1752649195","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf5c0e46c033c265b2fb8464e13e88fb78d3b2a2_59de7d41-bf7e-43d1-a442-c2c26c0408c9.webp?v=1752649196","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f75068a045c6463b59f339752163a4caa7382a58_2d91bed7-6c9f-4fd2-86a3-a5f17f731200.webp?v=1752649196","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcab03bf5e577e6f83ca2774a4291ee84d3219b3_a0ddafd2-01c9-482b-9186-a4b2a416689f.webp?v=1752649197","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/378ae7fa1eb99adc144ef2ffbf5f769c4a7bca4e_91df82dd-a4d2-4b5d-88c3-af15d38aecae.webp?v=1752649198","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a880e4db3e6ed114ca862c2b4a3f8283523bbc15_6cb7a782-e409-48fd-b568-d066dcf32df0.webp?v=1752649198","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65f44cebbd5f7c5b30c03d7a09d15991c5f146d1_b82171fd-f971-424c-bfb2-20c9d2925112.webp?v=1752649199"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d39822c7e16bb1be4cc166ca01958fbdd8baec34.webp?v=1744705434","options":["color"],"media":[{"alt":null,"id":25495497408611,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d39822c7e16bb1be4cc166ca01958fbdd8baec34.webp?v=1744705434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d39822c7e16bb1be4cc166ca01958fbdd8baec34.webp?v=1744705434","width":2000},{"alt":null,"id":25829749162083,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6b8a36e5b94787be26726e4e2a3e0b6925234bb_803dae53-fbef-418e-bfc5-bfec2664d652.webp?v=1752649194"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6b8a36e5b94787be26726e4e2a3e0b6925234bb_803dae53-fbef-418e-bfc5-bfec2664d652.webp?v=1752649194","width":2000},{"alt":null,"id":25829749391459,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a50d5e82f8bdf0d3befd9349340df9670880b23_2c6f4182-5765-4be9-badb-ddfa5125601f.webp?v=1752649194"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a50d5e82f8bdf0d3befd9349340df9670880b23_2c6f4182-5765-4be9-badb-ddfa5125601f.webp?v=1752649194","width":2000},{"alt":null,"id":25829749784675,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1262be37ac5f94b49e19125d1e3e6b6a0ef00f19_ab9f1f55-339c-42e9-be0b-598b015ede7d.webp?v=1752649195"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1262be37ac5f94b49e19125d1e3e6b6a0ef00f19_ab9f1f55-339c-42e9-be0b-598b015ede7d.webp?v=1752649195","width":2000},{"alt":null,"id":25829750079587,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a57674789791a50b1472d03bff2eeba5f1d4689_a2e4266a-a00e-449b-9323-9a54f3504f24.webp?v=1752649195"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a57674789791a50b1472d03bff2eeba5f1d4689_a2e4266a-a00e-449b-9323-9a54f3504f24.webp?v=1752649195","width":2000},{"alt":null,"id":25829750210659,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf5c0e46c033c265b2fb8464e13e88fb78d3b2a2_59de7d41-bf7e-43d1-a442-c2c26c0408c9.webp?v=1752649196"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf5c0e46c033c265b2fb8464e13e88fb78d3b2a2_59de7d41-bf7e-43d1-a442-c2c26c0408c9.webp?v=1752649196","width":2000},{"alt":null,"id":25829750308963,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f75068a045c6463b59f339752163a4caa7382a58_2d91bed7-6c9f-4fd2-86a3-a5f17f731200.webp?v=1752649196"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f75068a045c6463b59f339752163a4caa7382a58_2d91bed7-6c9f-4fd2-86a3-a5f17f731200.webp?v=1752649196","width":2000},{"alt":null,"id":25829750538339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcab03bf5e577e6f83ca2774a4291ee84d3219b3_a0ddafd2-01c9-482b-9186-a4b2a416689f.webp?v=1752649197"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcab03bf5e577e6f83ca2774a4291ee84d3219b3_a0ddafd2-01c9-482b-9186-a4b2a416689f.webp?v=1752649197","width":2000},{"alt":null,"id":25829750734947,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/378ae7fa1eb99adc144ef2ffbf5f769c4a7bca4e_91df82dd-a4d2-4b5d-88c3-af15d38aecae.webp?v=1752649198"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/378ae7fa1eb99adc144ef2ffbf5f769c4a7bca4e_91df82dd-a4d2-4b5d-88c3-af15d38aecae.webp?v=1752649198","width":2000},{"alt":null,"id":25829750931555,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a880e4db3e6ed114ca862c2b4a3f8283523bbc15_6cb7a782-e409-48fd-b568-d066dcf32df0.webp?v=1752649198"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a880e4db3e6ed114ca862c2b4a3f8283523bbc15_6cb7a782-e409-48fd-b568-d066dcf32df0.webp?v=1752649198","width":2000},{"alt":null,"id":25829751095395,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65f44cebbd5f7c5b30c03d7a09d15991c5f146d1_b82171fd-f971-424c-bfb2-20c9d2925112.webp?v=1752649199"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65f44cebbd5f7c5b30c03d7a09d15991c5f146d1_b82171fd-f971-424c-bfb2-20c9d2925112.webp?v=1752649199","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43302444859491,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108524-XF55","requires_shipping":true,"taxable":true,"featured_image":{"id":34197165342819,"product_id":7769458475107,"position":8,"created_at":"2025-07-16T14:59:55+08:00","updated_at":"2025-07-16T14:59:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcab03bf5e577e6f83ca2774a4291ee84d3219b3_a0ddafd2-01c9-482b-9186-a4b2a416689f.webp?v=1752649197","variant_ids":[43302444859491]},"available":true,"name":"iPhone XR Mod NX ilovedoodle Hug One Line - 愛與擁抱 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108524-XF55","featured_media":{"alt":null,"id":25829750538339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcab03bf5e577e6f83ca2774a4291ee84d3219b3_a0ddafd2-01c9-482b-9186-a4b2a416689f.webp?v=1752649197"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43302450987107,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NPB0108504-XF55","requires_shipping":true,"taxable":true,"featured_image":{"id":34197164687459,"product_id":7769458475107,"position":6,"created_at":"2025-07-16T14:59:54+08:00","updated_at":"2025-07-16T14:59:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf5c0e46c033c265b2fb8464e13e88fb78d3b2a2_59de7d41-bf7e-43d1-a442-c2c26c0408c9.webp?v=1752649196","variant_ids":[43302450987107]},"available":true,"name":"iPhone XR Mod NX ilovedoodle Hug One Line - 愛與擁抱 - White","public_title":"White","options":["White"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108504-XF55","featured_media":{"alt":null,"id":25829750210659,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf5c0e46c033c265b2fb8464e13e88fb78d3b2a2_59de7d41-bf7e-43d1-a442-c2c26c0408c9.webp?v=1752649196"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43302451085411,"title":"Camo Green","option1":"Camo Green","option2":null,"option3":null,"sku":"NPB0108515-XF55","requires_shipping":true,"taxable":true,"featured_image":{"id":34197167177827,"product_id":7769458475107,"position":11,"created_at":"2025-07-16T14:59:57+08:00","updated_at":"2025-07-16T14:59:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65f44cebbd5f7c5b30c03d7a09d15991c5f146d1_b82171fd-f971-424c-bfb2-20c9d2925112.webp?v=1752649199","variant_ids":[43302451085411]},"available":true,"name":"iPhone XR Mod NX ilovedoodle Hug One Line - 愛與擁抱 - Camo Green","public_title":"Camo Green","options":["Camo Green"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108515-XF55","featured_media":{"alt":null,"id":25829751095395,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65f44cebbd5f7c5b30c03d7a09d15991c5f146d1_b82171fd-f971-424c-bfb2-20c9d2925112.webp?v=1752649199"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43302451118179,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"NPB01085C1-XF55","requires_shipping":true,"taxable":true,"featured_image":{"id":34197164949603,"product_id":7769458475107,"position":7,"created_at":"2025-07-16T14:59:55+08:00","updated_at":"2025-07-16T14:59:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f75068a045c6463b59f339752163a4caa7382a58_2d91bed7-6c9f-4fd2-86a3-a5f17f731200.webp?v=1752649196","variant_ids":[43302451118179]},"available":true,"name":"iPhone XR Mod NX ilovedoodle Hug One Line - 愛與擁抱 - Lavender","public_title":"Lavender","options":["Lavender"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01085C1-XF55","featured_media":{"alt":null,"id":25829750308963,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f75068a045c6463b59f339752163a4caa7382a58_2d91bed7-6c9f-4fd2-86a3-a5f17f731200.webp?v=1752649196"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43302444859491,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108524-XF55","requires_shipping":true,"taxable":true,"featured_image":{"id":34197165342819,"product_id":7769458475107,"position":8,"created_at":"2025-07-16T14:59:55+08:00","updated_at":"2025-07-16T14:59:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcab03bf5e577e6f83ca2774a4291ee84d3219b3_a0ddafd2-01c9-482b-9186-a4b2a416689f.webp?v=1752649197","variant_ids":[43302444859491]},"available":true,"name":"iPhone XR Mod NX ilovedoodle Hug One Line - 愛與擁抱 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108524-XF55","featured_media":{"alt":null,"id":25829750538339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcab03bf5e577e6f83ca2774a4291ee84d3219b3_a0ddafd2-01c9-482b-9186-a4b2a416689f.webp?v=1752649197"}},"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: "停產" }