Spree Custom Notifications
This gem is used to display custom notifications on Spree Store's Home page.
- Spree Admin -
Notification link is added in Configuration Menu
.
Admin is able to CRUD on Notification.
- Spree Store -
If the notifications are disclosed by user, they are not displayed again during same session.
The Notification is displayed during its start date and end date added by admin while creating it.
Installation
Add spree_custom_notifications to your Gemfile:
gem 'spree_custom_notifications'
Bundle your dependencies and run the installation generator:
bundle
bundle exec rails g spree_custom_notifications:install
Example
Please refer following screenshot to create custom notifications.
Admin can add sample notification.
On store, the Notifications are displayed as following:
Customization
You can customize the styling of notification by using spree assets customization logic.
Example: If you want to change background-color of notifications:
Add in app/assets/stylesheets/store/custom.css
#notification_div{
background-color: gray;
}
Then, require custom.css in your app/assets/stylesheets/store/all.css
.
/*
*= require store/spree_frontend
*= require store/spree_custom_notifications
*= require_self
*= require_tree .
*/
Refer - http://guides.spreecommerce.com/developer/asset.html
Copyright (c) 2014 Cuberoot Software, released under the New BSD License