Subversion Repositories SmartDukaan

Rev

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

Rev 8456 Rev 9140
Line 44... Line 44...
44
    max_discount = 10000
44
    max_discount = 10000
45
    if 'max_discount' in args:
45
    if 'max_discount' in args:
46
        max_discount  = args ['max_discount']
46
        max_discount  = args ['max_discount']
47
    
47
    
48
    discount_left = max_discount
48
    discount_left = max_discount
49
        
-
 
50
    
49
    
51
    isPercentageDiscount = False
50
    isPercentageDiscount = False
52
    if 'is_percentage_discount' in args:
51
    if 'is_percentage_discount' in args:
53
        isPercentageDiscount = args['is_percentage_discount']
52
        isPercentageDiscount = args['is_percentage_discount']
54
 
53
 
Line 83... Line 82...
83
                    elif discountJ is not None:
82
                    elif discountJ is not None:
84
                        discount_value = discountJ 
83
                        discount_value = discountJ 
85
                        cart_has_specified_item = True
84
                        cart_has_specified_item = True
86
                else:
85
                else:
87
                    continue
86
                    continue
-
 
87
 
-
 
88
            elif 'brands' in args:
-
 
89
                catalog_client = CatalogClient().get_client()
-
 
90
                brand = catalog_client.getItem(line.itemId).brand
-
 
91
                if brand in args['brands']:
-
 
92
                    if type(args['brands'])==dict: 
-
 
93
                        discount_value = args['categories'][brand]
-
 
94
                        cart_has_specified_item = True
-
 
95
                    elif discountJ is not None:
-
 
96
                        discount_value = discountJ 
-
 
97
                        cart_has_specified_item = True
-
 
98
                else:
-
 
99
                    continue
-
 
100
            
88
            elif discountJ is not None:
101
            elif discountJ is not None:
89
                discount_value = discountJ 
102
                discount_value = discountJ 
90
                cart_has_specified_item = True
103
                cart_has_specified_item = True
91
            else :
104
            else :
92
                continue
105
                continue