Skip to content

elevation/spree-order-level

 
 

Repository files navigation

Order Level

Adds order_minimum and order_increment to the Product model as well as adding them as extra fields to the Product administration page.

As an example, setting both to 10 is basically saying "You have to order at least 10 of these and if you want more they have to be ordered in batches of 10" so the customer has to order 10, 20, 30, ... etc.

This extensions migration add order_minimum and order_increment columns to the products table and add a comment column to the line_items table.

An override for /views/product/show.html.erb is included to demonstrate how to display a minimum quantity message to the customer. This override has been updated to work with the latest (0.7) version of Spree so if something breaks, please diff it with the base view.

An override for /views/orders/_line_item.html.erb is included to demonstrate the display of line_item.comment when an adjustment is made to the order quantity.

A localization file (config/lang/us-EN.yml) which includes the English version of all localization tags in thie extension.

About

Set minimum order amount and increments for Spree products. Requires Spree >= 0.6

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%