Flatrate Shipping Quote

The Flatrate module allows the administrator to create different shipping methods for different situations. Workflow-ng sees them as separate events, so it is possible to attach different conditions to each method. This allows for a shipping quote to be custom tailored to any kind of situation your business rules require.

Set Up the Flatrate Methods

Each flatrate method has four pieces of information: an internal name, a public label, a base price, and a default per-product price. Let's make two shipping methods, one for the normal rate, and one for free shipping which we'll give to large orders. At Store administration > Configuration > Shipping quote settings > Quote methods > Flatrate, click on "Add a new shipping method". In the four fields, put the following:
Standard shipping
Shipping
5.00
0.25
This lets us see "Standard shipping" in the back end, the customer sees "Shipping" and $5.00 + $0.25 per product ordered. We also want free shipping, so we add another method:
Free shipping
Shipping
0.00
0.00
With both of them set up, we can check that they are enabled at Quote methods > General settings. Of course, right now, they will both show up at checkout all the time. To fix that we need to

Set Up Workflow-ng Configurations

When the flatrate methods are created, corresponding events and actions are created by Workflow-ng. A list of these configurations is found at Site building > Workflow-ng. Clicking on the configuration title allows us to add conditions that limit the situations in which the quotes are returned. We want to give free shipping to orders of 10 or more products, so we'll start there. Click "Add a condition" in the "Free shipping" configuration. On the next page, select "Check an order's number of products" under Order: Product. It doesn't matter which products are in the order, as long as there are 10 of them. Select <All products> in the product list, enter "10" for the "Product count value" and leave the comparison type as "greater than or equal to". Fine and dandy. Go put a few things in your cart and get a shipping quote. You shouldn't see the free shipping option. If you have more than 10 things, you'll see both Free shipping and the not-so-free Shipping option. This is probably not what you want as it could cause customer confusion and lost sales. Shocked Go back to the Workflow-ng configurations and add conditions to the Standard shipping method. Again select <All products>, 10 count, and then "Less than" for the comparison type. Test it all out to make sure it works the way you expect. Workflow-ng configurations can get complex, so it's good to start simply so you cover all of your edge cases.

Price Overrides Per Product

The per-product price of each shipping method is only a default value. Each product may specify its own shipping price for each shipping method. This is particularly useful for very light or very heavy items that affect the total shipping price more than most. The "Flat rate settings" fieldset in the product edit form hold the fields to override the shipping methods.