Spree Banner Build Status

Adds a way to manage banners to Spree Commerce.

Old versions of Spree

For old version of Spree (before 3-0-stable), go to old extension (fork of Damiano Giacomello).

Installation

  1. Add the following to your Gemfile
gem 'spree_zaez_banner'
  1. Run bundle install

  2. To copy and apply migrations run:

rails g spree_banner:install

Configuration

Preferences can be updated within the admin panel "Banner box settings". Or you may set them with an initializer within your application:

SpreeBanner::Config.tap do |config|
  config.banner_styles = {mini: "48x48>", small: "100x100>", large: "800x200#"}
  config.banner_default_style = 'small'
end
  1. Add banner helper method in your view:
<%= insert_banner_box(category: "my_category") %>
  1. Additional options:
  class: 'my_class'
  style: 'my_style'
  carousel_id: 'carousel'
  buttons_carousel: true|false
  buttons_class: 'my_buttons_class'
  indicators_carousel: true|false
  image_class: 'my_image_class'
  order: 'position'
  limit: 5

Copyright (c) 2015 Zaez Inovação Digital, released under the New BSD License