Subversion Repositories SmartDukaan

Rev

Rev 22334 | Rev 23355 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22334 Rev 23354
Line 144... Line 144...
144
            #Dont include it catalog not available
144
            #Dont include it catalog not available
145
            try:
145
            try:
146
                catalogObj['imageUrl'] = get_mongo_connection(options.mongoHost).CONTENT.siteContent.find_one(filterMap, projection)['thumbnailImageUrl']
146
                catalogObj['imageUrl'] = get_mongo_connection(options.mongoHost).CONTENT.siteContent.find_one(filterMap, projection)['thumbnailImageUrl']
147
                print catalogObj['imageUrl']
147
                print catalogObj['imageUrl']
148
            except:
148
            except:
-
 
149
                try:
-
 
150
                    catalogObj['imageUrl'] = 'http://api.profittill.com/uploads/campaigns/' + item.catalog_item_id + '.jpg'
-
 
151
                except:
149
                traceback.print_exc()
152
                    traceback.print_exc()
150
                continue
153
                    continue
151
            try: 
154
            try: 
152
                catalogObj['rank'] = tagRankingList.index(item.catalog_item_id)
155
                catalogObj['rank'] = tagRankingList.index(item.catalog_item_id)
153
            except:
156
            except:
154
                #A very big number
157
                #A very big number
155
                catalogObj['rank'] = 500000
158
                catalogObj['rank'] = 50000000
156
                traceback.print_exc()
159
                traceback.print_exc()
157
 
-
 
-
 
160
            #Mobile and tablets are showcased in same category
158
            catalogObj['categoryId'] = 3 if item.category in [10006, 10009] else 6   
161
            catalogObj['categoryId'] = 3 if item.category in [10006, 10009] else 6   
159
            catalogMap[item.catalog_item_id] = catalogObj
162
            catalogMap[item.catalog_item_id] = catalogObj
160
 
163
 
161
        catalogObj = catalogMap.get(item.catalog_item_id)
164
        catalogObj = catalogMap.get(item.catalog_item_id)
162
        
165