Subversion Repositories SmartDukaan

Rev

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

Rev 19784 Rev 19880
Line 3297... Line 3297...
3297
        traceback.print_exc()
3297
        traceback.print_exc()
3298
    finally:
3298
    finally:
3299
        session.close()
3299
        session.close()
3300
    return result
3300
    return result
3301
 
3301
 
-
 
3302
  
-
 
3303
def getAllItemCasback(itemcashback_id,offset,limit):
-
 
3304
    itemcashbackcon = get_mongo_connection().Catalog.ItemCashBack
-
 
3305
    if itemcashback_id is None: 
-
 
3306
        response = list(itemcashbackcon.find().skip(offset).limit(limit))
-
 
3307
    else:
-
 
3308
        response = itemcashbackcon.find({'_id' : ObjectId(itemcashback_id)})
-
 
3309
    return response
-
 
3310
 
-
 
3311
def itemCashbackAdd(item_skuId,cb,cb_description,cb_type,cb_status):
-
 
3312
    itemcashbackcon = get_mongo_connection().Catalog.ItemCashBack
-
 
3313
    response = list(itemcashbackcon.find({'sku':item_skuId}))
-
 
3314
            
-
 
3315
    if len(response) ==  0:
-
 
3316
        itemcashbackcon.insert({'sku':item_skuId,'cash_back_description':cb_description,'cash_back':cb,'cash_back_type':cb_type,'cash_back_status': cb_status})
-
 
3317
        return True     
-
 
3318
        
-
 
3319
 
3302
def getHeaderLinks(category_id):
3320
def getHeaderLinks(category_id):
3303
    result = {}
3321
    result = {}
3304
    if category_id == 6:
3322
    if category_id == 6:
3305
        rank = 1
3323
        rank = 1
3306
        for subCat in SUB_CATEGORY_HEADER_RANKING:
3324
        for subCat in SUB_CATEGORY_HEADER_RANKING: