Get shopping cart working in minutes and enjoy online ordering as it has never been done before. no mandatory models, no fuzzy model references, no hassle. just a simple and non-intrusive approach.
... [More]
How-To:Step 1 - Install acts-as-shopping-cart pluginTODO code not released yet. stay tunes.
Step 2 - Make existing model a shopping item (we might have many different shopping items)class Product < ActiveRecord::Base
acts_as_shopping_item
endStep 3 - Make existing model a shopping customer (we might have many different shopping customers)class User < ActiveRecord::Base
acts_as_shopping_customer
endStep 4 - Make existing controller a shopping cart (only one shopping cart)class OrderController < ApplicationController
acts_as_shopping_cart
def add_item
product = Product.find params[:id]
add_to_shopping_cart product
# do rendering
end
def finish_payments
checkout current_user
# do rendering
end
endStep 5 - Display orders per userThis user ordered <%= pluralize user.orders.size, "time" %>.Step 6 - Display orders item per productThis item was has been sold <%= pluralize product.order_items.size, "time" %>Step 7 - Stay tunes for initial release and many, many new and nice features [Less]