For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
I am trying to understand how I can configure my targets in my .toml to make an extension block on the thank you page load up in `purchase.thank-you.block.render [ORDER_STATUS2]. What I have currently is throwing an error:
[[extensions.targeting]]
target = "purchase.thank-you.block.render"
module = "./src/Checkout.jsx"
export = "thankYouBlock"
[[extensions.targeting]]
target = "purchase.thank-you.block.render"
module = "./src/Checkout.jsx"
export = "orderDetailsBlock"
Error: Duplicate targets found: purchase.thank-you.block.render │ Extension point targets must be unique.
However in the image in the docs, it shows the position of [ORDER_STATUS2] as a possible target.
Hi Turbofan,
Just to confirm, you want the orderDetailsBlock to be appearing on the [ORDER_STATUS2] location, so you need to know what value to apply to it's target property?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Yes precisely.
The purchase.thank-you.block.render
definition should cover both targets, if you use separate module files for each then this should work as expected.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Do you mean something like this:
[[extensions.targeting]]
target = "purchase.thank-you.block.render"
module = "./src/Checkout.jsx"
export = "thankYouBlock"
[[extensions.targeting]]
target = "purchase.thank-you.block.render"
module = "./src/OrderDetails.jsx"
export = "orderDetailsBlock"
I tried that and still got the same error.
It should be working with two separate files - I'll connect with the internal team again to see what might be causing this.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Okay thank you.
For now, I’ve resorted to creating multiple extensions though.
Hi, Getting the same error trying with different files. Did you got a chance to get with team?
Will we use this feature on shopify Plus plan?