Subversion Repositories SmartDukaan

Rev

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

Rev 14617 Rev 14626
Line 32... Line 32...
32
AFF_STATUS_PENDING='pending'
32
AFF_STATUS_PENDING='pending'
33
 
33
 
34
 
34
 
35
class Store(MStore):
35
class Store(MStore):
36
    OrderStatusMap = {
36
    OrderStatusMap = {
37
                      main.Store.ORDER_PLACED : ['Approval', 'Processing'],
37
                      main.Store.ORDER_PLACED : ['approval', 'processing'],
38
                      main.Store.ORDER_DELIVERED : ['Shipping'],
38
                      main.Store.ORDER_DELIVERED : ['shipping'],
39
                      main.Store.ORDER_SHIPPED : ['In Transit'],
39
                      main.Store.ORDER_SHIPPED : ['in transit'],
40
                      main.Store.ORDER_CANCELLED : ['shipment is returned']
40
                      main.Store.ORDER_CANCELLED : ['shipment is returned']
41
                      
41
                      
42
                      }
42
                      }
43
    def __init__(self,store_id):
43
    def __init__(self,store_id):
44
        client = MongoClient('mongodb://localhost:27017/')
44
        client = MongoClient('mongodb://localhost:27017/')
Line 326... Line 326...
326
            resp['result'] = 'ORDER_NOT_CREATED'
326
            resp['result'] = 'ORDER_NOT_CREATED'
327
            return resp 
327
            return resp 
328
            
328
            
329
    def _getStatusFromDetailedStatus(self, detailedStatus):
329
    def _getStatusFromDetailedStatus(self, detailedStatus):
330
        for key, value in Store.OrderStatusMap.iteritems():
330
        for key, value in Store.OrderStatusMap.iteritems():
331
            if detailedStatus.lower() in value.lower():
331
            if detailedStatus.lower() in value:
332
                return key
332
                return key
333
        print "Detailed Status need to be mapped", detailedStatus
333
        print "Detailed Status need to be mapped", detailedStatus
334
        raise ParseException("_getStatusFromDetailedStatus", "Found new order status" + detailedStatus)
334
        raise ParseException("_getStatusFromDetailedStatus", "Found new order status" + detailedStatus)
335
    
335
    
336
    def flipkartOrderTracking(self, orderId, subTagId, userId, rawHtml, orderSuccessUrl):
336
    def flipkartOrderTracking(self, orderId, subTagId, userId, rawHtml, orderSuccessUrl):