Drupal Ubercart Tips & Tricks: Achieving Tiered Flat Rate Shipping Without Programming
I was rather surprised at the number of shipping modules and options for Drupal (Ubercart) that would not do what I wanted it to do. A client simply wanted one of three shipping rates to be assigned based on the total number of products in an order. It should have been simple. Creating a table-based type of shipping rate in Zen Cart is very easy to do. But after working through the Flat Rate module, Rate Based module, and others, the site still wasn't quoting the shipping rates accurately.
For those who don't know how or don't want to modify code or write a new module to achieve a tiered shipping rate as described, there is still a fairly simple way to do this. What I did was use the Flat Rate shipping module and the Workflow-ng module, and it works well.
So to continue the example, we're trying to set up three shipping rates based on the total number of products that a customer is purchasing. First, you would set up the three rates in the Flat Rate shipping module. You can use the same label for each of these so that it is displayed the same way for the customer and simply use slightly different titles to keep track.
Then you move over to the Workflow-ng module. If you haven't used this before, you will may find yourself using it often in the future. The module is subtitled: "Customize your site by configuring actions on events." What you will find is that you can use it to control events by allowing or limiting when they can occur.
Having set up the three flat shipping rates we want to use, we will find each of these listed under the Workflow-ng module. Now we want to modify the status of each of these, so we click on the first one. The action is already listed so we simply need to modify the condition. For this example, we would select the option "Check an order's number of products" and then put in the number and comparison (like equal to or greater than).
After submitting the above, the first flat rate shipping cost would only be used or displayed when the particular condition is met. After we repeat the process with the other two, we now have set up our Drupal / Ubercart installation to use the correct flat shipping rate corresponding to the total number of items in the customer's cart.
This is one particular example - you can use other criteria besides the number of products. You will see a plethora of options listed under Workflow-ng.


Post new comment