| Line 370... |
Line 370... |
| 370 |
<div>
|
370 |
<div>
|
| 371 |
Order Date: $order_date
|
371 |
Order Date: $order_date
|
| 372 |
</div>
|
372 |
</div>
|
| 373 |
<div>
|
373 |
<div>
|
| 374 |
<table>
|
374 |
<table>
|
| 375 |
<tr><td colspan="5"><hr /></td></tr>
|
375 |
<tr><td colspan="6"><hr /></td></tr>
|
| 376 |
<tr><td colspan="5" align="left"><b>Order Details</b></td></tr>
|
376 |
<tr><td colspan="6" align="left"><b>Order Details</b></td></tr>
|
| 377 |
<tr><td colspan="5"><hr /></td></tr>
|
377 |
<tr><td colspan="6"><hr /></td></tr>
|
| 378 |
<tr>
|
378 |
<tr>
|
| 379 |
<th width="100">Order No.</th>
|
379 |
<th width="100">Order No.</th>
|
| 380 |
<th>Product</th>
|
380 |
<th>Product</th>
|
| - |
|
381 |
<th width="100">Estimated Delivery Date</th>
|
| 381 |
<th width="100">Quantity</th>
|
382 |
<th width="100">Quantity</th>
|
| 382 |
<th width="100">Unit Price</th>
|
383 |
<th width="100">Unit Price</th>
|
| 383 |
<th width="100">Amount</th>
|
384 |
<th width="100">Amount</th>
|
| 384 |
</tr>
|
385 |
</tr>
|
| 385 |
"""
|
386 |
"""
|
| Line 398... |
Line 399... |
| 398 |
customer_name = order.customer_name
|
399 |
customer_name = order.customer_name
|
| 399 |
order_date = order.created_timestamp
|
400 |
order_date = order.created_timestamp
|
| 400 |
user_email = order.customer_email
|
401 |
user_email = order.customer_email
|
| 401 |
html_tr = "<tr><td align='center'>" + str(order.id) + "</td>"
|
402 |
html_tr = "<tr><td align='center'>" + str(order.id) + "</td>"
|
| 402 |
|
403 |
|
| - |
|
404 |
sdt = datetime.datetime.strptime(str(orders[0].expected_delivery_time), "%Y-%m-%d %H:%M:%S")
|
| - |
|
405 |
store_delivery_date = sdt.strftime("%d %B %Y")
|
| - |
|
406 |
|
| 403 |
if order.pickupStoreId:
|
407 |
if order.pickupStoreId:
|
| 404 |
attribute = Attribute()
|
408 |
attribute = Attribute()
|
| 405 |
attribute.orderId = order.id
|
409 |
attribute.orderId = order.id
|
| 406 |
attribute.name = "SECRET_CODE"
|
410 |
attribute.name = "SECRET_CODE"
|
| 407 |
attribute.value = random_text
|
411 |
attribute.value = random_text
|
| Line 409... |
Line 413... |
| 409 |
|
413 |
|
| 410 |
for lineitem in order.lineitems:
|
414 |
for lineitem in order.lineitems:
|
| 411 |
lineitem_total_price = round(lineitem.total_price, 2)
|
415 |
lineitem_total_price = round(lineitem.total_price, 2)
|
| 412 |
|
416 |
|
| 413 |
html_tr += "<td>" + str(lineitem) + "</td>"
|
417 |
html_tr += "<td>" + str(lineitem) + "</td>"
|
| - |
|
418 |
html_tr += "<td align='center'>" + store_delivery_date + "</td>"
|
| 414 |
html_tr += "<td align='center'>" + ("%.0f" % lineitem.quantity) + "</td>"
|
419 |
html_tr += "<td align='center'>" + ("%.0f" % lineitem.quantity) + "</td>"
|
| 415 |
html_tr += "<td align='center'> Rs. " + ("%.2f" % lineitem.unit_price) + "</td>"
|
420 |
html_tr += "<td align='center'> Rs. " + ("%.2f" % lineitem.unit_price) + "</td>"
|
| 416 |
html_tr += "<td align='center'> Rs. " + ("%.2f" % lineitem_total_price) + "</td></tr>"
|
421 |
html_tr += "<td align='center'> Rs. " + ("%.2f" % lineitem_total_price) + "</td></tr>"
|
| 417 |
total_amount += lineitem_total_price
|
422 |
total_amount += lineitem_total_price
|
| 418 |
html_table += html_tr
|
423 |
html_table += html_tr
|
| 419 |
|
424 |
|
| 420 |
html_footer = """
|
425 |
html_footer = """
|
| 421 |
<tr><td colspan=5> </td></tr>
|
426 |
<tr><td colspan=6> </td></tr>
|
| 422 |
<tr><td colspan=5><hr /></td></tr>
|
427 |
<tr><td colspan=6><hr /></td></tr>
|
| 423 |
<tr>
|
428 |
<tr>
|
| 424 |
<td colspan=4>Total Amount</td>
|
429 |
<td colspan=5>Total Amount</td>
|
| 425 |
<td> Rs. $total_amount</td>
|
430 |
<td> Rs. $total_amount</td>
|
| 426 |
</tr>
|
431 |
</tr>
|
| 427 |
</table>
|
432 |
</table>
|
| 428 |
</div>
|
433 |
</div>
|
| 429 |
"""
|
434 |
"""
|
| Line 433... |
Line 438... |
| 433 |
store = LogisticsClient().get_client().getPickupStore(orders[0].pickupStoreId)
|
438 |
store = LogisticsClient().get_client().getPickupStore(orders[0].pickupStoreId)
|
| 434 |
store_address = __get_store_address_html(store)
|
439 |
store_address = __get_store_address_html(store)
|
| 435 |
|
440 |
|
| 436 |
html_pickup_text = html_pickup_text + """
|
441 |
html_pickup_text = html_pickup_text + """
|
| 437 |
<h3>Steps to Pickup In Store</h3>
|
442 |
<h3>Steps to Pickup In Store</h3>
|
| 438 |
1) Estimated arrival date of your product(s) is $store_delivery_date at your selected Store.<br>
|
- |
|
| 439 |
2) You will receive a confirmation email from us when your product(s) reaches the store. Once you receive the same, please visit the following store selected by you.<br>
|
443 |
1) You will receive a confirmation email from us when your product(s) reaches the store. Once you receive the same, please visit the following store selected by you.<br>
|
| 440 |
<br><i>$store_address</i><br>
|
444 |
<br><i>$store_address</i><br>
|
| 441 |
"""
|
445 |
"""
|
| 442 |
|
446 |
|
| 443 |
if orders[0].cod:
|
447 |
if orders[0].cod:
|
| 444 |
html_pickup_text = html_pickup_text + """
|
448 |
html_pickup_text = html_pickup_text + """
|
| 445 |
3) Pay Rs. $total_amount, present a valid Photo Identity Proof* and use your Secret Code <b><i>$secret_code</i></b> to claim your Product(s).<br><br>
|
449 |
2) Pay Rs. $total_amount, present a valid Photo Identity Proof* and use your Secret Code <b><i>$secret_code</i></b> to claim your Product(s).<br><br>
|
| 446 |
*Valid Photo Identity Proof are Driving License, Passport, PAN Card, Voter ID, Company Issued ID Card, College issued Student ID Card Or any other Government approved Photo Id.<br>
|
450 |
*Valid Photo Identity Proof are Driving License, Passport, PAN Card, Voter ID, Company Issued ID Card, College issued Student ID Card Or any other Government approved Photo Id.<br>
|
| 447 |
<br>
|
451 |
<br>
|
| 448 |
In case you have any questions please visit <a href="www.saholic.com/static/buy-online-and-pickup-in-store">Details on Pickup in Store</a>. If you still have more questions feel free to contact us 24/7 via <a href="http://www.saholic.com/contact-us">http://www.saholic.com/contact-us</a>
|
452 |
In case you have any questions please visit <a href="www.saholic.com/static/buy-online-and-pickup-in-store">Details on Pickup in Store</a>. If you still have more questions feel free to contact us 24/7 via <a href="http://www.saholic.com/contact-us">http://www.saholic.com/contact-us</a>
|
| 449 |
</br><hr />
|
453 |
</br><hr />
|
| 450 |
"""
|
454 |
"""
|
| 451 |
else:
|
455 |
else:
|
| 452 |
html_pickup_text = html_pickup_text + """
|
456 |
html_pickup_text = html_pickup_text + """
|
| 453 |
3) Present a valid Photo Identity Proof* and use your Secret Code <b><i>$secret_code</i></b> to claim your Product(s).<br><br>
|
457 |
2) Present a valid Photo Identity Proof* and use your Secret Code <b><i>$secret_code</i></b> to claim your Product(s).<br><br>
|
| 454 |
*Valid Photo Identity Proof are Driving License, Passport, PAN Card, Voter ID, Company Issued ID Card, College issued Student ID Card Or any other Government approved Photo Id.<br>
|
458 |
*Valid Photo Identity Proof are Driving License, Passport, PAN Card, Voter ID, Company Issued ID Card, College issued Student ID Card Or any other Government approved Photo Id.<br>
|
| 455 |
<br>
|
459 |
<br>
|
| 456 |
In case you have any questions please visit <a href="www.saholic.com/static/buy-online-and-pickup-in-store">Details on Pickup in Store</a>. If you still have more questions feel free to contact us 24/7 via <a href="http://www.saholic.com/contact-us">http://www.saholic.com/contact-us</a>
|
460 |
In case you have any questions please visit <a href="www.saholic.com/static/buy-online-and-pickup-in-store">Details on Pickup in Store</a>. If you still have more questions feel free to contact us 24/7 via <a href="http://www.saholic.com/contact-us">http://www.saholic.com/contact-us</a>
|
| 457 |
</br><hr />
|
461 |
</br><hr />
|
| 458 |
"""
|
462 |
"""
|