Subversion Repositories SmartDukaan

Rev

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

Rev 15802 Rev 15803
Line 82... Line 82...
82
                if subOrder.has_key('productCode'):
82
                if subOrder.has_key('productCode'):
83
                    productCode = subOrder['productCode']
83
                    productCode = subOrder['productCode']
84
                merchantSubOrder = MerchantSubOrder(orderId, merchantOrderId, subOrder['merchantSubOrderId'], storeId, userId, productCode, subOrder['productTitle'], subOrder['amountPaid'], subOrder['quantity'], unitPrice, subOrder['status'], createdOnInt)
84
                merchantSubOrder = MerchantSubOrder(orderId, merchantOrderId, subOrder['merchantSubOrderId'], storeId, userId, productCode, subOrder['productTitle'], subOrder['amountPaid'], subOrder['quantity'], unitPrice, subOrder['status'], createdOnInt)
85
                product = None
85
                product = None
86
                if storeId in (1,2,4,5):
86
                if storeId in (1,2,4,5):
87
                    product = list(masterDataCollection.find({'identifier':subOrder['productCode'].strip(), 'source_id':storeId}))
87
                    product = list(masterDataCollection.find({'identifier':productCode.strip(), 'source_id':storeId}))
88
                elif storeId == 3:
88
                elif storeId == 3:
89
                    product = list(masterDataCollection.find({'secondaryIdentifier':subOrder['productCode'].strip(), 'source_id':storeId}))
89
                    product = list(masterDataCollection.find({'secondaryIdentifier':productCode.strip(), 'source_id':storeId}))
90
                if product is not None and len(product)>0:
90
                if product is not None and len(product)>0:
91
                    merchantSubOrder.brand = product[0]["brand"]
91
                    merchantSubOrder.brand = product[0]["brand"]
92
                else:
92
                else:
93
                    merchantSubOrder.brand = 'NA'
93
                    merchantSubOrder.brand = 'NA'
94
                
94