Show content when a particular shipping method has been used

This will show you how to use a conditional with the variable checkout.shipping_method.title.

For example, John has a local pickup option for customers who live close enough to his brick and mortar store, and wants to give them the retail address on the order status page, but only if they select the "local pickup option".

  1. Scroll down to the Additional Content & Scripts section.

  2. Copy the following code to your clipboard (command + c on a Mac, ctrl + c on a PC).

<!-- DEBUG {{ checkout.shipping_method.title }} has been used -->
{% if checkout.shipping_method.title == 'Pick-up at the store' %}
<p>Okay, we are waiting for you to come and get your stuff,
our brick and mortar is open 9 to 5, and our address is 34 York, Sin City.
It's a tough hood, bring a weapon or two.</p>
{% endif %}

  1. Paste the code into the Additional Content & scripts box. (command + v on a Mac, ctrl + v on a PC)

  2. Complete a test order to view your order status page:

Thank you 3

Want to discuss this page?

Visit the Shopify Community

Ready to start selling online with Shopify?

Try it free