| Line 3396... |
Line 3396... |
| 3396 |
|
3396 |
|
| 3397 |
lclient = LogisticsClient().get_client()
|
3397 |
lclient = LogisticsClient().get_client()
|
| 3398 |
logistics_info = lclient.getLogisticsEstimation(order.lineitems[0].item_id, order.customer_pincode, DeliveryType.PREPAID)
|
3398 |
logistics_info = lclient.getLogisticsEstimation(order.lineitems[0].item_id, order.customer_pincode, DeliveryType.PREPAID)
|
| 3399 |
dt = datetime.datetime.strptime(str(order.shipping_timestamp), "%Y-%m-%d %H:%M:%S")
|
3399 |
dt = datetime.datetime.strptime(str(order.shipping_timestamp), "%Y-%m-%d %H:%M:%S")
|
| 3400 |
shipping_date = dt.strftime("%A, %d %B %Y %I:%M%p")
|
3400 |
shipping_date = dt.strftime("%A, %d %B %Y %I:%M%p")
|
| 3401 |
product = "%s %s %s" % (order.lineitems[0].brand, order.lineitems[0].model_name, order.lineitems[0].model_number)
|
3401 |
product = str(order.lineitems[0])
|
| 3402 |
new_expected_delivery_timestamp = datetime.datetime.now() + timedelta(adjust_delivery_time(datetime.datetime.now(), (logistics_info.deliveryTime - logistics_info.shippingTime)))
|
3402 |
new_expected_delivery_timestamp = datetime.datetime.now() + timedelta(adjust_delivery_time(datetime.datetime.now(), (logistics_info.deliveryTime - logistics_info.shippingTime)))
|
| 3403 |
#update new expected timestamp
|
3403 |
#update new expected timestamp
|
| 3404 |
if order.cod:
|
3404 |
if order.cod:
|
| 3405 |
new_expected_delivery_timestamp = new_expected_delivery_timestamp.replace(hour=COD_SHIPPING_CUTOFF_TIME, minute=0, second=0, microsecond=0)
|
3405 |
new_expected_delivery_timestamp = new_expected_delivery_timestamp.replace(hour=COD_SHIPPING_CUTOFF_TIME, minute=0, second=0, microsecond=0)
|
| 3406 |
else:
|
3406 |
else:
|
| Line 3411... |
Line 3411... |
| 3411 |
new_expected_delivery_date = new_expected_delivery_timestamp.strftime("%A, %d %B %Y")
|
3411 |
new_expected_delivery_date = new_expected_delivery_timestamp.strftime("%A, %d %B %Y")
|
| 3412 |
otg_text = ""
|
3412 |
otg_text = ""
|
| 3413 |
if order.otg:
|
3413 |
if order.otg:
|
| 3414 |
promised_delivery_date = order.promised_delivery_time.strftime("%A, %d %B %Y")
|
3414 |
promised_delivery_date = order.promised_delivery_time.strftime("%A, %d %B %Y")
|
| 3415 |
if new_expected_delivery_timestamp > order.promised_delivery_time:
|
3415 |
if new_expected_delivery_timestamp > order.promised_delivery_time:
|
| 3416 |
otg_text = 'Your order is covered under our <a href="http://www.saholic.com/static/on-time-guarantee">On Time Guarantee; We Pay if we Delay.</a> We apologize in advance for the expected delay from our initial promised delivery date of ' + promised_delivery_date + '. Your will receive a Gift Voucher Code at time of delivery based on the actual delay. You can use the same to buy any Mobile, Camera, Laptop, Tablet or Accessory from our website.'
|
3416 |
otg_text = 'Your order is covered under our <a href="http://www.saholic.com/static/on-time-guarantee">On Time Guarantee; We Pay if we Delay.</a> We apologize in advance for the expected delay from our initial promised delivery date of ' + promised_delivery_date + '. Your will receive a Gift Voucher Code at time of delivery based on the actual delay. You can use the same to buy any Mobile, Camera, Laptop, Tablet, Accessory or Mobile/DTH Recharge from our website.'
|
| 3417 |
elif new_expected_delivery_timestamp < order.promised_delivery_time:
|
3417 |
elif new_expected_delivery_timestamp < order.promised_delivery_time:
|
| 3418 |
otg_text = 'We are happy to inform you that we expect to deliver your order before time. Your order is covered under our <a href="http://www.saholic.com/static/on-time-guarantee">On Time Guarantee; We Pay if we Delay.</a> Please note, compensation for delay (If Any) will be computed from the initial promised delivery date of ' + promised_delivery_date + '.'
|
3418 |
otg_text = 'We are happy to inform you that we expect to deliver your order before time. Your order is covered under our <a href="http://www.saholic.com/static/on-time-guarantee">On Time Guarantee; We Pay if we Delay.</a> Please note, compensation for delay (If Any) will be computed from the initial promised delivery date of ' + promised_delivery_date + '.'
|
| 3419 |
else:
|
3419 |
else:
|
| 3420 |
otg_text = 'Your order is covered under our <a href="http://www.saholic.com/static/on-time-guarantee">On Time Guarantee; We Pay if we Delay.</a> We are committed to deliver your order by our initial promised delivery date of ' + promised_delivery_date + '.'
|
3420 |
otg_text = 'Your order is covered under our <a href="http://www.saholic.com/static/on-time-guarantee">On Time Guarantee; We Pay if we Delay.</a> We are committed to deliver your order by our initial promised delivery date of ' + promised_delivery_date + '.'
|
| 3421 |
|
3421 |
|