summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2015-06-30 09:35:29 +0200
committerJeremy Kersten <jke@odoo.com>2015-06-30 09:44:01 +0200
commit02d3e703a2d7ff4de6e1c8f689b3d3bcb650ad9e (patch)
tree450bd2f49e29a34a652806848a5afd7d9a2ba04d
parent9334645f82a4fea5352f3a4fdc700e73cccdf3cc (diff)
[FIX] website_sale: fix ga Ecommerce statistics
Name from product was missing / confusing with category name https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiEcommerce
-rw-r--r--addons/website_sale/controllers/main.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py
index c106205f056..32da18da360 100644
--- a/addons/website_sale/controllers/main.py
+++ b/addons/website_sale/controllers/main.py
@@ -914,17 +914,18 @@ class website_sale(http.Controller):
for line in order_lines:
ret.append({
'id': line.order_id and line.order_id.id,
- 'name': line.product_id.categ_id and line.product_id.categ_id.name or '-',
'sku': line.product_id.id,
- 'quantity': line.product_uom_qty,
+ 'name': line.product_id.name or '-',
+ 'category': line.product_id.categ_id and line.product_id.categ_id.name or '-',
'price': line.price_unit,
+ 'quantity': line.product_uom_qty,
})
return ret
@http.route(['/shop/tracking_last_order'], type='json', auth="public")
def tracking_cart(self, **post):
""" return data about order in JSON needed for google analytics"""
- cr, uid, context = request.cr, request.uid, request.context
+ cr, context = request.cr, request.context
ret = {}
sale_order_id = request.session.get('sale_last_order_id')
if sale_order_id: