Subversion Repositories SmartDukaan

Rev

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

Rev 4859 Rev 4860
Line 18... Line 18...
18
    if 'usage_limit_for_user' in args and args['usage_limit_for_user'] is not None:
18
    if 'usage_limit_for_user' in args and args['usage_limit_for_user'] is not None:
19
        if args['usage_limit_for_user'] <= get_coupon_usage_count_by_user(coupon_code, cart.userId):
19
        if args['usage_limit_for_user'] <= get_coupon_usage_count_by_user(coupon_code, cart.userId):
20
            raise PromotionException(111, 'You have already used this coupon maximum possible times.')
20
            raise PromotionException(111, 'You have already used this coupon maximum possible times.')
21
    
21
    
22
    if not cart.lines:
22
    if not cart.lines:
23
        #TODO: Cart has no lines.
-
 
24
        return cart
23
        return cart
25
    
24
    
26
    total_selling_price = 0
25
    total_selling_price = 0
27
    total_discounted_price = 0
26
    total_discounted_price = 0
28
    cart_has_specified_item = False
27
    cart_has_specified_item = False