Questions about adding element into storefront?

Solved
Highlighted
New Member
2 1 0

Hi I am just starting to explore shopify app and have some questions here.

1. In order to add element into storefront, what is the best approach?

Using Script tag? or modifying the storefront through Asset API?

What are the CONS and POS of each approach? e.g. injecting script through tag might lead to slow loading...

 

2. How to posit the elements properly?

It is easy to add an element with fixed position but what if I want to place it related to some native elements, e.g. above the price or below the primary button?

Given the various themes shops use, is it possible to posit the elements properly without requiring merchants to manually edit the code. 

 

3. How to ensure the added elements inherit the style of each shop's theme?

 

I have walked through the document and some tutorials but feel it hard to have a clear understanding to answer these questions......If there are any good tutorials could help me to find an answer, please do tell me!

Thanks : )

0 Likes
Highlighted
New Member
1 0 0

Did you find the answers on these questions already ?

0 Likes
Highlighted
New Member
2 1 0

This is an accepted solution.

Hey, it is just my understanding... hope it helps...

Q1:

I think it is to modify the code in template directly with API calls. Mostly Script tag would lead to bad ux.

Q2:

Check the liquid and you'd start to find some clues. But it wont give you guarantee...

Q3:

No way.

0 Likes