class Muck::CartItemsController < ApplicationController unloadable include MuckCommerce::CartMethods def create @cart_item = CartItem.new @cart_item.product = Product.find(params[:product_id]) @cart_item.cart = get_cart(current_user) @cart_item.quantity = 1 @cart_item.save! respond_to do |format| format.html { redirect_to new_order_path } end rescue => ex respond_to do |format| flash[:notice] = translate('muck.commerce.add_cart_item_error', :error => ex) format.html { redirect_to cart_path } end end end