Subversion Repositories SmartDukaan

Rev

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

Rev 1581 Rev 1621
Line 126... Line 126...
126
        line.quantity = quantity
126
        line.quantity = quantity
127
        line.created_on = current_time
127
        line.created_on = current_time
128
        line.updated_on = current_time
128
        line.updated_on = current_time
129
        line.line_status = LineStatus.LINE_ACTIVE
129
        line.line_status = LineStatus.LINE_ACTIVE
130
    session.commit()
130
    session.commit()
131
    validate_cart(cart_id)
131
    #validate_cart(cart_id)
132
 
132
 
133
def delete_item_from_cart(cart_id, item_id):
133
def delete_item_from_cart(cart_id, item_id):
134
    if not item_id:
134
    if not item_id:
135
        raise ShoppingCartException(101, "item_id cannot be null")
135
        raise ShoppingCartException(101, "item_id cannot be null")
136
    cart = Cart.get_by(id = cart_id)
136
    cart = Cart.get_by(id = cart_id)
Line 366... Line 366...
366
    return True
366
    return True
367
 
367
 
368
def close_session():
368
def close_session():
369
    if session.is_active:
369
    if session.is_active:
370
        print "session is active. closing it."
370
        print "session is active. closing it."
371
        session.close()
-
 
372
371
        session.close()
-
 
372