Subversion Repositories SmartDukaan

Rev

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

Rev 18727 Rev 19665
Line 306... Line 306...
306
                summarySection = pq(el)
306
                summarySection = pq(el)
307
                counter += 1
307
                counter += 1
308
            if counter == 3:
308
            if counter == 3:
309
                break
309
                break
310
        
310
        
311
        print "detail" if detailSection else "", "shipment" if shipmentSection else "", "summary" if summarySection else ""
-
 
312
        
-
 
313
        print pq(detailSection('li .a-row .a-span-last')[0]).text(), pq(detailSection('li .a-row .a-span-last')[1]).text(), pq(detailSection('li .a-row .a-span-last')[2]).text()
-
 
314
        
-
 
315
        i=-1    
311
        i=-1    
316
        for s in shipmentSection('.a-box-group'):
312
        for s in shipmentSection('.a-box-group'):
317
            shipmentGroup = pq(s)
313
            shipmentGroup = pq(s)
318
            for shipment in shipmentGroup('.a-box'):
314
            for shipment in shipmentGroup('.a-box'):
319
                i += 1 
315
                i += 1 
Line 330... Line 326...
330
                    #print pImg('a').attr('href'), pImg('a').attr('title'), pImg('img').attr('src'), pQty('.a-row:nth-child(2)')('span').text().split(':')[1].strip(), pQty('span.currencyINR')
326
                    #print pImg('a').attr('href'), pImg('a').attr('title'), pImg('img').attr('src'), pQty('.a-row:nth-child(2)')('span').text().split(':')[1].strip(), pQty('span.currencyINR')
331
                    productUrl = pImg('a').attr('href'), 
327
                    productUrl = pImg('a').attr('href'), 
332
                    qty = pQty('.a-row:nth-child(2)')('span').text().split(':')[1].strip()
328
                    qty = pQty('.a-row:nth-child(2)')('span').text().split(':')[1].strip()
333
                    price = int(float(pQty('nobr').text().replace('Rs.','').replace(',', '')))
329
                    price = int(float(pQty('nobr').text().replace('Rs.','').replace(',', '')))
334
                    #subOrder = SubOrder(productTitle, productUrl, merchantOrder.placedOn, amountPaid, MStore.ORDER_PLACED, quantity)
330
                    #subOrder = SubOrder(productTitle, productUrl, merchantOrder.placedOn, amountPaid, MStore.ORDER_PLACED, quantity)
335
                    
-
 
336
                        
-
 
337
        raise   
331
        raise   
338
           
-
 
339
                
-
 
340
        merchantOrder.orderTrackingUrl = merchantOrder.orderSuccessUrl
332
        merchantOrder.orderTrackingUrl = merchantOrder.orderSuccessUrl
341
        merchantOrder.placedOn
333
        merchantOrder.placedOn
342
        merchantOrder.merchantOrderId
334
        merchantOrder.merchantOrderId
343
        merchantOrder.paidAmount
335
        merchantOrder.paidAmount
344
 
336