Subversion Repositories SmartDukaan

Rev

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

Rev 12387 Rev 12388
Line 207... Line 207...
207
    itemInfo = []
207
    itemInfo = []
208
    inventory_client = InventoryClient().get_client()
208
    inventory_client = InventoryClient().get_client()
209
    fbaAvailableInventorySnapshot = inventory_client.getAllAvailableAmazonFbaItemInventory()
209
    fbaAvailableInventorySnapshot = inventory_client.getAllAvailableAmazonFbaItemInventory()
210
    print "length****"
210
    print "length****"
211
    print len(fbaAvailableInventorySnapshot)
211
    print len(fbaAvailableInventorySnapshot)
212
    sys.exit(1)
-
 
213
    for fbaInventoryItem in fbaAvailableInventorySnapshot:
212
    for fbaInventoryItem in fbaAvailableInventorySnapshot:
214
        d_amazon_listed = Amazonlisted.get_by(itemId=fbaInventoryItem.item_id)
213
        d_amazon_listed = Amazonlisted.get_by(itemId=fbaInventoryItem.item_id)
215
        if d_amazon_listed is None:
214
        if d_amazon_listed is None:
216
            continue
215
            continue
217
        if d_amazon_listed.overrrideWanlc:
216
        if d_amazon_listed.overrrideWanlc:
Line 252... Line 251...
252
    amPromotions = AmazonPromotion.query.filter(AmazonPromotion.startDate<=time).filter(AmazonPromotion.endDate>=time).filter(AmazonPromotion.promotionType==AmazonPromotionType.LONGTERM).filter(AmazonPromotion.promotionActive==True) \
251
    amPromotions = AmazonPromotion.query.filter(AmazonPromotion.startDate<=time).filter(AmazonPromotion.endDate>=time).filter(AmazonPromotion.promotionType==AmazonPromotionType.LONGTERM).filter(AmazonPromotion.promotionActive==True) \
253
    .group_by(AmazonPromotion.sku).order_by(desc(AmazonPromotion.addedOn)).all()
252
    .group_by(AmazonPromotion.sku).order_by(desc(AmazonPromotion.addedOn)).all()
254
    for amPromotion in amPromotions:
253
    for amPromotion in amPromotions:
255
        amazonLongTermActivePromotions.append(amPromotion.sku)
254
        amazonLongTermActivePromotions.append(amPromotion.sku)
256
    session.close()
255
    session.close()
-
 
256
    print "item info length"
-
 
257
    print len(itemInfo)
-
 
258
    sys.exit(1)
257
    return itemInfo
259
    return itemInfo
258
 
260
 
259
def decideCategory(itemInfo):
261
def decideCategory(itemInfo):
260
    exceptionList, negativeMargin, cheapest, amongCheapestAndCanCompete, canCompete, almostCompete, cantCompete = [],[],[],[],[],[],[] 
262
    exceptionList, negativeMargin, cheapest, amongCheapestAndCanCompete, canCompete, almostCompete, cantCompete = [],[],[],[],[],[],[] 
261
    skuUrls = []
263
    skuUrls = []