- Generate migrations by
rake shopper_engine:install:migrations
- Run migrations by
rake db:migrate
You should put this line in your routes config
mount ShopperEngine::Engine => "/shop"
- Ensure that your model is valid Devise user model.
- Call
acts_as_customer
method inside it.
class Customer < ActiveRecord::Base
...
acts_as_customer
end
- Ensure that you model have
title
, andprice
attributes. - Call
acts_as_product
method inside it.
class Book < ActiveRecord::Base
...
acts_as_product
end
shopper_engine.cart_path
- cart page url.shopper_engine.add_to_cart(product)
- add to cart button.shopper_engine.orders_path
- customer order list page url.
You can customize views and controllers by creating a copy of them in your application.
rails generate shopper_engine:controllers
rails generate shopper_engine:views