| Line 945... |
Line 945... |
| 945 |
endOn = order.delivery_timestamp + datetime.timedelta(days = 30)
|
945 |
endOn = order.delivery_timestamp + datetime.timedelta(days = 30)
|
| 946 |
expiry = endOn.strftime("%A, %d. %B %Y")
|
946 |
expiry = endOn.strftime("%A, %d. %B %Y")
|
| 947 |
endOn = to_java_date(endOn)
|
947 |
endOn = to_java_date(endOn)
|
| 948 |
arguments = "{\"endOn\":" + str(endOn) + ", \"emails\":[\"" + order.customer_email + "\"], \"couponType\":\"both\", \"usage_limit_for_user\":1, \"isCod\":False, \"discount\":" + str(discount) + "}"
|
948 |
arguments = "{\"endOn\":" + str(endOn) + ", \"emails\":[\"" + order.customer_email + "\"], \"couponType\":\"both\", \"usage_limit_for_user\":1, \"isCod\":False, \"discount\":" + str(discount) + "}"
|
| 949 |
otgCoupon = promotion_client.createCoupon(28,CouponCategory.CUSTOMER_SATISFACTION , '', arguments, False, "otg")
|
949 |
otgCoupon = promotion_client.createCoupon(28,CouponCategory.CUSTOMER_SATISFACTION , '', arguments, False, "otg")
|
| 950 |
thank_you_html = '$prodName ordered by you has been delivered. We apologise for a delay of $delayedDays business days.<br><br> As per our <b>On Time Guarantee</b> Please accept a Gift Voucher worth <b>Rs.$discount</b> as a token of our apology. <br><br>Your unique Gift Voucher Code is <b>$otgCoupon</b>. <br><br>You can use the same to buy any Mobile, Camera, Laptop, Tablet, Accessory or Mobile/DTH Recharge from our website.<br> Note:GV is valid till $expiry<br>'
|
950 |
thank_you_html = '$prodName ordered by you has been delivered. We apologise for a delay of $delayedDays business days.<br><br> As per our <b>On Time Guarantee</b> Please accept a Gift Voucher worth <b>Rs.$discount</b> as a token of our apology. <br><br>Your unique Gift Voucher Code is <b>$otgCoupon</b>. <br><br>You can use the same to buy any Mobile, Camera, Laptop, Tablet, Accessory or Mobile/DTH Recharge from our website.<br> Note:GV is valid till $expiry and GV amount cannot be split, please use the entire amount of GV in one transaction.<br>'
|
| 951 |
thank_you_html = Template(thank_you_html).substitute(dict(prodName=order.lineitems[0], delayedDays = delayedDays, discount = discount, otgCoupon = otgCoupon, expiry = expiry))
|
951 |
thank_you_html = Template(thank_you_html).substitute(dict(prodName=order.lineitems[0], delayedDays = delayedDays, discount = discount, otgCoupon = otgCoupon, expiry = expiry))
|
| 952 |
elif fda:
|
952 |
elif fda:
|
| 953 |
fdaFormattedString = order.first_dlvyatmp_timestamp.strftime("%A, %d. %B %Y")
|
953 |
fdaFormattedString = order.first_dlvyatmp_timestamp.strftime("%A, %d. %B %Y")
|
| 954 |
thank_you_html = str(order.lineitems[0]) + """ ordered by you has been delivered. The First Delivery attempt was made on """+ fdaFormattedString +""" , within our commited estimated time for delivery."""
|
954 |
thank_you_html = str(order.lineitems[0]) + """ ordered by you has been delivered. The First Delivery attempt was made on """+ fdaFormattedString +""" , within our commited estimated time for delivery."""
|
| 955 |
|
955 |
|