| Line 280... |
Line 280... |
| 280 |
if (bestSellerPoints[0]['points']) > 0:
|
280 |
if (bestSellerPoints[0]['points']) > 0:
|
| 281 |
sku['bestSellerPoints'] = (bestSellerPoints[0]['points']) * bestSellerPoints[0]['weightage'] * STATUS_WEIGHTAGE.get(sku['status'])
|
281 |
sku['bestSellerPoints'] = (bestSellerPoints[0]['points']) * bestSellerPoints[0]['weightage'] * STATUS_WEIGHTAGE.get(sku['status'])
|
| 282 |
else:
|
282 |
else:
|
| 283 |
sku['bestSellerPoints'] = (bestSellerPoints[0]['points'])
|
283 |
sku['bestSellerPoints'] = (bestSellerPoints[0]['points'])
|
| 284 |
else:
|
284 |
else:
|
| - |
|
285 |
if sku['category_id'] == 6:
|
| - |
|
286 |
sku['bestSellerPoints'] = -80
|
| - |
|
287 |
else:
|
| 285 |
sku['bestSellerPoints'] = -120
|
288 |
sku['bestSellerPoints'] = -120
|
| 286 |
#sku['totalPoints'] = sku['bestSellerPoints'] + sku['nlcPoints']
|
289 |
#sku['totalPoints'] = sku['bestSellerPoints'] + sku['nlcPoints']
|
| 287 |
get_mongo_connection().Catalog.Deals.update({'_id':sku['_id']},{'$set':{'bestSellerPoints':sku['bestSellerPoints']}},multi=False)
|
290 |
get_mongo_connection().Catalog.Deals.update({'_id':sku['_id']},{'$set':{'bestSellerPoints':sku['bestSellerPoints']}},multi=False)
|
| 288 |
|
291 |
|
| 289 |
shortageSkus = get_mongo_connection().Catalog.MasterData.find({"$and":[{'is_shortage': 1 }, { 'source_id' : { "$in": SOURCE_MAP.values() } }] }).distinct('_id')
|
292 |
shortageSkus = get_mongo_connection().Catalog.MasterData.find({"$and":[{'is_shortage': 1 }, { 'source_id' : { "$in": SOURCE_MAP.values() } }] }).distinct('_id')
|
| 290 |
print "Shortage skus"
|
293 |
print "Shortage skus"
|