Subversion Repositories SmartDukaan

Rev

Rev 20380 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20380 Rev 20381
Line 169... Line 169...
169
        print "Unable to load json for %d"%(data['_id'])
169
        print "Unable to load json for %d"%(data['_id'])
170
        return
170
        return
171
    
171
    
172
    instock = 0
172
    instock = 0
173
    buyBoxPrice = 0.0
173
    buyBoxPrice = 0.0
-
 
174
    lowestOfferPrice = 0.0
174
    isBuyBox = 1
175
    isBuyBox = 1
175
    
176
    
-
 
177
    try:
176
    buyBoxStock = int(vendor_data['vendorDtlSRO']['vendorDetailInventoryPricingSRO']['buyableInventory'])
178
        buyBoxStock = int(vendor_data['vendorDtlSRO']['vendorDetailInventoryPricingSRO']['buyableInventory'])
177
    soldOut = vendor_data['vendorDtlSRO']['vendorDetailInventoryPricingSRO']['soldOut']
179
        soldOut = vendor_data['vendorDtlSRO']['vendorDetailInventoryPricingSRO']['soldOut']
178
    instock = 1 if not soldOut else 0
180
        instock = 1 if not soldOut else 0
179
    if buyBoxStock >0:
181
        if buyBoxStock >0:
180
        buyBoxPrice = float(vendor_data['vendorDtlSRO']['finalPrice'])
182
            buyBoxPrice = float(vendor_data['vendorDtlSRO']['finalPrice'])
181
        
183
            
182
    lowestOfferPrice = float(vendor_data['auxiliarySellerInfo']['priceStartRange'])
184
        lowestOfferPrice = float(vendor_data['auxiliarySellerInfo']['priceStartRange'])
-
 
185
    except:
-
 
186
        traceback.print_exc()
183
    
187
    
184
    if buyBoxPrice != lowestOfferPrice:
188
    if buyBoxPrice != lowestOfferPrice:
185
        isBuyBox = 0
189
        isBuyBox = 0
186
 
190
 
187
    print lowestOfferPrice
191
    print lowestOfferPrice