Method: Spree::BaseHelper#variant_options

Defined in:
app/helpers/spree/base_helper.rb

#variant_options(v, allow_back_orders = , include_style = true) ⇒ Object

human readable list of variant options



38
39
40
41
42
# File 'app/helpers/spree/base_helper.rb', line 38

def variant_options(v, allow_back_orders = Spree::Config[:allow_backorders], include_style = true)
  list = v.options_text
  list = include_style ? "<span class =\"out-of-stock\">(" + t("out_of_stock") + ") #{list}</span>" : "#{t("out_of_stock")} #{list}" unless (allow_back_orders || v.in_stock?)
  list
end