[Feature Request] Support for useCartLineTarget outside of Cart Lines

As requested in [IMPORTANT] Stop creating issues here, use the Shopify Community forum instead · Issue #2521 · Shopify/ui-extensions · GitHub, I am re-raising this issue.

Please find below the details of Support for useCartLineTarget outside of Cart Lines · Issue #2206 · Shopify/ui-extensions · GitHub

Please list the related package(s)

    "@shopify/ui-extensions": "^2024.7",
    "@shopify/ui-extensions-react": "^2024.7",

If this related to specific APIs or components, please list them here

Is your feature request related to a problem? Please describe.

We would like to be able to make a decision in our extension based on how many items a customer ordered and what they ordered.

The API Cart Lines would support what we need, but it’s not available outside of a cart line extension.

We would like to be able to use it in other extensions on other parts of the Thank You and Order Status pages.

Describe the changes you are looking for

We would like useCartLineTarget, or a similar API, to be exposed for other extensions on the order status page.

For instance, we’d like to be able to make a personalisation decision based on whether someone bought a certain product, or a certain number of products. We would then like our extension to display a promotion according to this.

Describe alternatives you’ve considered

I’ve not seen an alternative way of getting hold of the number of items available.

Additional context

1 Like