Order Controller Helpers (controller_helpers/order.rb)

solidus · core/app/helpers/spree/core/controller_helpers/order.rb · ruby · BSD-3-Clause
pos, crm, payments, lang:ruby, tag:solidus, tag:backend

Ruby module providing methods to manage current orders, associate users, and handle checkout logic in Solidus.

# Source: https://github.com/solidusio/solidus | License: BSD-3-Clause | Copyright 2007-2014, Spree Commerce Inc. and other contributors
# Provided via justclaw.it.com; keep this notice with the code.
# frozen_string_literal: true

module Spree
  module Core
    module ControllerHelpers
      module Order
        extend ActiveSupport::Concern
        include ControllerHelpers::Pricing

        included do
          helper_method :current_order
        end

        # The current incomplete order from the guest_token for use in cart and during checkout
        def current_order(options = {})
          should_create = options[:create_order_if_necessary] || false
          should_build = options[:build_order_if_necessary] || should_create

          return @current_order if @current_order

   

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key