Method: Effective::OrdersController#new
- Defined in:
- app/controllers/effective/orders_controller.rb
#new ⇒ Object
If you want to use the Add to Cart -> Checkout flow Add one or more items however you do. redirect_to effective_orders.new_order_path, which is here. This is the entry point for any Checkout button. It displayes an order based on the cart Always step1
25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/controllers/effective/orders_controller.rb', line 25 def new @order ||= Effective::Order.new(view_context.current_cart) EffectiveOrders.(self, :new, @order) unless @order.valid? flash[:danger] = "Unable to proceed: #{flash_errors(@order)}. Please try again." redirect_to(effective_orders.cart_path) return end end |