Subversion Repositories SmartDukaan

Rev

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

Rev 6679 Rev 6682
Line 16... Line 16...
16
    user_client = UserClient().get_client()
16
    user_client = UserClient().get_client()
17
    user = user_client.getUserByCartId(cart.id)
17
    user = user_client.getUserByCartId(cart.id)
18
    
18
    
19
    email = user.email.lower().strip()
19
    email = user.email.lower().strip()
20
    
20
    
21
    if args['discountType'] != 'physical' and args['discountType'] != 'both':
21
    if args['couponType'] is not None and args['couponType'] != 'physical' and args['couponType'] != 'both':
22
        raise PromotionException(111, 'This coupon is not valid')
22
        raise PromotionException(111, 'This coupon is not valid')
23
    
23
    
24
    if args['emails'] == '*' or email in args['emails']:
24
    if args['emails'] == '*' or email in args['emails']:
25
        discount_value = args['discount']
25
        discount_value = args['discount']
26
    else:
26
    else: