Source

gnocchi-catalogue / catalogue / cart.py

Full commit

from session_cart import cart

class CartItem(cart.CartItem):
    '''cart item customised for our products'''
    def unit_price(self):
        return self.item.product.get_price(self.quantity)

    def total(self):
        return self.item.product.get_price(self.quantity) * self.quantity