Module: Spree::Admin::ChannelsHelper
- Defined in:
- app/helpers/spree/admin/channels_helper.rb
Instance Method Summary collapse
-
#channel_guest_checkout_options ⇒ Object
Tri-state guest-checkout override for the channel edit form.
-
#channel_order_routing_strategy_options ⇒ Object
Registered
Spree::OrderRouting::Strategy::Basesubclasses presented in the channel edit form, sourced fromSpree.order_routing.strategiesso the picker can never drift from what the model accepts. -
#channel_storefront_access_options ⇒ Object
Storefront access levels for the channel edit form.
Instance Method Details
#channel_guest_checkout_options ⇒ Object
Tri-state guest-checkout override for the channel edit form. A blank
selection clears the override and falls back to Store#preferred_guest_checkout.
23 24 25 26 27 28 |
# File 'app/helpers/spree/admin/channels_helper.rb', line 23 def [ [Spree.t('admin.channels.guest_checkout_allowed'), 'true'], [Spree.t('admin.channels.guest_checkout_blocked'), 'false'] ] end |
#channel_order_routing_strategy_options ⇒ Object
Registered Spree::OrderRouting::Strategy::Base subclasses presented in
the channel edit form, sourced from Spree.order_routing.strategies so the
picker can never drift from what the model accepts. A blank value clears the
channel-level override and falls back to
Store#preferred_order_routing_strategy.
9 10 11 |
# File 'app/helpers/spree/admin/channels_helper.rb', line 9 def Spree.order_routing.strategies.map { |strategy| [strategy.display_name, strategy.to_s] } end |
#channel_storefront_access_options ⇒ Object
Storefront access levels for the channel edit form. A blank selection
clears the channel override and falls back to Store#preferred_storefront_access.
15 16 17 18 19 |
# File 'app/helpers/spree/admin/channels_helper.rb', line 15 def Spree::Channel::Gating::STOREFRONT_ACCESS.map do |value| [Spree.t("admin.channels.storefront_access_options.#{value}"), value] end end |