| @@ 250-257 (lines=8) @@ | ||
| 247 | ] |
|
| 248 | ]; |
|
| 249 | ||
| 250 | foreach ($tariffs as $tariff) { |
|
| 251 | $jsonLD->priceInfo[] = [ |
|
| 252 | 'category' => 'tariff', |
|
| 253 | 'name' => $tariff->getName()->serialize(), |
|
| 254 | 'price' => $tariff->getPrice()->toFloat(), |
|
| 255 | 'priceCurrency' => $tariff->getCurrency()->getCode()->toNative(), |
|
| 256 | ]; |
|
| 257 | } |
|
| 258 | } |
|
| 259 | } |
|
| 260 | ||
| @@ 770-777 (lines=8) @@ | ||
| 767 | 'priceCurrency' => $basePrice->getCurrency()->getCode()->toNative(), |
|
| 768 | ]; |
|
| 769 | ||
| 770 | foreach ($priceInfoUpdated->getPriceInfo()->getTariffs() as $tariff) { |
|
| 771 | $offerLd->priceInfo[] = [ |
|
| 772 | 'category' => 'tariff', |
|
| 773 | 'name' => $tariff->getName()->serialize(), |
|
| 774 | 'price' => $tariff->getPrice()->toFloat(), |
|
| 775 | 'priceCurrency' => $tariff->getCurrency()->getCode()->toNative(), |
|
| 776 | ]; |
|
| 777 | } |
|
| 778 | ||
| 779 | return $document->withBody($offerLd); |
|
| 780 | } |
|