Subversion Repositories SmartDukaan

Rev

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

Rev 15069 Rev 15071
Line 1054... Line 1054...
1054
def getAllNotifications(offset, limit):
1054
def getAllNotifications(offset, limit):
1055
    data = []
1055
    data = []
1056
    collection = get_mongo_connection().Catalog.Notifications
1056
    collection = get_mongo_connection().Catalog.Notifications
1057
    cursor = collection.find().skip(offset).limit(limit)
1057
    cursor = collection.find().skip(offset).limit(limit)
1058
    for val in cursor:
1058
    for val in cursor:
1059
        master = list(get_mongo_connection().Catalog.MasterData.find({'_id':val['sku']}))
1059
        master = list(get_mongo_connection().Catalog.MasterData.find({'_id':val['skuBundleId']}))
1060
        if len(master) > 0:
1060
        if len(master) > 0:
1061
            val['brand'] = master[0]['brand']
1061
            val['brand'] = master[0]['brand']
1062
            val['source_product_name'] = master[0]['source_product_name']
1062
            val['model_name'] = master[0]['model_name']
1063
            val['skuBundleId'] = master[0]['skuBundleId']
1063
            val['skuBundleId'] = master[0]['skuBundleId']
1064
        else:
1064
        else:
1065
            val['brand'] = ""
1065
            val['brand'] = ""
1066
            val['source_product_name'] = ""
1066
            val['model_name'] = ""
1067
            val['skuBundleId'] = ""
1067
            val['skuBundleId'] = val['skuBundleId']
1068
        data.append(val)
1068
        data.append(val)
1069
    return data
1069
    return data
1070
 
1070
 
1071
def getBrandsForFilter(category_id):
1071
def getBrandsForFilter(category_id):
1072
    if mc.get("brandFilter") is None:
1072
    if mc.get("brandFilter") is None: