Commits

Sergey Kirillov committed 771e014

Changed products_per_row to products_per_page

Comments (0)

Files changed (1)

shopium_cli/manifest.py

     @staticmethod
     def parse(f):
         d = simplejson.load(open(f))
+        products_per_page = d.get('products_per_page')
+        if products_per_page is None:
+            products_per_page = int(d['products_per_row'])*5
+        else:
+            products_per_page = int(products_per_page)
         return Manifest(name=d['name'],
                         use_shopium=bool(d['use_shopium']),
                         supported_locales=list(str(x) for x in d.get('supported_locales', [])),
                         supports_variants=bool(d['supports_variants']), 
-                        products_per_row=int(d['products_per_row']), 
+                        products_per_row=products_per_page, 
                         use_jquery=bool(d['use_jquery']),
                         templates=d['templates'],
                         css=d['css']