Added model logic to shopping cart