How To Have App Embed Block Show Above Add To Cart Button For All Themes And 3rd Party Themes?

hacun3jr
Shopify Partner
23 2 18

Hello,

 

We have a bundle app which uses 2 app embed blocks, one is floating and the other needs to go above the add to cart button on product pages. We have it showing perfectly on dawn and prestige themes, but I noticed that each theme seems to have its code different. Is there a way to make the embed blocks show correctly for all themes and 3rd party themes automatically?

 

it’s a question of needing to add the embed block as a product form with an add to cart button above the hidden default add to cart button.

 

Since I don’t have access to every theme and some cost hundreds of dollars, how do developers make their bundle apps work with most themes automatically??? Thanks!

Reply 1 (1)

Prudentt
Shopify Partner
80 2 1

For what i understand, you have 2 options:

1: Use an app block with a deep link that let's your user open the theme editor with the app block already selected and added in the product detail section. I managed to do this with a deep link in this format: 

 

"https://${myshopifydomain}/admin/themes/current/editor?template=product&addAppBlockId=${extensionId}/${extensionBlock}&target=mainSection"

 

So the user can position the element on top of the buttons (or wherever he wants, which is something i think we cannot limit)

 

2.- Use a theme app embed to add the element through javascript, which requires that you generate a custom script for each theme (all free themes have almost the same html and css structure btw)

 

If someone knows another way, it would be interesting to hear about it.