Giter Site home page Giter Site logo

solidus_store_locator's Introduction

Build Status

Solidus Store Locator

Do you have physical stores? This extension is for you! Tell your customers where they can get your products.

It adds an admin option to easily create Store Locations.

It uses jQuery Store Locator Plugin to allow your users to find the stores by providing an address or zip code.

Installation

Add solidus_store_locator to your Gemfile:

gem 'solidus_store_locator',  github: 'nebulab/solidus_store_locator'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g solidus_store_locator:install

Customization

All the markup needed for jQuery Store Locator Plugin is in the app/views/spree/stores/index.html.haml. If you want to customize the Store Locator, you might need to override this view.

If you don't need to customize a lot, you might want to add some basic styling.

Keep in mind that the following markup is mandatory:

#form-container
  %form#user-location{action: "#", method: "post"}
    #form-input
      %label{for: "address"} Enter Address or Zip Code:
      %input#address{name: "address", type: "text"}/
    %button#submit{type: "submit"} Submit
#map-container
  #loc-list
    %ul#list
  #map

If you want to customize the plugin functionality, then you will need to override the :coffescript section. Here are some examples and the full list of available options of the plugin.

You also can override the templates that the plugin uses for dinamically generate the Stores List. Those templates are located on your public/templates folder. After running the installation generator of course.

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'solidus_store_locator/factories'

Contributing

Pull Requests are more than welcome!. If needed, make sure you add tests :)

solidus_store_locator's People

Contributors

noeldiazmesa avatar alessani avatar sliaquat avatar

Watchers

James Cloos avatar Jonathan Tapia 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.