adding custom html elements via API from APP

evgenshe
New Member
4 0 0

Hi, 
I'm trying to add custom HTML to the product page via API. Working good
but I've faced with the problem that themes are different and I can't know all positions of elements 

for example, I need to add HTML right after the product title on the product page and in the catalog product listing 

Screenshot 2021-03-14 at 12.43.10.pngScreenshot 2021-03-14 at 12.43.37.png

and I'm wondering if there some rules that can help me define where are these elements? 
maybe some class that will be there in all themes
I'm trying to find some regularity that will help me to find these elements on all themes
and I can parse HTML and insert it there 



0 Likes
AdamSmith12
Pathfinder
71 5 8

hello

you can work with Xpath it's easy and will give you the right position of the elements 

 

If helpful then please Like and ✔️ Accept Solution.
Do you need custom changes on store ? please send me a personal message and we can discuss.
Email: contact@salbimy.app
0 Likes
evgenshe
New Member
4 0 0

so I can find some liquid variable {{ product.title }} and see in what element it wrapped? 
but there can be not one variable

0 Likes
AdamSmith12
Pathfinder
71 5 8

yeah this is why XPath better or contact me with your store link to check it 

If helpful then please Like and ✔️ Accept Solution.
Do you need custom changes on store ? please send me a personal message and we can discuss.
Email: contact@salbimy.app
0 Likes
evgenshe
New Member
4 0 0
AdamSmith12
Pathfinder
71 5 8

you should make your API works with all themes 

If helpful then please Like and ✔️ Accept Solution.
Do you need custom changes on store ? please send me a personal message and we can discuss.
Email: contact@salbimy.app
0 Likes