Adding a COD availability checker to your theme

You can let your customers check their postal code eligiility for Cash on Delivery payments by adding an availability checker snippet to your theme on a product or cart page.

Create an availability checker snippet

To add a Cash on Delivery availability checker, you will need to customize your Shopify Theme.


  1. From your Shopify admin, go to Online Store > Themes.
  2. Find the theme you want to edit, click the button to open the actions menu, and then click Edit code.
  3. Locate and click the Snippets folder in the sidebar to open it.
  4. Click the Add a new snippet link.
  5. Give your snippet a title called: cod-checker.
  6. Click Create snippet.
  7. In a new browser tab, go to
  8. Copy all of the content on that page (CMD-C for Mac users and CTRL-C for Windows users).
  9. Back in your admin, paste all of the copied content into your cod-checker snippet (CMD-V for Mac users and CTRL-V for Windows users).
  10. Save your changes.

Add the availability checker snippet to a product or cart page

  1. Under the Templates folder, locate and click product.liquid or cart.liquid.
  2. Paste the following line where you want the checker form to display:
  {% render 'cod-checker' %}
  1. Save your changes. The availability checker is now available on your product or cart page.

Visit the demo store

Visit the demo store to view the Cash on Delivery availability checker in action.

Can’t find the answers you’re looking for? We’re here to help.