Commit 8cfd1b8ad4a84e0d70f5a40d0c96e530671406ba
1 parent
cfbb9363
remarketing
Showing
2 changed files
with
28 additions
and
1 deletions
Show diff stats
frontend/views/catalog/product.php
| @@ -38,6 +38,10 @@ | @@ -38,6 +38,10 @@ | ||
| 38 | 'url' => ['catalog/category', 'category' => $category, 'filters' => ['brands' => [$product->brand->alias]]], | 38 | 'url' => ['catalog/category', 'category' => $category, 'filters' => ['brands' => [$product->brand->alias]]], |
| 39 | ]; | 39 | ]; |
| 40 | $this->params[ 'breadcrumbs' ][] = $product->name . ' #' . $product->variant->sku; | 40 | $this->params[ 'breadcrumbs' ][] = $product->name . ' #' . $product->variant->sku; |
| 41 | + | ||
| 42 | + $this->params['remarketing']['type'] = 'offerdetail'; | ||
| 43 | + $this->params['remarketing']['id'] = $product->product_id; | ||
| 44 | + $this->params['remarketing']['price'] = $product->getPrice(); | ||
| 41 | ?> | 45 | ?> |
| 42 | 46 | ||
| 43 | <div class="wrapper white item_container"> | 47 | <div class="wrapper white item_container"> |
frontend/views/layouts/main.php
| @@ -552,7 +552,30 @@ | @@ -552,7 +552,30 @@ | ||
| 552 | 'models' => [], | 552 | 'models' => [], |
| 553 | ]) ?> | 553 | ]) ?> |
| 554 | </div> | 554 | </div> |
| 555 | - | 555 | + <?php |
| 556 | + if (isset($this->params['remarketing'])) { | ||
| 557 | + echo ' | ||
| 558 | + <script type="text/javascript"> | ||
| 559 | + var google_tag_params = { | ||
| 560 | + dynx_pagetype: "'.$this->params['remarketing']['type'].'", | ||
| 561 | + dynx_itemid: "'.$this->params['remarketing']['type'].'", | ||
| 562 | + dynx_totalvalue: "'.$this->params['remarketing']['type'].'" | ||
| 563 | + } | ||
| 564 | + </script> | ||
| 565 | + '; | ||
| 566 | + } | ||
| 567 | +// else { | ||
| 568 | +// echo ' | ||
| 569 | +// <script type="text/javascript"> | ||
| 570 | +// var google_tag_params = { | ||
| 571 | +// dynx_pagetype: "", | ||
| 572 | +// dynx_itemid: "", | ||
| 573 | +// dynx_totalvalue: "" | ||
| 574 | +// } | ||
| 575 | +// </script> | ||
| 576 | +// '; | ||
| 577 | +// } | ||
| 578 | + ?> | ||
| 556 | 579 | ||
| 557 | <?php $this->endBody() ?> | 580 | <?php $this->endBody() ?> |
| 558 | </body> | 581 | </body> |