Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Add thank you page extension block in [ORDER_STATUS2] block position.

Add thank you page extension block in [ORDER_STATUS2] block position.

Turbofan1178
Shopify Partner
57 4 10

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.

 

supported-locations-thank-you.png

Founder, WC: Invite To WhatsApp Channel
- Invite customers to join your WhatsApp channel with a single click
- Boost outreach message open rates
- Grow sales with direct outreach on WhatsApp channels
Replies 8 (8)

Liam
Community Manager
3108 342 884

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

Turbofan1178
Shopify Partner
57 4 10

Yes precisely.

Founder, WC: Invite To WhatsApp Channel
- Invite customers to join your WhatsApp channel with a single click
- Boost outreach message open rates
- Grow sales with direct outreach on WhatsApp channels
Liam
Community Manager
3108 342 884

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

Turbofan1178
Shopify Partner
57 4 10

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.

 

Founder, WC: Invite To WhatsApp Channel
- Invite customers to join your WhatsApp channel with a single click
- Boost outreach message open rates
- Grow sales with direct outreach on WhatsApp channels
Liam
Community Manager
3108 342 884

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

Turbofan1178
Shopify Partner
57 4 10

Okay thank you.

 

For now, I’ve resorted to creating multiple extensions though.

Founder, WC: Invite To WhatsApp Channel
- Invite customers to join your WhatsApp channel with a single click
- Boost outreach message open rates
- Grow sales with direct outreach on WhatsApp channels
Zain1997
Shopify Partner
4 1 1

Hi, Getting the same error trying with different files. Did you got a chance to get with team?

mason225
Shopify Partner
16 0 3

Will we use this feature on shopify Plus plan?