$product = {"id":6835787759715,"title":"iPhone 12 mini SolidSuit noiinoii 白兔宅急便","handle":"iphone-12-mini-solidsuit-classic-mw08","description":"","published_at":"2024-04-15T09:38:43+08:00","created_at":"2022-09-16T17:13:06+08:00","vendor":"RhinoShield","type":"設計師SolidSuit專區noiinoii","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-noiinoii","device-iPhone 12 Mini","merge","reseller-noiinoii"],"price":83000,"price_min":83000,"price_max":83000,"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":40062260641891,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-MW08","requires_shipping":true,"taxable":true,"featured_image":{"id":36347608498275,"product_id":6835787759715,"position":15,"created_at":"2026-07-22T18:03:17+08:00","updated_at":"2026-07-22T18:03:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60de530e736c908a3fbd66bc5d9b5ba9a485136_8f277bdd-e786-4e91-ba2c-1814695faa5d.webp?v=1784714599","variant_ids":[40062260641891]},"available":true,"name":"iPhone 12 mini SolidSuit noiinoii 白兔宅急便 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":-12,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-MW08","featured_media":{"alt":null,"id":27851463589987,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60de530e736c908a3fbd66bc5d9b5ba9a485136_8f277bdd-e786-4e91-ba2c-1814695faa5d.webp?v=1784714599"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41638064226403,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-MW08","requires_shipping":true,"taxable":true,"featured_image":{"id":36347607220323,"product_id":6835787759715,"position":11,"created_at":"2026-07-22T18:03:12+08:00","updated_at":"2026-07-22T18:03:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f6f4dae4c603c18c13bc56a6af62dec4dc7a98_b47e786e-e6ab-48b6-98c5-55d0675043c1.webp?v=1784714595","variant_ids":[41638064226403]},"available":true,"name":"iPhone 12 mini SolidSuit noiinoii 白兔宅急便 - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-MW08","featured_media":{"alt":null,"id":27851462312035,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f6f4dae4c603c18c13bc56a6af62dec4dc7a98_b47e786e-e6ab-48b6-98c5-55d0675043c1.webp?v=1784714595"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40556077482083,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-MW08","requires_shipping":true,"taxable":true,"featured_image":{"id":36347607679075,"product_id":6835787759715,"position":13,"created_at":"2026-07-22T18:03:14+08:00","updated_at":"2026-07-22T18:03:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99257d268affe617cda9a2a4e6950db96ac24c1_9aa5da7b-d188-4b93-82e3-c042d2517889.webp?v=1784714596","variant_ids":[40556077482083]},"available":true,"name":"iPhone 12 mini SolidSuit noiinoii 白兔宅急便 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-MW08","featured_media":{"alt":null,"id":27851462770787,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99257d268affe617cda9a2a4e6950db96ac24c1_9aa5da7b-d188-4b93-82e3-c042d2517889.webp?v=1784714596"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad5bd1ae48ded07f01f0d287cebac85127671371_4c767dfb-ea0c-4104-806a-0ca308f6f80e.webp?v=1712826224","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc917a37305fbdb8713c840957e9f10918dffc23.webp?v=1758529654","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09afe500805c645dae75a3b163a199efd00119b0.webp?v=1758529655","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fc0b2f9a8c874273c88929fde41bfa1b131a2e6.webp?v=1758529656","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08f9d151ff7acd7a82da4933aadf7d0b6f000a82.webp?v=1758529656","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28ed42158f49e2f964ca785f9a91bf58b3eb51d0.webp?v=1758529657","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f6f4dae4c603c18c13bc56a6af62dec4dc7a98.webp?v=1758529657","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99257d268affe617cda9a2a4e6950db96ac24c1.webp?v=1758529658","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d45a8ccc364d2144181e64f650f7baba1d14bdd.webp?v=1758529658","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60de530e736c908a3fbd66bc5d9b5ba9a485136.webp?v=1758529659","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f6f4dae4c603c18c13bc56a6af62dec4dc7a98_b47e786e-e6ab-48b6-98c5-55d0675043c1.webp?v=1784714595","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d45a8ccc364d2144181e64f650f7baba1d14bdd_d7913e06-3f4e-4708-823b-04bfb674aeef.webp?v=1784714595","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99257d268affe617cda9a2a4e6950db96ac24c1_9aa5da7b-d188-4b93-82e3-c042d2517889.webp?v=1784714596","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc917a37305fbdb8713c840957e9f10918dffc23_27a38898-3f2a-48bf-ad38-439172c2c895.webp?v=1784714598","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60de530e736c908a3fbd66bc5d9b5ba9a485136_8f277bdd-e786-4e91-ba2c-1814695faa5d.webp?v=1784714599","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08f9d151ff7acd7a82da4933aadf7d0b6f000a82_8875ef01-74e9-48b4-9440-49c19780ad43.webp?v=1784714599"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad5bd1ae48ded07f01f0d287cebac85127671371_4c767dfb-ea0c-4104-806a-0ca308f6f80e.webp?v=1712826224","options":["color"],"media":[{"alt":null,"id":23646310826083,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad5bd1ae48ded07f01f0d287cebac85127671371_4c767dfb-ea0c-4104-806a-0ca308f6f80e.webp?v=1712826224"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad5bd1ae48ded07f01f0d287cebac85127671371_4c767dfb-ea0c-4104-806a-0ca308f6f80e.webp?v=1712826224","width":2000},{"alt":null,"id":26085711839331,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc917a37305fbdb8713c840957e9f10918dffc23.webp?v=1758529654"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc917a37305fbdb8713c840957e9f10918dffc23.webp?v=1758529654","width":2000},{"alt":null,"id":26085712134243,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09afe500805c645dae75a3b163a199efd00119b0.webp?v=1758529655"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09afe500805c645dae75a3b163a199efd00119b0.webp?v=1758529655","width":2000},{"alt":null,"id":26085712625763,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fc0b2f9a8c874273c88929fde41bfa1b131a2e6.webp?v=1758529656"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fc0b2f9a8c874273c88929fde41bfa1b131a2e6.webp?v=1758529656","width":2000},{"alt":null,"id":26085712855139,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08f9d151ff7acd7a82da4933aadf7d0b6f000a82.webp?v=1758529656"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08f9d151ff7acd7a82da4933aadf7d0b6f000a82.webp?v=1758529656","width":2000},{"alt":null,"id":26085713281123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28ed42158f49e2f964ca785f9a91bf58b3eb51d0.webp?v=1758529657"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28ed42158f49e2f964ca785f9a91bf58b3eb51d0.webp?v=1758529657","width":2000},{"alt":null,"id":26085713477731,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f6f4dae4c603c18c13bc56a6af62dec4dc7a98.webp?v=1758529657"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f6f4dae4c603c18c13bc56a6af62dec4dc7a98.webp?v=1758529657","width":2000},{"alt":null,"id":26085713608803,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99257d268affe617cda9a2a4e6950db96ac24c1.webp?v=1758529658"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99257d268affe617cda9a2a4e6950db96ac24c1.webp?v=1758529658","width":2000},{"alt":null,"id":26085713936483,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d45a8ccc364d2144181e64f650f7baba1d14bdd.webp?v=1758529658"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d45a8ccc364d2144181e64f650f7baba1d14bdd.webp?v=1758529658","width":2000},{"alt":null,"id":26085714034787,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60de530e736c908a3fbd66bc5d9b5ba9a485136.webp?v=1758529659"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60de530e736c908a3fbd66bc5d9b5ba9a485136.webp?v=1758529659","width":2000},{"alt":null,"id":27851462312035,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f6f4dae4c603c18c13bc56a6af62dec4dc7a98_b47e786e-e6ab-48b6-98c5-55d0675043c1.webp?v=1784714595"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f6f4dae4c603c18c13bc56a6af62dec4dc7a98_b47e786e-e6ab-48b6-98c5-55d0675043c1.webp?v=1784714595","width":2000},{"alt":null,"id":27851462541411,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d45a8ccc364d2144181e64f650f7baba1d14bdd_d7913e06-3f4e-4708-823b-04bfb674aeef.webp?v=1784714595"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d45a8ccc364d2144181e64f650f7baba1d14bdd_d7913e06-3f4e-4708-823b-04bfb674aeef.webp?v=1784714595","width":2000},{"alt":null,"id":27851462770787,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99257d268affe617cda9a2a4e6950db96ac24c1_9aa5da7b-d188-4b93-82e3-c042d2517889.webp?v=1784714596"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99257d268affe617cda9a2a4e6950db96ac24c1_9aa5da7b-d188-4b93-82e3-c042d2517889.webp?v=1784714596","width":2000},{"alt":null,"id":27851463065699,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc917a37305fbdb8713c840957e9f10918dffc23_27a38898-3f2a-48bf-ad38-439172c2c895.webp?v=1784714598"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc917a37305fbdb8713c840957e9f10918dffc23_27a38898-3f2a-48bf-ad38-439172c2c895.webp?v=1784714598","width":2000},{"alt":null,"id":27851463589987,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60de530e736c908a3fbd66bc5d9b5ba9a485136_8f277bdd-e786-4e91-ba2c-1814695faa5d.webp?v=1784714599"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60de530e736c908a3fbd66bc5d9b5ba9a485136_8f277bdd-e786-4e91-ba2c-1814695faa5d.webp?v=1784714599","width":2000},{"alt":null,"id":27851464147043,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08f9d151ff7acd7a82da4933aadf7d0b6f000a82_8875ef01-74e9-48b4-9440-49c19780ad43.webp?v=1784714599"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08f9d151ff7acd7a82da4933aadf7d0b6f000a82_8875ef01-74e9-48b4-9440-49c19780ad43.webp?v=1784714599","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":""}; $isMerge = null; $variants = [{"id":40062260641891,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-MW08","requires_shipping":true,"taxable":true,"featured_image":{"id":36347608498275,"product_id":6835787759715,"position":15,"created_at":"2026-07-22T18:03:17+08:00","updated_at":"2026-07-22T18:03:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60de530e736c908a3fbd66bc5d9b5ba9a485136_8f277bdd-e786-4e91-ba2c-1814695faa5d.webp?v=1784714599","variant_ids":[40062260641891]},"available":true,"name":"iPhone 12 mini SolidSuit noiinoii 白兔宅急便 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":-12,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-MW08","featured_media":{"alt":null,"id":27851463589987,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60de530e736c908a3fbd66bc5d9b5ba9a485136_8f277bdd-e786-4e91-ba2c-1814695faa5d.webp?v=1784714599"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41638064226403,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-MW08","requires_shipping":true,"taxable":true,"featured_image":{"id":36347607220323,"product_id":6835787759715,"position":11,"created_at":"2026-07-22T18:03:12+08:00","updated_at":"2026-07-22T18:03:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f6f4dae4c603c18c13bc56a6af62dec4dc7a98_b47e786e-e6ab-48b6-98c5-55d0675043c1.webp?v=1784714595","variant_ids":[41638064226403]},"available":true,"name":"iPhone 12 mini SolidSuit noiinoii 白兔宅急便 - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-MW08","featured_media":{"alt":null,"id":27851462312035,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f6f4dae4c603c18c13bc56a6af62dec4dc7a98_b47e786e-e6ab-48b6-98c5-55d0675043c1.webp?v=1784714595"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40556077482083,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-MW08","requires_shipping":true,"taxable":true,"featured_image":{"id":36347607679075,"product_id":6835787759715,"position":13,"created_at":"2026-07-22T18:03:14+08:00","updated_at":"2026-07-22T18:03:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99257d268affe617cda9a2a4e6950db96ac24c1_9aa5da7b-d188-4b93-82e3-c042d2517889.webp?v=1784714596","variant_ids":[40556077482083]},"available":true,"name":"iPhone 12 mini SolidSuit noiinoii 白兔宅急便 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-MW08","featured_media":{"alt":null,"id":27851462770787,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99257d268affe617cda9a2a4e6950db96ac24c1_9aa5da7b-d188-4b93-82e3-c042d2517889.webp?v=1784714596"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":40062260641891,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-MW08","requires_shipping":true,"taxable":true,"featured_image":{"id":36347608498275,"product_id":6835787759715,"position":15,"created_at":"2026-07-22T18:03:17+08:00","updated_at":"2026-07-22T18:03:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60de530e736c908a3fbd66bc5d9b5ba9a485136_8f277bdd-e786-4e91-ba2c-1814695faa5d.webp?v=1784714599","variant_ids":[40062260641891]},"available":true,"name":"iPhone 12 mini SolidSuit noiinoii 白兔宅急便 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":-12,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-MW08","featured_media":{"alt":null,"id":27851463589987,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60de530e736c908a3fbd66bc5d9b5ba9a485136_8f277bdd-e786-4e91-ba2c-1814695faa5d.webp?v=1784714599"}},"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: "停產" }