GithubHelp home page GithubHelp logo

bricesanchez / spree_minicart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sbounmy/spree_minicart

0.0 1.0 0.0 173 KB

Spree Minicart displays a minicart in your spree store.

License: BSD 3-Clause "New" or "Revised" License

spree_minicart's Introduction

SpreeMinicart

Minicart feature extracted from http://www.hallyustyle.com.

Your shopping cart is an incredibly important part of your e-commerce website.

Minicart allows customer to add/remove an item from their cart without ever leaving the page they're on. Let your customers preview their cart before they start the checkout process.

Installation

To install Spree Minicart, just add the following to your Gemfile:

# Spree 1.0.X
gem 'spree_minicart', '~> 1.0.0'

# Spree 1.1.X
gem 'spree_minicart', '~> 1.1.0'

Now, bundle up with:

bundle

And finally run the install generator to automatically insert 'require store/spree_minicart' in your asset file.

rails g spree_minicart:install

Make sure manifest is inserted correctly, it should look like :

  • app/assets/stylesheets/store/all.css :
/*
 *= require store/spree_core
 *= require store/spree_auth
 *= require store/spree_api
 *= require store/spree_promo

 *= require store/spree_minicart
*/
  • app/assets/javascripts/store/all.js :
//= require store/spree_core
//= require store/spree_auth
//= require store/spree_api
//= require store/spree_promo
//= require store/spree_minicart

Customization

The minicart markup should let you customize the way you want your minicart by using Deface or overriding _minicart.html.erb and _minicart_line_items.html.erb in your spree app. See Spree Guide for more information.

If you need to change the js response when you add / update the minicart, check out : orders/populate.js.erb and orders/update.js.erb.

Example

Spree Minicart

Todo

  • Better html markup and HTML test for customization
  • Better css design
  • Can update minicart's item quantity
  • Add a pagination to the minicart items list using jcarousel

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

Compatibility

Tested under Spree 1.0.0

Contribute

Pull requests for features and bug fix with tests are welcome.

Copyright (c) 2012 [Stéphane Bounmy], released under the New BSD License

spree_minicart's People

Contributors

luisdoubrava avatar sbounmy avatar

Watchers

 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.