Sha256: b73121321333caa8a651485b6f332940a763b1bea2d7e9913d236604963ea56f

Contents?: true

Size: 439 Bytes

Versions: 11

Compression:

Stored size: 439 Bytes

Contents

module Forge
  module Controllers
    module Ecommerce
      def get_cart_order
        @cart_order = Order.where("orders.key = ? AND (orders.state = 'pending' OR orders.state = 'failed')", cookies[:order_key]).first if cookies[:order_key]
      end

      def require_addresses_for_checkout
        unless @cart_order.valid_addresses?
          redirect_to "orders/checkout"
          return false
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
forge-cli-0.1.10 lib/forge/lib/forge/shared_controller_methods/ecommerce.rb
forge-cli-0.1.9 lib/forge/lib/forge/shared_controller_methods/ecommerce.rb
forge-cli-0.1.8 lib/forge/lib/forge/shared_controller_methods/ecommerce.rb
forge-cli-0.1.7 lib/forge/lib/forge/shared_controller_methods/ecommerce.rb
forge-cli-0.1.6 lib/forge/lib/forge/shared_controller_methods/ecommerce.rb
forge-cli-0.1.5 lib/forge/lib/forge/shared_controller_methods/ecommerce.rb
forge-cli-0.1.4 lib/forge/lib/forge/shared_controller_methods/ecommerce.rb
forge-cli-0.1.3 lib/forge/lib/forge/shared_controller_methods/ecommerce.rb
forge-cli-0.1.2 lib/forge/lib/forge/shared_controller_methods/ecommerce.rb
forge-cli-0.1.1 lib/forge/lib/forge/shared_controller_methods/ecommerce.rb
forge-cli-0.1.0 lib/forge/lib/forge/shared_controller_methods/ecommerce.rb