Subversion Repositories SmartDukaan

Rev

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

Rev 18536 Rev 18539
Line 961... Line 961...
961
                cartItem['dealText'] = item.bestDealText
961
                cartItem['dealText'] = item.bestDealText
962
            line.dealText = None
962
            line.dealText = None
963
            line.freebieId = None
963
            line.freebieId = None
964
        cartItem['sellingPrice'] = line.actual_price
964
        cartItem['sellingPrice'] = line.actual_price
965
        
965
        
-
 
966
        toRemove = []
966
        for dictbulkPricing in cartItem['bulkPricing']:
967
        for dictbulkPricing in cartItem['bulkPricing']:
967
            if dictbulkPricing['quantity'] < cartItem['minBuyQuantity'] or dictbulkPricing['quantity'] > cartItem['maxQuantity']:
968
            if dictbulkPricing['quantity'] < cartItem['minBuyQuantity'] or dictbulkPricing['quantity'] > cartItem['maxQuantity']:
-
 
969
                toRemove.append(dictbulkPricing)
-
 
970
        for removePricing in toRemove:
968
                cartItem['bulkPricing'].remove(dictbulkPricing)
971
            cartItem['bulkPricing'].remove(removePricing)
969
        cartItem['bulkPricing'] = sorted(cartItem['bulkPricing'], key=lambda k: k['quantity'],reverse=True)
972
        cartItem['bulkPricing'] = sorted(cartItem['bulkPricing'], key=lambda k: k['quantity'],reverse=True)
970
        
973
        
971
        if item_shipping_info.isActive:
974
        if item_shipping_info.isActive:
972
            cart.total_price = cart.total_price + (line.actual_price * line.quantity)
975
            cart.total_price = cart.total_price + (line.actual_price * line.quantity)
973
            try:
976
            try: