diff --git a/frontend/controllers/ServiceController.php b/frontend/controllers/ServiceController.php index fdd33b7..981df18 100644 --- a/frontend/controllers/ServiceController.php +++ b/frontend/controllers/ServiceController.php @@ -60,9 +60,12 @@ 'offers'=> [ '@type'=> 'Offer', 'priceCurrency'=> 'UAH', - 'Price'=> "'".max($prices)."'", + ] ]; + if (count($model->prices) <= 1 && isset($prices)) { + if (!empty($prices)) $layoutMicrodata['offers']['Price'] = "'" . max($prices) . "'"; + } $microdata=new MicrodataFabric(); -- libgit2 0.21.4