| Line 205... |
Line 205... |
| 205 |
i +=1
|
205 |
i +=1
|
| 206 |
imgDiv = productDiv.div.div
|
206 |
imgDiv = productDiv.div.div
|
| 207 |
detailDiv = imgDiv.find_next_sibling('div')
|
207 |
detailDiv = imgDiv.find_next_sibling('div')
|
| 208 |
detailDivs = detailDiv.findAll('div', recursive=False)
|
208 |
detailDivs = detailDiv.findAll('div', recursive=False)
|
| 209 |
arr = detailDivs[0].a.text.strip().split(" of ", 1)
|
209 |
arr = detailDivs[0].a.text.strip().split(" of ", 1)
|
| 210 |
(productTitle, quantity) = (arr[-1], (1 if type(arr[0])==str else int(arr[0])) )
|
210 |
(productTitle, quantity) = (arr[-1], (1 if len(arr)==1 else int(arr[0])) )
|
| 211 |
unitPrice = int(float(detailDivs[2].span.text.replace('Rs. ','').replace(',','')))
|
211 |
unitPrice = int(float(detailDivs[2].span.text.replace('Rs. ','').replace(',','')))
|
| 212 |
amountPaid = int((unitPrice*quantity*totalPaid)/subTotal)
|
212 |
amountPaid = int((unitPrice*quantity*totalPaid)/subTotal)
|
| 213 |
productUrl = "http://www.amazon.in" + detailDivs[0].a.get('href')
|
213 |
productUrl = "http://www.amazon.in" + detailDivs[0].a.get('href')
|
| 214 |
subOrder = SubOrder(productTitle, productUrl, merchantOrder.placedOn, amountPaid, MStore.ORDER_PLACED, quantity)
|
214 |
subOrder = SubOrder(productTitle, productUrl, merchantOrder.placedOn, amountPaid, MStore.ORDER_PLACED, quantity)
|
| 215 |
subOrder.productCode = productUrl.split('/')[5]
|
215 |
subOrder.productCode = productUrl.split('/')[5]
|