Commits

marconius committed 9746b89

important fixes for silly bugs

Comments (0)

Files changed (3)

satchmo/apps/product/models.py

         flat_list = self._flatten(children_list[ix:])
         return flat_list
     
-    def is_top_level(self):
-        return (self.parent == "" or self.parent == None)
-
     class Meta:
         ordering = ['site', 'parent__id', 'ordering', 'name']
         verbose_name = _("Category")

satchmo/apps/satchmo_store/shop/models.py

     customer = None
     total = Decimal("0")
     total_w_global_discount = Decimal("0")
-    global_discount = Decimal("0")
+    global_discount = { 'gd_obj': None, 'amount': 0 }
     numItems = 0
 
     def add_item(self, *args, **kwargs):

satchmo/apps/satchmo_store/shop/views/cart.py

         sale = None
     
     last_page = urlresolvers.reverse('satchmo_shop_home')
-    ref_path = urlparse(request.META['HTTP_REFERER']).path
-    if ref_path != urlresolvers.reverse('satchmo_cart'):
-        last_page = request.META['HTTP_REFERER']
+    ref_path = ""
+    if request.META.has_key('HTTP_REFERER'):
+        ref_path = urlparse(request.META['HTTP_REFERER']).path
+        if ref_path != urlresolvers.reverse('satchmo_cart'):
+            last_page = request.META['HTTP_REFERER']
     
     ctx = {
         'cart': cart,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.