Subversion Repositories SmartDukaan

Rev

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

Rev 12441 Rev 12442
Line 435... Line 435...
435
        thirdLowestSellerRating, lowestSellerType, secondLowestSellerType, thirdLowestSellerType = (0,)*9
435
        thirdLowestSellerRating, lowestSellerType, secondLowestSellerType, thirdLowestSellerType = (0,)*9
436
        isPromo = False
436
        isPromo = False
437
        sku = val.sku
437
        sku = val.sku
438
        multipleListings = False
438
        multipleListings = False
439
        ourSkuDetails = ourPricingForSku.get(val.sku)
439
        ourSkuDetails = ourPricingForSku.get(val.sku)
440
        if not (ourSkuDetails.promotion and (amazonLongTermActivePromotions.has_key(val.sku) or amazonShortTermActivePromotions.has_key(val.sku))):
440
        if not (ourSkuDetails.get('promotion') and (amazonLongTermActivePromotions.has_key(val.sku) or amazonShortTermActivePromotions.has_key(val.sku))):
441
            temp = []
441
            temp = []
442
            temp.append(val)
442
            temp.append(val)
443
            temp.append("Promo misconfigured")
443
            temp.append("Promo misconfigured")
444
            continue
444
            continue
445
            
445
            
446
        scrapInfo.append(ourSkuDetails)
446
        scrapInfo.append(ourSkuDetails)
447
        sortedScrapInfo =  sorted(scrapInfo, key=itemgetter('promoPrice','notOurSku'))
447
        sortedScrapInfo =  sorted(scrapInfo, key=itemgetter('promoPrice','notOurSku'))
448
        for info in sortedScrapInfo:
448
        for info in sortedScrapInfo:
449
            if  not info.notOurSku:
449
            if  not info.notOurSku:
450
                ourSp = info.sellingPrice
450
                ourSp = info['sellingPrice']
451
                promoPrice = info.promoPrice
451
                promoPrice = info['promoPrice']
452
                isPromo = info.promotion
452
                isPromo = info['promotion']
453
                ourRank = iterator + 1
453
                ourRank = iterator + 1
454
            
454
            
455
            if iterator == 0:
455
            if iterator == 0:
456
                lowestSellerSp = info['promoPrice']
456
                lowestSellerSp = info['promoPrice']
457
                lowestSellerShippingTime = info['shippingTime']
457
                lowestSellerShippingTime = info['shippingTime']