Commit 453db918221c6c5554aa2fdaebce4b6b7779401b

Authored by Yarik
1 parent 938e9897

Google ecommerce

Showing 1 changed file with 7 additions and 18 deletions   Show diff stats
frontend/views/order/success.php
... ... @@ -48,15 +48,6 @@
48 48 <a href="/" style="display:inline">« На главную</a>
49 49 </div>
50 50 <!-- Google ECommerce Code -->
51   - <div style="display: none;">
52   - <?php
53   - var_dump($order);
54   - var_dump($variants);
55   - ?>
56   - </div>
57   - <?php
58   - /*
59   - ?>
60 51 <script>
61 52 ga('require', 'ecommerce');
62 53 <?php
... ... @@ -65,11 +56,11 @@
65 56 ?>
66 57 ga(
67 58 'ecommerce:addItem', {
68   - 'id': '<?= $order->id; ?>',
69   - 'name': '<?= $product['product_name']; ?>',
70   - 'price': '<?= $product['price']; ?>',
71   - 'sku': '<?= $product['sku']; ?>',
72   - 'quantity': '<?= $product['quantity']; ?>'
  59 + 'id': '<?= $order->id ?>',
  60 + 'name': '<?= $product['product_name'] ?>',
  61 + 'price': '<?= $product['price'] ?>',
  62 + 'sku': '<?= $product['sku'] ?>',
  63 + 'quantity': '<?= $product['count'] ?>'
73 64 }
74 65 );
75 66 <?php
... ... @@ -78,15 +69,13 @@
78 69 ?>
79 70 ga(
80 71 'ecommerce:addTransaction', {
81   - 'id': '<?= $order->id; ?>',
  72 + 'id': '<?= $order->id ?>',
82 73 'affiliation': 'www.linija-svitla.ua',
83   - 'revenue': '<?= $sum; ?>',
  74 + 'revenue': '<?= $sum ?>',
84 75 }
85 76 );
86 77 ga('ecommerce:send');
87 78 </script>
88   - */
89   - ?>
90 79 </td>
91 80 </tr>
92 81 </tbody>
... ...