| @@ 265-273 (lines=9) @@ | ||
| 262 | 'products' => [], |
|
| 263 | ]; |
|
| 264 | ||
| 265 | foreach ($order->items as $item) { |
|
| 266 | $ga['products'][] = [ |
|
| 267 | 'id' => $item->product->id, |
|
| 268 | 'name' => $item->product->name, |
|
| 269 | 'category' => self::getCategories($item->product), |
|
| 270 | 'price' => CurrencyHelper::convertCurrencies($item->product->price, $item->product->currency, $currency), |
|
| 271 | 'quantity' => $item->quantity, |
|
| 272 | ]; |
|
| 273 | } |
|
| 274 | ||
| 275 | ||
| 276 | $js = 'window.DotPlantParams = window.DotPlantParams || {};'; |
|
| @@ 272-280 (lines=9) @@ | ||
| 269 | 'products' => [], |
|
| 270 | ]; |
|
| 271 | ||
| 272 | foreach ($order->items as $item) { |
|
| 273 | $ya['products'][] = [ |
|
| 274 | 'id' => $item->product->id, |
|
| 275 | 'name' => $item->product->name, |
|
| 276 | 'category' => self::getCategories($item->product), |
|
| 277 | 'price' => CurrencyHelper::convertCurrencies($item->product->price, $item->product->currency, $currency), |
|
| 278 | 'quantity' => $item->quantity, |
|
| 279 | ]; |
|
| 280 | } |
|
| 281 | ||
| 282 | $js = 'window.DotPlantParams = window.DotPlantParams || {};'; |
|
| 283 | $js .= 'window.DotPlantParams.ecYandex = ' . Json::encode($ya) . ';'; |
|