| Line 235... |
Line 235... |
| 235 |
productTitle = lineDet.find("a",{"class":"product-title"}).text
|
235 |
productTitle = lineDet.find("a",{"class":"product-title"}).text
|
| 236 |
productUrl = str(lineDet.find("a")['href'])
|
236 |
productUrl = str(lineDet.find("a")['href'])
|
| 237 |
|
237 |
|
| 238 |
start='pid='
|
238 |
start='pid='
|
| 239 |
s=str(lineDet.find("a")['href'])
|
239 |
s=str(lineDet.find("a")['href'])
|
| 240 |
productCode = re.findall(re.escape(start)+"(.*)",s)[0]
|
240 |
productCode = re.findall(re.escape(start)+"(.*)",s)[0].trim()
|
| 241 |
mname = lineDet.findAll("span")
|
241 |
mname = lineDet.findAll("span")
|
| 242 |
k=0
|
242 |
k=0
|
| 243 |
while k<len(mname):
|
243 |
while k<len(mname):
|
| 244 |
if "note" in str(mname[k]):
|
244 |
if "note" in str(mname[k]):
|
| 245 |
if "Color:" in str(mname[k]):
|
245 |
if "Color:" in str(mname[k]):
|
| Line 255... |
Line 255... |
| 255 |
k=k+1
|
255 |
k=k+1
|
| 256 |
merchantsubOrder = SubOrder(productTitle, productUrl, merchantOrder.placedOn, amountPaid,MStore.ORDER_PLACED, quantity)
|
256 |
merchantsubOrder = SubOrder(productTitle, productUrl, merchantOrder.placedOn, amountPaid,MStore.ORDER_PLACED, quantity)
|
| 257 |
merchantsubOrder.imgUrl = imgUrl
|
257 |
merchantsubOrder.imgUrl = imgUrl
|
| 258 |
merchantsubOrder.productCode = productCode
|
258 |
merchantsubOrder.productCode = productCode
|
| 259 |
merchantsubOrder.merchantSubOrderId = merchantSubOrderId
|
259 |
merchantsubOrder.merchantSubOrderId = merchantSubOrderId
|
| 260 |
cashbackAmount, cashbackPercent = self.getCashbackAmount(subOrder.productCode, amountPaid)
|
260 |
cashbackAmount, cashbackPercent = self.getCashbackAmount(productCode, amountPaid)
|
| 261 |
cashbackStatus = Store.CB_PENDING
|
261 |
cashbackStatus = Store.CB_PENDING
|
| 262 |
if cashbackAmount <= 0:
|
262 |
if cashbackAmount <= 0:
|
| 263 |
cashbackStatus = Store.CB_NA
|
263 |
cashbackStatus = Store.CB_NA
|
| 264 |
merchantsubOrder.cashBackAmount = cashbackAmount
|
264 |
merchantsubOrder.cashBackAmount = cashbackAmount
|
| 265 |
merchantsubOrder.cashBackStatus = cashbackStatus
|
265 |
merchantsubOrder.cashBackStatus = cashbackStatus
|