Encourage Larger Orders in your Online Store with Free Shipping

by Lorenzo Orlando Caum on February 1, 2013

Free shipping is a powerful motivator in online stores. Many consumers have grown to expect free shipping.

In this post, we’ll teach you how to display a message in your cart to encourage larger orders with free shipping.


Setup Shopp Content Templates

First you’ll need to set up Shopp content templates. You can do so via the WordPress admin –> Shopp Setup –> Presentation

Specifically, you’ll need to login to your site with a FTP client. A free option is FileZilla. We recommend Transmit (if you are on a Mac).

Next browse to your theme folder and create a shopp subfolder in it. Once setup, you’ll see that you now have a set of Shopp files in the new Shopp subfolder similar to this location:


Setup the Promotion for Free Shipping

Go to Shopp Catalog –> Promotions. Then create a promotion for free shipping. However do not enable the promotion.

Below is an example:


Understanding the Code for Free Shipping

Now lets take a look at the code that we’ll use.

<div style="text-align:center">

$cartpromotionalshipping = 150;
$cartsubtotal = (float)shopp('cart.get-subtotal','money=off&wrap=off');

if ($cartsubtotal >= $cartpromotionalshipping) {
echo "You are getting free shipping! You are awesome!";
} else {
echo "You are only " . money($cartpromotionalshipping - $cartsubtotal) . " away from getting <em>FREE shipping</em>! Buy more items right now. ";


The PHP part of the code is wrapped in a div that centers the message (first and last lines of the above code snippet). This is for styling and does not contribute to the free shipping messaging.

Next we have a variable called cartpromotionalshipping. This is the subtotal amount that free shipping is activated at. In our example, we have 150. This means that if you spend $150 or more, you’ll get free shipping. We then have another variable called cartsubtotal. This tells us the current subtotal in the cart.

After that we have a line of code that compares the variables. It translates to: if the cartsubtotal amount is greater than or equal to the cartpromotionalshipping amount (now set to 150), display the message “You are getting free shipping! You are awesome!” If the comparison returns false or is not true (current cart subtotal is less than 150), then display the message “You are only X away from getting FREE shipping! Buy more items right now.”

Modify Cart.php Content Template

Now its time to drop-in the code snippet into our cart.php content template.

Note: You should already have Shopp content templates running. If you don’t, enable them via Shopp Setup –> Presentation.

  1. Log in to your WordPress site via an FTP client. Browse to the Shopp content templates folder at: wp-content/themes/YourThemeFolder/shopp
  2. Now open the cart.php file. You’ll now need to decide if you want the free shipping message to appear at the top of the cart page or below (or even both).
  3. Then add the code into place.
  4. Then edit the code snippet to your needs. We recommend editing the 150 for cartpromotionalshipping to your amount needed for free shipping. Then also edit the free shipping message and finally the other message. Be careful not to delete the calculation in the middle that tells your customers how much they need to  spend to receive free shipping. Once you are done, be sure to save changes to the cart.php file.

The screenshot below shows what it looks like when a customer does not have enough items to meet the $150 free shipping promo.


Now that your free shipping messaging is in place, go to your Shopp Catalog –> Promotions and turn on your free shipping promotion.

Related Posts Plugin for WordPress, Blogger...

Is your site slow? Find out right now with a free WordPress speedtest. You'll also receive professional recommendations for making your Shopp FAST.
Stop losing sales because of a slow site!

Author: Lorenzo Orlando Caum

Lorenzo Orlando Caum is an entrepreneur and a marketer.

Lorenzo contributes to the Shopp project as a member of the support team. He has written several WordPress extensions for Shopp. You should have a look at his latest project: Video tutorials for Shopp.

He is the founder of Enzo12 LLC, a web engineering firm in Tampa, FL. If you would like to know more about Lorenzo, you can follow @lorenzocaum on Twitter or check out his blog.

Previous post:

Next post: