Magento 2 Add a Free Shipping Block in View Cart Page

A Free Shipping block is a commonly requested feature in the view cart page and this time we are implementing it in a Magento 2.1.8 store.

Sites that have this implemented typically see an increase in average order volume over time.
It also helps improve abandoned cart rates, since it shows potential customers how much more they need to spend to get free shipping.

Here is what the finished block will look like.

This cart block grabs the cart total and if it’s less than $75 dollars, it displays a message indicating how much more the customer needs to add to their cart to get free shipping.
It also includes a link to a page where they can go to continue shopping and add more to their cart.

If the cart total is over $75, then it displays a success message, letting them know they are getting free shipping.
Either way, it’s useful for customers.
In our case we are going to override the default checkout shipping step in our customer theme.
Our new shipping.phtml template will reside in app/design/frontend/Inforis/custom/Magento_Checkout/templates/cart/folder.
You can see this revised shipping.phtml template below…

Click To View Free Shipping Code

Once this block is implemented in your Magento 2 store, you’ll need to clear the cache and deploy static content.

Good Luck!

This entry was posted in Magento 2. Bookmark the permalink.