Advanced Commerce Shipping Configuration: Free Shipping Based on Order Total and Role

This screencast shows some more advanced rules-based configuration of Commerce Shipping. Note again that we're using the 7.x-2.x branch (currently a dev release) of Commerce Shipping, and the new Commerce Flat Rate module.

I'll demonstrate how to create two different "flat rate" shipping services, one with shipping for $10 and one called "free shipping" which costs $0. The real reason for breaking these out is just to make it really obvious to the user what a great deal they're getting.

We'll offer free shipping two different ways: First, based on order value, and second, based on the role of the user (We might have a free shipping, or "premier" role like Amazon's "Prime".).

To do free shipping based on order value:

  • Create a free shipping and a flat-rate shipping service, with values of $0 and $10.
  • In the component for the free shipping service, add a data comparison on the order total, checking to see if it's over 9999 ($99.99)
  • In the component for the flat rate shipping, add a data comparison that is the opposite.

To do free shipping based on user role:

  • Create a role called "Free Shipping".
  • In the component for the free shipping service add a condition "user has role", on the logged in user, "Free Shipping"
  • In the component or the flat rate service, add the negative of that same condition.

And the screencast shows how to do both together.

The third portion of the screencast shows how to do shipping based on order value and making absolutely sure that the order value does not include the shipping cost that has already been calculated. Watch it if you've totally mastered the first two and you're interested. Otherwise just skip it :-)

Posted November 28, 2011

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
X
In 2019 Commerce Guys rebranded to Centarro.

Change is at the center of eCommerce, but our team and mission remain the same.

Our consulting, development, and support offerings apply our expertise to help you adapt to change and grow.

Find us now at: https://www.centarro.io