Commits

NikolayBlohin committed 1efa83e

Fixed currency tag to display pounds properly.

Comments (0)

Files changed (1)

lfs/core/templatetags/lfs_tags.py

+#-*- coding: utf-8 -*-
 # python imports
 import math
 
     price = lfs.utils.misc.FormatWithCommas("%.2f", price)
     shop = lfs_get_object_or_404(Shop, pk=1)
 
-    if shop.get_default_country().code == "DE":
+    code = shop.get_default_country().code
+    
+    if code == "DE":
         # replace . and , for german format
         a, b = price.split(".")
         a = a.replace(",", ".")
         price = "%s,%s EUR" % (a, b)
+    elif code == 'GBP':
+        price = u"£%s" % price
     else:
         price = "%s %s" % (price, shop.default_currency)
 
     """Returns the packages based on product's package unit and cart items 
     amount.
     """
-    return int(math.ceil(cart_item.amount / cart_item.product.packing_unit))
+    return int(math.ceil(cart_item.amount / cart_item.product.packing_unit))
+