Subversion Repositories SmartDukaan

Rev

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

Rev 9299 Rev 9791
Line 547... Line 547...
547
                    break
547
                    break
548
            if cart.total_price > 60000 or cart.total_price <= 250:
548
            if cart.total_price > 60000 or cart.total_price <= 250:
549
                cod_option = False
549
                cod_option = False
550
    return cod_option
550
    return cod_option
551
 
551
 
552
def is_product_added_to_cart(itemId, startDate, endDate):
552
def get_products_added_to_cart(startDate, endDate):
553
    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()
553
    lines = session.query(Line.item_id).filter(Line.created_on > to_py_date(startDate)).filter(Line.created_on < to_py_date(endDate)).all()
554
    '''line = Line.query.filter_by(item_id = itemId, created_on > to_py_date(startDate), created_on < to_py_date(endDate)).first()'''
-
 
555
    if line is not None:
-
 
556
        return True
554
    return lines
557
    else:
-
 
558
        return False
-
 
559
 
555
 
560
def insure_item(itemId, cartId, toInsure, insurerType):
556
def insure_item(itemId, cartId, toInsure, insurerType):
561
    cart = Cart.get_by(id = cartId)
557
    cart = Cart.get_by(id = cartId)
562
    line = None
558
    line = None
563
    for cartLine in cart.lines:
559
    for cartLine in cart.lines: