Subversion Repositories SmartDukaan

Rev

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

Rev 14069 Rev 14071
Line 95... Line 95...
95
    return {1:"Data added successfully"}
95
    return {1:"Data added successfully"}
96
 
96
 
97
def getAllSkuWiseSchemeDetails(offset, limit):
97
def getAllSkuWiseSchemeDetails(offset, limit):
98
    data = []
98
    data = []
99
    collection = get_mongo_connection().Catalog.SkuSchemeDetails
99
    collection = get_mongo_connection().Catalog.SkuSchemeDetails
100
    cursor = collection.find()
100
    cursor = collection.find().skip(offset).limit(limit)
101
    for val in cursor:
101
    for val in cursor:
102
        master = list(get_mongo_connection().Catalog.MasterData.find({'_id':val['sku']}))
102
        master = list(get_mongo_connection().Catalog.MasterData.find({'_id':val['sku']}))
103
        if len(master) > 0:
103
        if len(master) > 0:
104
            val['brand'] = master[0]['brand']
104
            val['brand'] = master[0]['brand']
105
            val['source_product_name'] = master[0]['source_product_name']
105
            val['source_product_name'] = master[0]['source_product_name']
Line 159... Line 159...
159
        return {1:"Data added successfully"}
159
        return {1:"Data added successfully"}
160
 
160
 
161
def getAllExceptionlNlcItems(offset, limit):
161
def getAllExceptionlNlcItems(offset, limit):
162
    data = []
162
    data = []
163
    collection = get_mongo_connection().Catalog.ExceptionalNlc
163
    collection = get_mongo_connection().Catalog.ExceptionalNlc
164
    cursor = collection.find()
164
    cursor = collection.find().skip(offset).limit(limit)
165
    for val in cursor:
165
    for val in cursor:
166
        master = list(get_mongo_connection().Catalog.MasterData.find({'_id':val['sku']}))
166
        master = list(get_mongo_connection().Catalog.MasterData.find({'_id':val['sku']}))
167
        if len(master) > 0:
167
        if len(master) > 0:
168
            val['brand'] = master[0]['brand']
168
            val['brand'] = master[0]['brand']
169
            val['source_product_name'] = master[0]['source_product_name']
169
            val['source_product_name'] = master[0]['source_product_name']