Can you leverage theme-addresses outside of customers/addresses.js?

New Member
1 0 0

Hi everyone,

 

I'm new to the Shopify Community and wanted to reach out for some advice! I've built a custom form that collects address information for an optional personalized card. All the nitty gritty details aside, I want to leverage the `theme-addresses` package to localize a region and country drop down list in this custom form.

 

Resources:

https://help.shopify.com/en/themes/development/templates/customers-addresses

https://github.com/Shopify/theme-scripts/blob/master/packages/theme-addresses/README.md

 

I have several questions:

  1. Can this package be used outside of account pages and customers/addresses.liquid?
    • All the examples I've seen, have used theme-addresses in relation to customer addresses.
  2. If #1 is possible, what's the best way to implement theme-addresses?
    • Do I need to import shopify_common.js?
    • Are there other dependencies I need include?

 

Any help is greatly appreciated!

0 Likes