Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Create a banner for Spree

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 lib
Octocat-spinner-32 script
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 Versionfile
Octocat-spinner-32 spree_banner.gemspec
README.md

Spree Banner

Adds a way to manage banners to Spree Commerce [compatible with Amazon S3]

Installation

  1. Add the following to your Gemfile
gem 'spree_banner', '~> 2.0.0'
  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 under "Configuration" then "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#"}.to_json.to_s
  config.banner_default_style = 'small'
end

Banner use example

  1. Add banner helper method in your view:
<%= insert_banner_box(category: "my_category") %>
  1. Additional options:
  :class => "my_class"
  :style => "my_style"
  :list = true|false

Copyright (c) 2012 [Damiano Giacomello], released under the New BSD License

Something went wrong with that request. Please try again.