Skip to main content

Add a UI for merchant customization

Note

Creating new product configuration link extensions through the Partner Dashboard will soon be deprecated. If you have an existing product configuration link extension and would like to continue to manage it, then please refer to our migration guide

You can add a product configuration extension that renders a UI to enable merchants to interact with bundles on the product details page in the Shopify admin. This guide describes how you can generate, preview, and deploy a product configuration extension.


In this tutorial, you'll learn how to do the following tasks:

  • Generate a product configuration extension.
  • Preview the rendered extension on the product details page in the Shopify admin.
  • Deploy your extension code to Shopify.


Anchor to Step 1: Generate a new extensionStep 1: Generate a new extension

To create a product configuration extension, you can use Shopify CLI, which generates starter code for building your extension and automates common development tasks.

  1. Navigate to your app directory:

    Terminal

    cd <directory>
  2. Run the following command to start creating the app extension:

    Terminal

    shopify app generate extension --template product_configuration --name my-product-config-extension

    Optional: You can provide a name or message for the version using the --version and --message flags.

  3. Select a language for your extension.

  4. Start your development server to build and preview your app:

    Terminal

    shopify app dev

    To learn about the processes that are executed when you run dev, refer to the Shopify CLI command reference.

  1. Press p to open the developer console.
  2. In the developer console page, click on the preview link for the product configuration extension.

Anchor to Step 2: Explore your project structureStep 2: Explore your project structure

Open your code editor and navigate to your product configuration project directory. The product configuration template provides the following structure and you can modify the files, as needed:

Product configuration extension file structure

└── my-app
└── extensions
└── my-product-config-extension
├── src
│ └── ProductDetailsConfigurationExtension.ts[x] OR ProductDetailsConfigurationExtension.js[x] // The product details page of the extension
│ └── ProductVariantDetailsConfigurationExtension.ts[x] OR ProductVariantDetailsConfigurationExtension.js[x] // The product variant details page of the extension
├── locales
│ ├── en.default.json // The default locale for the extension
│ └── fr.json // The locale file for non-regional French translations in the extension
├── shopify.extension.toml // The config file for the extension
└── package.json
Tip

To learn about the UI components that you can use for your extension, refer to Admin UI extensions.


Note

To customize your edit link in the shopify.extension.toml file, you must have created an app that uses Shopify CLI 3.76 or higher. If you previously installed Shopify CLI, then make sure you're using the latest version.

Optional: You can customize the edit link in your product configuration extension by setting it in the shopify.extension.toml configuration file. The field accepts a URL template pattern which expands template variables according to RFC 6570.

Available variables: {product_id}.

`shopify.extension.toml` configuration file

api_version = "2025-01"

[[extensions]]
name = "t:name"
handle = "{{ handle }}"
type = "ui_extension"
{% if uid %}uid = "{{ uid }}"{% endif %}

# Both extension points are required
[[extensions.targeting]]
module = "./src/ProductDetailsConfigurationExtension.{{ srcFileExtension }}"
# The target used here must match the target used in the module file (./src/ProductDetailsConfigurationExtension.{{ srcFileExtension }})
target = "admin.product-details.configuration.render"
[extensions.targeting.urls]
# Please add your edit URL template pattern below:
edit = "/bundles/products/{product_id}"

[[extensions.targeting]]
module = "./src/ProductVariantDetailsConfigurationExtension.{{ srcFileExtension }}"
# The target used here must match the target used in the module file (./src/ProductVariantDetailsConfigurationExtension.{{ srcFileExtension }})
target = "admin.product-variant-details.configuration.render"
Was this section helpful?

Anchor to Step 4: Preview the extensionStep 4: Preview the extension

Was this section helpful?

Anchor to Step 3: Preview the extensionStep 3: Preview the extension

Was this section helpful?

Navigate to your customized bundle product page in the Shopify admin. Your extension will be rendered within Bundled products card.

A product configuration extension rendered within the Shopify admin.

Anchor to Step 5: Deploy the extensionStep 5: Deploy the extension

Was this section helpful?

Anchor to Step 4: Deploy the extensionStep 4: Deploy the extension

Was this section helpful?

When you're ready to release your changes to users, you can create and release an app version. An app version is a snapshot of your app configuration and all extensions.

  1. Navigate to your app directory.

  2. Run the following command.

    Optionally, you can provide a name or message for the version using the --version and --message flags.

    Terminal

    shopify app deploy

Releasing an app version replaces the current active version that's served to stores that have your app installed. It might take several minutes for app users to be upgraded to the new version.

Tip

If you want to create a version, but avoid releasing it to users, then run the deploy command with a --no-release flag. You can release the unreleased app version using Shopify CLI's release command, or through the Partner Dashboard.



Was this page helpful?