Subversion Repositories SmartDukaan

Rev

Rev 5809 | Rev 5816 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5809 Rev 5812
Line 592... Line 592...
592
 
592
 
593
    email_header = Template(html_header).substitute(dict(order_date = formated_order_date, customer_name = customer_name, order_expiry_date = formated_order_expiry_date))
593
    email_header = Template(html_header).substitute(dict(order_date = formated_order_date, customer_name = customer_name, order_expiry_date = formated_order_expiry_date))
594
    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))
594
    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))
595
    
595
    
596
    try:
596
    try:
597
        helper_client = HelperClient().get_client()
597
        helper_client = HelperClient(host_key = "helper_service_server_host_prod").get_client()
598
        helper_client.saveUserEmailForSending(user_email, "", subject, email_header + html_table + email_footer, str(order.id), "ReceivedAtStore")
598
        helper_client.saveUserEmailForSending(user_email, "", subject, email_header + html_table + email_footer, str(order.id), "ReceivedAtStore")
599
        ##FIXME Remove once tesing is done
599
        ##FIXME Remove once tesing is done
600
        if order.pickupStoreId:
600
        if order.pickupStoreId:
601
            helper_client.saveUserEmailForSending("abhishek.mathur@shop2020.in", "", subject, email_header + html_table + email_footer, str(order.id), "ReceivedAtStore")
601
            helper_client.saveUserEmailForSending("abhishek.mathur@shop2020.in", "", subject, email_header + html_table + email_footer, str(order.id), "ReceivedAtStore")
602
        return True
602
        return True
Line 688... Line 688...
688
    
688
    
689
    email_header = Template(html_header).substitute(dict(order_date = formated_order_date, customer_name = customer_name, pickup_text = pickup_text))
689
    email_header = Template(html_header).substitute(dict(order_date = formated_order_date, customer_name = customer_name, pickup_text = pickup_text))
690
    email_footer = Template(html_footer).substitute(dict(total_amount = "%.2f" % total_amount))
690
    email_footer = Template(html_footer).substitute(dict(total_amount = "%.2f" % total_amount))
691
    
691
    
692
    try:
692
    try:
693
        helper_client = HelperClient().get_client()
693
        helper_client = HelperClient(host_key = "helper_service_server_host_prod").get_client()
694
        helper_client.saveUserEmailForSending(user_email, "", subject, email_header + html_table + email_footer, str(order.id), "DeliverySuccess")
694
        helper_client.saveUserEmailForSending(user_email, "", subject, email_header + html_table + email_footer, str(order.id), "DeliverySuccess")
695
        ##FIXME Remove once tesing is done
695
        ##FIXME Remove once tesing is done
696
        if order.pickupStoreId:
696
        if order.pickupStoreId:
697
            helper_client.saveUserEmailForSending("abhishek.mathur@shop2020.in", "", subject, email_header + html_table + email_footer, str(order.id), "DeliverySuccess")
697
            helper_client.saveUserEmailForSending("abhishek.mathur@shop2020.in", "", subject, email_header + html_table + email_footer, str(order.id), "DeliverySuccess")
698
        return True
698
        return True
Line 1260... Line 1260...
1260
    order.status = OrderStatus.DELIVERY_SUCCESS
1260
    order.status = OrderStatus.DELIVERY_SUCCESS
1261
    order.statusDescription = "Order delivered"
1261
    order.statusDescription = "Order delivered"
1262
    update_trust_level(order)
1262
    update_trust_level(order)
1263
    session.commit()
1263
    session.commit()
1264
    
1264
    
1265
    if order.pickupStoreId:
1265
    if order.pickupStoreId and order.cod:
1266
        __push_collection_to_hotspot(order, "SALE")
1266
        __push_collection_to_hotspot(order, "SALE")
1267
    
1267
    
1268
    enqueue_delivery_successe_mail(order)
1268
    enqueue_delivery_successe_mail(order)
1269
#    if order.pickupStoreId:
1269
#    if order.pickupStoreId:
1270
#        payment_client = PaymentClient().get_client()
1270
#        payment_client = PaymentClient().get_client()