添加一个鳕鱼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.

Steps:

  1. From your Shopify admin, go to欧宝体育官网入口首页>Themes.
  2. Find the theme you want to edit, click thebutton to open the actions menu, and then clickEdit code.
  3. Locate and click theSnippetsfolder in the sidebar to open it.
  4. Click theAdd a new snippetlink.
  5. Give your snippet a title called:cod-checker.
  6. ClickCreate snippet.
  7. In a new browser tab, go tohttps://cod.shopifyapps.com/postal_code_checker.liquid.
  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 yourcod-checkersnippet (CMD-V for Mac users and CTRL-V for Windows users).
  10. Saveyour changes.

Add the availability checker snippet to a product or cart page

  1. Under theTemplatesfolder, locate and clickproduct.liquidorcart.liquid.
  2. Paste the following line where you would like the checker form to display:
{%render'cod-checker'%}
  1. Saveyour changes. The availability checker is now available on your product or cart page.

Visit the demo store

Visit thedemo storeto see the Cash on Delivery availability checker in action.

Shopify准备OB欧宝娱乐APP开始销售?Try it free