Sha256: 2a5e0c026e7545077e3908771969d1017ea3c264431019588c80193090d4da75

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

Workarea.configure do |config|
  config.product_templates << :swatches

  config.seeds.insert_after(
    'Workarea::ProductsSeeds',
    'Workarea::SwatchesSeeds'
  )

  # Determines which option is used for displaying swatches on
  # browse pages. Return the option you would like to be used. We pass the
  # product in case there are other factors to base sorting on.
  config.browse_swatch_option = ->(product, options) { options.first }
end

Workarea.append_partials(
  'admin.catalog_menu',
  'workarea/admin/catalog_swatches/primary_navigation'
)

Workarea.append_partials(
  'admin.catalog_product_cards',
  'workarea/admin/catalog_products/swatches_card'
)

Workarea::Plugin.append_stylesheets(
  'storefront.components',
  'workarea/storefront/swatches/components/option_button',
  'workarea/storefront/swatches/components/swatch_facet',
  'workarea/storefront/swatches/components/swatch_options'
)

Workarea::Plugin.append_javascripts(
  'storefront.modules',
  'workarea/storefront/swatches/modules/product_summary_swatches'
)

Workarea.append_partials(
  'storefront.product_summary',
  'workarea/storefront/products/swatch_summary'
)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
workarea-swatches-1.0.6 config/initializers/workarea.rb
workarea-swatches-1.0.5 config/initializers/workarea.rb