About location rules
You can use location rules to rank the possible locations for a line item during checkout. In this tutorial series, you'll use Shopify Functions to create a function that prioritizes locations in a particular country defined by the user.
What you'll learn
Anchor link to section titled "What you'll learn"In this tutorial series, you’ll learn how to do the following tasks:
- Set up your environment to use functions.
- Create a location rule function.
- Add configuration options to your location rule function using metafields.
- Build a location rule user interface using Admin UI extensions.
Requirements
Anchor link to section titled "Requirements"- You've created a Partner account.
- You've created a development store.
You've created an app that uses Shopify CLI 3.49.5 or higher. If you previously installed Shopify CLI, then make sure that you're using the latest version.
Start with the Remix app template if you plan to make your location rule configurable and create a UI for it. Otherwise, start with an extension-only app and let Shopify host it for you.
You've installed Node.js 16 or higher.
You've installed your app on the development store.
Rust-specific requirements
Anchor link to section titled "Rust-specific requirements"The following requirements are specific to Rust-based development with Shopify Functions.
You've installed Rust.
On Windows, Rust requires the Microsoft C++ Build Tools. Make sure to select the Desktop development with C++ workload when installing the tools.
You've installed cargo-wasi:
Follow the tutorial series to go from "Hello World" to a functional location rules experience.
Developer tools and resources
Anchor link to section titled "Developer tools and resources"Explore the following developer tools and resources to get familiar with building location rules.