Subversion Repositories SmartDukaan

Rev

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

Rev 18634 Rev 18844
Line 679... Line 679...
679
            promotion_client = PromotionClient().get_client()
679
            promotion_client = PromotionClient().get_client()
680
            cod_option = promotion_client.isCodApplicable(to_t_cart(cart))
680
            cod_option = promotion_client.isCodApplicable(to_t_cart(cart))
681
        
681
        
682
        if cod_option and cart.lines:
682
        if cod_option and cart.lines:
683
            for line in cart.lines:
683
            for line in cart.lines:
-
 
684
                try:
684
                logistics_info = logistics_client.getLogisticsEstimation(line.item_id, pincode, DeliveryType.PREPAID)
685
                    logistics_info = logistics_client.getLogisticsEstimation(line.item_id, pincode, DeliveryType.PREPAID)
685
                if not logistics_info.codAllowed:
686
                    if not logistics_info.codAllowed:
686
                    cod_option = False
687
                        cod_option = False
687
                    break
688
                        break
-
 
689
                except:
-
 
690
                    pass    
688
            if cart.total_price > 60000:# or cart.total_price <= 250:
691
            if cart.total_price > 60000:# or cart.total_price <= 250:
689
                cod_option = False
692
                cod_option = False
690
    return cod_option
693
    return cod_option
691
 
694
 
692
def get_products_added_to_cart(startDate, endDate):
695
def get_products_added_to_cart(startDate, endDate):
Line 1105... Line 1108...
1105
        close_session()
1108
        close_session()
1106
 
1109
 
1107
def close_session():
1110
def close_session():
1108
    if session.is_active:
1111
    if session.is_active:
1109
        print "session is active. closing it."
1112
        print "session is active. closing it."
1110
        session.close()        
-
 
1111
1113
        session.close()
-
 
1114
        
-
 
1115