Subversion Repositories SmartDukaan

Rev

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

Rev 13921 Rev 13922
Line 143... Line 143...
143
        return result
143
        return result
144
    else:
144
    else:
145
        return result
145
        return result
146
 
146
 
147
def getDeals(category_id, offset, limit, sort, direction):
147
def getDeals(category_id, offset, limit, sort, direction):
148
    if (not bool(cashBackMap)) or (not bool(itemCashBackMap)):
148
    if not bool(cashBackMap):
149
        populateCashBack()
149
        populateCashBack()
150
    rank = 1
150
    rank = 1
151
    deals = {}
151
    deals = {}
152
    outer_query = []
152
    outer_query = []
153
    outer_query.append({"showDeal":1})
153
    outer_query.append({"showDeal":1})
Line 211... Line 211...
211
                return cashBack.get(category_id)
211
                return cashBack.get(category_id)
212
    else:
212
    else:
213
        return {}
213
        return {}
214
 
214
 
215
def getCashBackDetails(identifier, source_id):
215
def getCashBackDetails(identifier, source_id):
216
    if (not bool(cashBackMap)) or (not bool(itemCashBackMap)):
216
    if not bool(cashBackMap):
217
        populateCashBack()
217
        populateCashBack()
218
        
218
        
219
    """Need to add item level cashback, no data available right now."""
219
    """Need to add item level cashback, no data available right now."""
220
    
220
    
221
    if source_id in (1,2,4,5):
221
    if source_id in (1,2,4,5):
Line 244... Line 244...
244
    
244
    
245
    
245
    
246
    
246
    
247
 
247
 
248
def main():
248
def main():
249
    for x in getDeals(0, 0, 20, None, -1):
249
    populateCashBack()
250
        print x['source_id']
250
    cashBack =  __getCashBack(8840,3,5)
251
        print x['category_id']
251
    if not cashBack or cashBack.get('cash_back_status')!=1:
252
        print x['available_price']
252
        print "no"
253
        print x['cashBackAmount']
253
    else:
254
        print "===================="
254
        print cashBack 
255
    
255
    
256
    
256
    
257
if __name__=='__main__':
257
if __name__=='__main__':
258
    main()
258
    main()
259
259