Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Spree extension to easily create an ajax shopping cart
Ruby JavaScript
branch: master
Failed to load latest commit information.
app after a redirect FF.js & Rails are no longer happy, so let's render s…
lib initial commit
public initial commit
spec initial commit
.gitignore initial commit
LICENSE.txt standard license removing unnecessary .git on GH link in README
spree_ajax_cart.gemspec initial commit

Spree Ajax Cart

This is a basic implementation of an Ajax shopping cart for Spree (tested on 0.40 and 0.50.99/edge). To install, add the extension to your Gemfile:

gem 'spree_ajax_cart', :git => 'git://'

And bundle install, then:

rake spree_ajax_cart:install:assets

Then to render an ajax cart from any view, simply:

render :partial => 'orders/ajax_cart', :locals => {:order => current_order(true) }

Use the add_to_cart route to easy ajax links. Here's a simple ERB template that will render an ajax cart and a list of all your products with ajax add to cart links:

<%= render :partial => 'orders/ajax_cart', :locals => {:order => current_order(true) } %>
  <% @products.each do |product| %>
    <li><%= link_to, add_to_cart_path(:variant_id =>, :remote => true, :method => :put %></li>
  <% end %>

Click one of the links and the cart will update


Copyright (c) 2011 Pogodan. See LICENSE.txt for further details.

Something went wrong with that request. Please try again.