| Line 70... |
Line 70... |
| 70 |
from shop2020.thriftpy.model.v1.order.ttypes import TransactionServiceException, \
|
70 |
from shop2020.thriftpy.model.v1.order.ttypes import TransactionServiceException, \
|
| 71 |
TransactionStatus, OrderStatus, DelayReason, ExtraTransactionProcessingType, \
|
71 |
TransactionStatus, OrderStatus, DelayReason, ExtraTransactionProcessingType, \
|
| 72 |
HotspotAction, TimeoutSummary, OrderStatusGroups, OrderType, RechargeOrderStatus, \
|
72 |
HotspotAction, TimeoutSummary, OrderStatusGroups, OrderType, RechargeOrderStatus, \
|
| 73 |
RechargeType, RechargeStatistics, DeviceNumberInfo, EmiChargeType, PayMethod, OrderSource,\
|
73 |
RechargeType, RechargeStatistics, DeviceNumberInfo, EmiChargeType, PayMethod, OrderSource,\
|
| 74 |
StorePaymentStatus, ProductCondition
|
74 |
StorePaymentStatus, ProductCondition
|
| 75 |
from shop2020.thriftpy.model.v1.user.ttypes import VoucherType
|
75 |
from shop2020.thriftpy.model.v1.user.ttypes import VoucherType, CouponCategory
|
| 76 |
from shop2020.thriftpy.payments.ttypes import PaymentException
|
76 |
from shop2020.thriftpy.payments.ttypes import PaymentException
|
| 77 |
#Start:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
|
77 |
#Start:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
|
| 78 |
from shop2020.thriftpy.crm.ttypes import *
|
78 |
from shop2020.thriftpy.crm.ttypes import *
|
| 79 |
#End:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
|
79 |
#End:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
|
| 80 |
from shop2020.thriftpy.warehouse.ttypes import ScanType, \
|
80 |
from shop2020.thriftpy.warehouse.ttypes import ScanType, \
|
| Line 928... |
Line 928... |
| 928 |
promotion_client = PromotionClient().get_client()
|
928 |
promotion_client = PromotionClient().get_client()
|
| 929 |
endOn = order.delivery_timestamp + datetime.timedelta(days = 30)
|
929 |
endOn = order.delivery_timestamp + datetime.timedelta(days = 30)
|
| 930 |
expiry = endOn.strftime("%A, %d. %B %Y")
|
930 |
expiry = endOn.strftime("%A, %d. %B %Y")
|
| 931 |
endOn = to_java_date(endOn)
|
931 |
endOn = to_java_date(endOn)
|
| 932 |
arguments = "{\"endOn\":" + str(endOn) + ", \"emails\":[\"" + order.customer_email + "\"], \"couponType\":\"both\", \"usage_limit_for_user\":1, \"isCod\":False, \"discount\":" + str(discount) + "}"
|
932 |
arguments = "{\"endOn\":" + str(endOn) + ", \"emails\":[\"" + order.customer_email + "\"], \"couponType\":\"both\", \"usage_limit_for_user\":1, \"isCod\":False, \"discount\":" + str(discount) + "}"
|
| 933 |
otgCoupon = promotion_client.createCoupon(28, '', arguments, False, "otg")
|
933 |
otgCoupon = promotion_client.createCoupon(28,CouponCategory.CUSTOMER_SATISFACTION , '', arguments, False, "otg")
|
| 934 |
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>'
|
934 |
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>'
|
| 935 |
thank_you_html = Template(thank_you_html).substitute(dict(prodName=order.lineitems[0], delayedDays = delayedDays, discount = discount, otgCoupon = otgCoupon, expiry = expiry))
|
935 |
thank_you_html = Template(thank_you_html).substitute(dict(prodName=order.lineitems[0], delayedDays = delayedDays, discount = discount, otgCoupon = otgCoupon, expiry = expiry))
|
| 936 |
elif fda:
|
936 |
elif fda:
|
| 937 |
fdaFormattedString = order.first_dlvyatmp_timestamp.strftime("%A, %d. %B %Y")
|
937 |
fdaFormattedString = order.first_dlvyatmp_timestamp.strftime("%A, %d. %B %Y")
|
| 938 |
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."""
|
938 |
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."""
|