Corzinus is plugin which have logic of cart and checkout. That will be useful for your online-store
- Get started
- What you get?
- On your gemfile:
- Run bundle install
rails g corzinus:install(configuration corzinus)
rails g corzinus MODEL(Confirm run migration if you didn't do this)
- Start a server
rails sand the cart will be available at /cart (if you chose default namespace: /cart)
... # Define person class config.person_class = 'MyUserClass' # Define checkout steps config.checkout_steps = [:address, :delivery, :payment, :confirm, :complete] ...
Integration into the templates
= form_tag corzinus.order_items_path, method: :post do = hidden_field_tag :productable_id, @product.id = hidden_field_tag :productable_type, '@product.class.to_s' = hidden_field_tag :quantity, 1 = button_tag 'Add to cart', type: :submit
What you get?
With corzinus you get all the functionality of the cart, necessary for a standard online-store
- cart page with empty or filled condition
- change the amount of chosen products
- remove products from the cart
- apply a coupon code for discount
With corzinus you get opportunity to ordering purchase by checkout. By default checkout has of 5 steps.
:address– fill billing and shipping addresses
:delivery– choose delivery method by selected shipping address in the previous step
:payment– fill credit card requisites
:confirm– show info about
:complete– show success message about finished order and sent a letter to the user's mail
[:address, :delivery, :payment] – are not required, so you can remove one/all of them
[:confirm, :complete] – are required and can not be removed.
:delivery depends on the
You also can add custom step
Corzinus::Order is base model of Corzinus. It use in
Order has attributes:
Order has relationships:
Order has 5 states by gem Aasm
||User don't complete order (default state)|
||User completed order and this order sent to administrator for processing|
||Order in transit|
||Order delivered to the customer (finish state)|
||Canceled by the manager (finish state)|
More info in Order