Subversion Repositories SmartDukaan

Rev

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

Rev 6740 Rev 6821
Line 497... Line 497...
497
                    cod_option = False
497
                    cod_option = False
498
                    break
498
                    break
499
            if cart.total_price > 25000 or cart.total_price <= 250:
499
            if cart.total_price > 25000 or cart.total_price <= 250:
500
                cod_option = False
500
                cod_option = False
501
    return cod_option
501
    return cod_option
-
 
502
 
-
 
503
def is_product_added_to_cart(itemId, startDate, endDate):
-
 
504
    line = Line.query.filter_by(item_id = itemId).filter(Line.created_on > to_py_date(startDate)).filter(Line.created_on < to_py_date(endDate)).first()
-
 
505
    '''line = Line.query.filter_by(item_id = itemId, created_on > to_py_date(startDate), created_on < to_py_date(endDate)).first()'''
-
 
506
    if line is not None:
-
 
507
        return True
-
 
508
    else:
-
 
509
        return False
502
    
510
    
503
def close_session():
511
def close_session():
504
    if session.is_active:
512
    if session.is_active:
505
        print "session is active. closing it."
513
        print "session is active. closing it."
506
        session.close()
514
        session.close()