Subversion Repositories SmartDukaan

Rev

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

Rev 12439 Rev 12441
Line 391... Line 391...
391
    for item in itemInfo:
391
    for item in itemInfo:
392
        skus.append(item.sku)
392
        skus.append(item.sku)
393
    ourPricingForSku = amScraper.get_my_pricing_for_sku('A21TJRUUN4KGV', skus)
393
    ourPricingForSku = amScraper.get_my_pricing_for_sku('A21TJRUUN4KGV', skus)
394
    for item in itemInfo:
394
    for item in itemInfo:
395
        ourPricing = ourPricingForSku.get(item.sku)
395
        ourPricing = ourPricingForSku.get(item.sku)
396
        if len(ourPricing.keys())==0 or ourPricing is None:
396
        if ourPricing is None or len(ourPricing.keys())==0:
397
            item.ourSp = 0
397
            item.ourSp = 0
398
            item.promoPrice = 0
398
            item.promoPrice = 0
399
            item.isPromotion = False
399
            item.isPromotion = False
400
        else:
400
        else:
401
            item.ourSp = ourPricing.get('sellingPrice')
401
            item.ourSp = ourPricing.get('sellingPrice')
Line 416... Line 416...
416
        if len(scrapInfo)==0 or val.nlc==0 or len(ourPricingForSku.get(val.sku).keys())==0:
416
        if len(scrapInfo)==0 or val.nlc==0 or len(ourPricingForSku.get(val.sku).keys())==0:
417
            temp = []
417
            temp = []
418
            temp.append(val)
418
            temp.append(val)
419
            if val.nlc==0 or val.nlc is None:
419
            if val.nlc==0 or val.nlc is None:
420
                temp.append("WANLC is 0")
420
                temp.append("WANLC is 0")
421
            elif len(ourPricingForSku.get(val.sku).keys())==0:
421
            elif len(ourPricingForSku.get(val.sku) is None or ourPricingForSku.get(val.sku).keys())==0:
422
                temp.append("Unable to fetch our price")
422
                temp.append("Unable to fetch our price")
423
            else:
423
            else:
424
                temp.append("Unable to fetch competitive pricing")
424
                temp.append("Unable to fetch competitive pricing")
425
            exceptionList.append(temp)
425
            exceptionList.append(temp)
426
            continue
426
            continue