Adding a Cash on Delivery availability checker to your Online Store theme

Note

This feature works only for stores that have the Advanced Cash on Delivery app activated in their admin.

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

Checker

Create an availability checker snippet

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

  1. Find the theme you want to edit, click Actions, and then click Edit HTML/CSS.

  2. Locate and click the Snippets folder to open it.

    Snippets folder1
  3. Click the Add a new snippet link.

  4. Give your snippet a title called: cod-checker.

    Snippet
  5. Click Create snippet.

  6. In a new browser tab, go to https://cod.shopifyapps.com/postal_code_checker.liquid.

  7. Copy all of the content on that page (CMD-C for Mac users and CTRL-C for Windows users).

  8. 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).

    Snippet liquid
  9. 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 would like the checker form to appear:

      {% include 'cod-checker' %}
    
  3. Save your changes. The availability checker is now available on your product or cart page.

Visit the demo store

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

Want to discuss this page?

Visit the Shopify Community

Ready to start selling online with Shopify?

Try it free