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,15 +48,6 @@
48 <a href="/" style="display:inline">« На главную</a> 48 <a href="/" style="display:inline">« На главную</a>
49 </div> 49 </div>
50 <!-- Google ECommerce Code --> 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 <script> 51 <script>
61 ga('require', 'ecommerce'); 52 ga('require', 'ecommerce');
62 <?php 53 <?php
@@ -65,11 +56,11 @@ @@ -65,11 +56,11 @@
65 ?> 56 ?>
66 ga( 57 ga(
67 'ecommerce:addItem', { 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 <?php 66 <?php
@@ -78,15 +69,13 @@ @@ -78,15 +69,13 @@
78 ?> 69 ?>
79 ga( 70 ga(
80 'ecommerce:addTransaction', { 71 'ecommerce:addTransaction', {
81 - 'id': '<?= $order->id; ?>', 72 + 'id': '<?= $order->id ?>',
82 'affiliation': 'www.linija-svitla.ua', 73 'affiliation': 'www.linija-svitla.ua',
83 - 'revenue': '<?= $sum; ?>', 74 + 'revenue': '<?= $sum ?>',
84 } 75 }
85 ); 76 );
86 ga('ecommerce:send'); 77 ga('ecommerce:send');
87 </script> 78 </script>
88 - */  
89 - ?>  
90 </td> 79 </td>
91 </tr> 80 </tr>
92 </tbody> 81 </tbody>