Subversion Repositories SmartDukaan

Rev

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

Rev 11848 Rev 11863
Line 27... Line 27...
27
            catalog_client = CatalogClient().get_client()
27
            catalog_client = CatalogClient().get_client()
28
            privateDeals= catalog_client.getAllActivePrivateDeals(itemIds,0)
28
            privateDeals= catalog_client.getAllActivePrivateDeals(itemIds,0)
29
            if(len(privateDeals) == 0):
29
            if(len(privateDeals) == 0):
30
                raise PromotionException(115, 'None of the products have valid Private Deal')
30
                raise PromotionException(115, 'None of the products have valid Private Deal')
31
            dealItems = privateDeals.keys()
31
            dealItems = privateDeals.keys()
32
            print `dealItems`
-
 
33
            total_discounts = 0
32
            total_discounts = 0
34
            for line in cart.lines:
33
            for line in cart.lines:
35
                if line.itemId in dealItems:
34
                if line.itemId in dealItems:
36
                    discountAmount = line.actualPrice - privateDeals[line.itemId].dealPrice
35
                    discountAmount = line.actualPrice - privateDeals[line.itemId].dealPrice
37
                    if discountAmount > 0:
36
                    if discountAmount > 0: