price filter add equal to
This commit is contained in:
@@ -163,9 +163,9 @@ def find_related_products_v6(keyword, shipping_cost=None, discount=None, categor
|
|||||||
|
|
||||||
# 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'))
|
||||||
|
|||||||
Reference in New Issue
Block a user