| Line 505... |
Line 505... |
| 505 |
email_header = Template(html_header).substitute(dict(order_date = formated_order_date, customer_name = customer_name, source_url = source_url))
|
505 |
email_header = Template(html_header).substitute(dict(order_date = formated_order_date, customer_name = customer_name, source_url = source_url))
|
| 506 |
email_footer = Template(html_footer).substitute(dict(total_amount = "%.2f" % total_amount, secret_code = random_text, store_address = store_address, store_delivery_date = store_delivery_date, source_url = source_url, source_name = source_name))
|
506 |
email_footer = Template(html_footer).substitute(dict(total_amount = "%.2f" % total_amount, secret_code = random_text, store_address = store_address, store_delivery_date = store_delivery_date, source_url = source_url, source_name = source_name))
|
| 507 |
|
507 |
|
| 508 |
try:
|
508 |
try:
|
| 509 |
helper_client = HelperClient().get_client()
|
509 |
helper_client = HelperClient().get_client()
|
| 510 |
##FIXME Remove once tesing is done
|
- |
|
| 511 |
if orders[0].pickupStoreId:
|
- |
|
| 512 |
helper_client.saveUserEmailForSending([user_email], "", source_name + " - Order Details", email_header + html_table + email_footer, str(transaction_id), "TransactionInfo", [], ["abhishek.mathur@shop2020.in"])
|
- |
|
| 513 |
else:
|
- |
|
| 514 |
helper_client.saveUserEmailForSending([user_email], "", source_name + " - Order Details", email_header + html_table + email_footer, str(transaction_id), "TransactionInfo", [], [])
|
510 |
helper_client.saveUserEmailForSending([user_email], "", source_name + " - Order Details", email_header + html_table + email_footer, str(transaction_id), "TransactionInfo", [], [])
|
| 515 |
|
511 |
|
| 516 |
return True
|
512 |
return True
|
| 517 |
except Exception as e:
|
513 |
except Exception as e:
|
| 518 |
print e
|
514 |
print e
|
| 519 |
return False
|
515 |
return False
|
| Line 624... |
Line 620... |
| 624 |
email_header = Template(html_header).substitute(dict(order_date = formated_order_date, customer_name = customer_name, order_expiry_date = formated_order_expiry_date, source_url = source_url, source_name = source_name))
|
620 |
email_header = Template(html_header).substitute(dict(order_date = formated_order_date, customer_name = customer_name, order_expiry_date = formated_order_expiry_date, source_url = source_url, source_name = source_name))
|
| 625 |
email_footer = Template(html_footer).substitute(dict(total_amount = "%.2f" % total_amount, secret_code = random_text, store_address = store_address, order_expiry_date = formated_order_expiry_date, source_url = source_url, source_name = source_name))
|
621 |
email_footer = Template(html_footer).substitute(dict(total_amount = "%.2f" % total_amount, secret_code = random_text, store_address = store_address, order_expiry_date = formated_order_expiry_date, source_url = source_url, source_name = source_name))
|
| 626 |
|
622 |
|
| 627 |
try:
|
623 |
try:
|
| 628 |
helper_client = HelperClient(host_key = "helper_service_server_host_prod").get_client()
|
624 |
helper_client = HelperClient(host_key = "helper_service_server_host_prod").get_client()
|
| 629 |
##FIXME Remove once tesing is done
|
- |
|
| 630 |
if order.pickupStoreId:
|
- |
|
| 631 |
helper_client.saveUserEmailForSending([user_email], "", subject, email_header + html_table + email_footer, str(order.id), "ReceivedAtStore", [], ["abhishek.mathur@shop2020.in"])
|
- |
|
| 632 |
else:
|
- |
|
| 633 |
helper_client.saveUserEmailForSending([user_email], "", subject, email_header + html_table + email_footer, str(order.id), "ReceivedAtStore", [], [])
|
625 |
helper_client.saveUserEmailForSending([user_email], "", subject, email_header + html_table + email_footer, str(order.id), "ReceivedAtStore", [], [])
|
| 634 |
return True
|
626 |
return True
|
| 635 |
except Exception as e:
|
627 |
except Exception as e:
|
| 636 |
print e
|
628 |
print e
|
| 637 |
return False
|
629 |
return False
|
| 638 |
|
630 |
|
| Line 721... |
Line 713... |
| 721 |
email_header = Template(html_header).substitute(dict(order_date = formated_order_date, customer_name = customer_name, pickup_text = pickup_text, source_url = source_url))
|
713 |
email_header = Template(html_header).substitute(dict(order_date = formated_order_date, customer_name = customer_name, pickup_text = pickup_text, source_url = source_url))
|
| 722 |
email_footer = Template(html_footer).substitute(dict(total_amount = "%.2f" % total_amount, source_name = source_name))
|
714 |
email_footer = Template(html_footer).substitute(dict(total_amount = "%.2f" % total_amount, source_name = source_name))
|
| 723 |
|
715 |
|
| 724 |
try:
|
716 |
try:
|
| 725 |
helper_client = HelperClient(host_key = "helper_service_server_host_prod").get_client()
|
717 |
helper_client = HelperClient(host_key = "helper_service_server_host_prod").get_client()
|
| 726 |
##FIXME Remove once tesing is done
|
- |
|
| 727 |
if order.pickupStoreId:
|
- |
|
| 728 |
helper_client.saveUserEmailForSending([user_email], "", subject, email_header + html_table + email_footer, str(order.id), "DeliverySuccess", [], ["abhishek.mathur@shop2020.in"])
|
- |
|
| 729 |
else:
|
- |
|
| 730 |
helper_client.saveUserEmailForSending([user_email], "", subject, email_header + html_table + email_footer, str(order.id), "DeliverySuccess", [], [])
|
718 |
helper_client.saveUserEmailForSending([user_email], "", subject, email_header + html_table + email_footer, str(order.id), "DeliverySuccess", [], [])
|
| 731 |
return True
|
719 |
return True
|
| 732 |
except Exception as e:
|
720 |
except Exception as e:
|
| 733 |
print e
|
721 |
print e
|
| 734 |
return False
|
722 |
return False
|
| 735 |
|
723 |
|
| Line 3682... |
Line 3670... |
| 3682 |
email_header = Template(html_header).substitute(dict(order_id = display_order_id, order_date = formated_order_date, email = email, source_url = source_url, order_amount = recharge_order.totalAmount, order_status = status, device_number = deviceNumber, service_provider = providerName))
|
3670 |
email_header = Template(html_header).substitute(dict(order_id = display_order_id, order_date = formated_order_date, email = email, source_url = source_url, order_amount = recharge_order.totalAmount, order_status = status, device_number = deviceNumber, service_provider = providerName))
|
| 3683 |
email_footer = Template(html_footer).substitute(dict(source_url = source_url, source_name = source_name))
|
3671 |
email_footer = Template(html_footer).substitute(dict(source_url = source_url, source_name = source_name))
|
| 3684 |
|
3672 |
|
| 3685 |
try:
|
3673 |
try:
|
| 3686 |
helper_client = HelperClient().get_client()
|
3674 |
helper_client = HelperClient().get_client()
|
| 3687 |
helper_client.saveUserEmailForSending([email], "", source_name + " - Recharge Order Details", email_header + email_footer, str(recharge_order.id), "RechargeInfo", [], ["abhishek.mathur@shop2020.in", "rajneesharora@spiceretail.co.in", "suraj.sharma@shop2020.in"])
|
3675 |
helper_client.saveUserEmailForSending([email], "", source_name + " - Recharge Order Details", email_header + email_footer, str(recharge_order.id), "RechargeInfo", [], [])
|
| 3688 |
return True
|
3676 |
return True
|
| 3689 |
except Exception as e:
|
3677 |
except Exception as e:
|
| 3690 |
print e
|
3678 |
print e
|
| 3691 |
return False
|
3679 |
return False
|
| 3692 |
|
3680 |
|