Merge branch 'diego' into development
This commit is contained in:
@@ -173,9 +173,9 @@ def ranked_product_search(keyword, shipping_cost=None, discount=None, category=N
|
|||||||
|
|
||||||
# filter by price
|
# filter by price
|
||||||
if price_min is not None:
|
if price_min is not None:
|
||||||
products_qs = products_qs.filter(price__gt=price_min)
|
products_qs = products_qs.filter(price__gte=price_min)
|
||||||
if price_max is not None:
|
if price_max is not None:
|
||||||
products_qs = products_qs.filter(price__lt=price_max)
|
products_qs = products_qs.filter(price__lte=price_max)
|
||||||
|
|
||||||
# get min_price and max_price
|
# get min_price and max_price
|
||||||
min_price = products_qs.aggregate(Min('price'))
|
min_price = products_qs.aggregate(Min('price'))
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ def track_user(request):
|
|||||||
'user': None if request.user.is_anonymous else request.user,
|
'user': None if request.user.is_anonymous else request.user,
|
||||||
'anonymous': request.user.is_anonymous,
|
'anonymous': request.user.is_anonymous,
|
||||||
'ip_address': data.get('ip'),
|
'ip_address': data.get('ip'),
|
||||||
'geo': Point(data.get('geo')),
|
'geo': Point(data.get('geo')['latitude'], data.get('geo')['longitude']),
|
||||||
}
|
}
|
||||||
|
|
||||||
if data['action_object'].get('model') == 'product':
|
if data['action_object'].get('model') == 'product':
|
||||||
|
|||||||
Reference in New Issue
Block a user