Subversion Repositories SmartDukaan

Rev

Rev 4190 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4190 Rev 5944
Line 17... Line 17...
17
Samsung P7500 Galaxy Tab 750 Rs.1800 off
17
Samsung P7500 Galaxy Tab 750 Rs.1800 off
18
Spice Mi-720 Tab Rs.1200 off
18
Spice Mi-720 Tab Rs.1200 off
19
'''
19
'''
20
from shop2020.thriftpy.model.v1.user.ttypes import PromotionException, Discount
20
from shop2020.thriftpy.model.v1.user.ttypes import PromotionException, Discount
21
from shop2020.model.v1.user.impl.PromotionRuleDataUtilities import get_coupon_usage_count, get_coupon_usage_count_by_user
21
from shop2020.model.v1.user.impl.PromotionRuleDataUtilities import get_coupon_usage_count, get_coupon_usage_count_by_user
22
from shop2020.clients.CatalogClient import CatalogClient
-
 
23
 
22
 
24
def execute(cart, coupon_code, args):
23
def execute(cart, coupon_code, args):
25
    
24
    
26
    #Allow only first 100 users to use the coupon
25
    #Allow only first 100 users to use the coupon
27
    count_coupon_usage = get_coupon_usage_count(coupon_code)
26
    count_coupon_usage = get_coupon_usage_count(coupon_code)