Giter VIP home page Giter VIP logo

solidus_contact_us's Introduction

SpreeContactUs

Build Status Dependency Status Click here to lend your support to: SpreeContactUs and make a donation at www.pledgie.com ! A Rails 3+ Engine providing a basic contact form as a Spree Extension.

Modified version of the contact_us gem to work with Spree.

REQUIREMENTS

SpreeContactUs requires:

  • Spree Core 1.0.0 or greater
  • Ruby 1.9.2 or greater.

CAUTION

THIS IS THE MASTER BRANCH IS THE DEVELOPMENT OF SPREE CONTACT US, IT REFLECTS THE WORK THAT IS CURRENTLY DONE AND CAN THEREFORE CONTAIN BUGS. FOR PRODUCTION ENVIRONMENT YOU SHOULD USE THE LATEST STABLE VERSION.

INSTALLATION

In your Gemfile, add the following dependencies:

To install from edge:

gem 'spree_contact_us', :git => 'https://github.com/spree-contrib/spree_contact_us'

Or install from latest stable version:

gem 'spree_contact_us', github: 'spree-contrib/spree_contact_us', branch: '3-0-stable'

From Rails.root run:

$ bundle
$ bundle exec rails g spree_contact_us:install

In config/initializers/spree_contact_us.rb modify:

config.mailer_to = "[email protected]"

Change to the email address you would like to receive the form submissions at for example:

config.mailer_to = "[email protected]"

By default the emails from field will be the email entered by the user to easily reply, but this may not be allowed if your required to verify your sending email addresses. You may also specify an email address for the notification emails from field:

config.mailer_from = "[email protected]"

CONFIGURATION

If you would like to add a name or subject field to the form you may simply set the options to true within the spree_contact_us initializer located at config/initializers/spree_contact_us.rb:

config.require_name = true
config.require_subject = true

You may also update your locales under config/locales/spree_contact_us.en.yml or create your own. Please feel free to submit your own locales so that other users will hopefully find this gem more useful.

ADD A CONVERISION TRACKING CODE

If you need to print a conversion tracking code on contact sent, you can setup a spree preference for this. Just open a Rails console in your application and launch:

Spree::ContactUs::Config[:contact_tracking_message] = 'nothing special'

Everything that is not an empty string will cause a flash ("contact_tracking") message to be created. You can use it somewhere in your layout like this:

<% if flash[:contact_tracking] %>
    put your conversion tracking code here
<% end %>

By default the preference has an empty string value so no flash messages will be created until you don't need it.

USAGE

Visit your website and navigate to /contact-us to see the form in action.

Be aware that stylesheet customization would be required as the contact-us class does not automatically inherit all the necessary styles.

Refer to Spree Guide on how to go about it.

ISSUES

Please report any bugs or feature requests to the Github issues page @ https://github.com/spree-contrib/spree_contact_us/issues

Testing

Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.

$ bundle
$ bundle exec rake test_app
$ bundle exec rspec spec

TODO

  • Modify settings within the admin
  • Add new language translations

CONTRIBUTING

In the spirit of free software, everyone is encouraged to help improve this project.

Here are some ways you can contribute:

  • by using prerelease versions
  • by reporting bugs
  • by suggesting new features
  • by translating to a new language
  • by writing or editing documentation
  • by writing specifications
  • by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)
  • by refactoring code
  • by resolving issues
  • by reviewing patches

Donating

Bitcoin donations may be sent to: 15VHpDKWpuu8XyPpbTbRbewSRzMu5cVBMr

Copyright (c) 2012-2013 Jeff Dutil, released under the New BSD License.

solidus_contact_us's People

Contributors

christoph-buente avatar desmondhume avatar dougbradbury avatar finelineautomation avatar jdutil avatar jnettome avatar josv avatar jspizziri avatar kennyadsl avatar kitaindia avatar lukechanning avatar reinaris avatar sbasir avatar welitonfreitas avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.