Subversion Repositories SmartDukaan

Rev

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

Rev 6739 Rev 6740
Line 404... Line 404...
404
                line = Line.query.filter_by(cart = cart).filter_by(item_id = t_line.itemId).one()
404
                line = Line.query.filter_by(cart = cart).filter_by(item_id = t_line.itemId).one()
405
            #Update its discounted price.
405
            #Update its discounted price.
406
                line.discounted_price = t_line.discountedPrice
406
                line.discounted_price = t_line.discountedPrice
407
            cart.discounted_price = updated_cart.discountedPrice
407
            cart.discounted_price = updated_cart.discountedPrice
408
            session.commit()
408
            session.commit()
409
            if updated_cart.message is None:
409
            if updated_cart.message is not None:
410
                emival = updated_cart.message
410
                emival = updated_cart.message
411
        except PromotionException as ex:
411
        except PromotionException as ex:
412
            remove_coupon(cart.id)
412
            remove_coupon(cart.id)
413
            retval = ex.message
413
            retval = ex.message
-
 
414
    
414
    return [retval, emival]
415
    return [retval, emival]
415
 
416
 
416
def merge_cart(fromCartId, toCartId):
417
def merge_cart(fromCartId, toCartId):
417
    fromCart = Cart.get_by(id=fromCartId)
418
    fromCart = Cart.get_by(id=fromCartId)
418
    toCart = Cart.get_by(id=toCartId)
419
    toCart = Cart.get_by(id=toCartId)