Any solution between Custom storefronts and liquid script

Solved
New Member
10 0 0

To add my own shipping feature to the cart, I am looking for a way between Custom storefronts and liquid script. Custom storefronts is too heavy and have to build from the ground. For liquid, seems you can only do transitional javascript and only limited thing you can do. Also you have the ask the merchants to add those script manually.

 

 

0 Likes
Shopify Partner
1653 38 136

@jackyq2015 wrote:

 Also you have the ask the merchants to add those script manually.

 


If your building an app use the script_tag api letting you inject code on the front end, or use the asset api to add things to the theme. 

Also proxy app pages.

 

Otherwise your description is to vague.

Problem Solved? ✔️Accept the solution so you can help others.
Confused? Busy? ? Get me to solve it paull.newton+shopifyforum@gmail.com.
Buy me a coffee? ☕ paypal.me/paulnewton or donate to eff.org
0 Likes
New Member
10 0 0

Thanks for the response. Sorry for the vague question. I am pretty new to to shopify.  Among the 2 ways you mentioned, Could you please explain a little bit which way I should use under certain situation in general? seems the assert API is more powerful than the "script tag"? Is it available to all the plan?

 

For example, If i am a courier company, and I want to add my own courier service as an option to the buyer when checking out? what's the best way to achieve it? 

 

Thanks

0 Likes

Success.

Shopify Partner
1653 38 136

@jackyq2015 wrote:

Thanks for the response. Sorry for the vague question. I am pretty new to to shopify.  Among the 2 ways you mentioned, Could you please explain a little bit which way I should use under certain situation in general? seems the assert API is more powerful than the "script tag"? Is it available to all the plan?

Their isn't a convenient CYOA infographic yet too many variables and clever use cases.   "powerful" is subjective and each has tradeoffs 

  • Just read the docs,  search the forums for the posts just like yours and play with them both.
  • Use script_tag to iterate fast if your doing javascript  based dynamic changes and DONT want the merchant fiddling with theme code.
  • Use assets api for performance or things reliant on static rendered html and when you can eat the cost of a setup process.
  • Examine other apps that do stuff like this promobars,popups,newsletter,contact forms,shopify-reviews, etc.
  • These aren't laws, just very myopic views of these two different systems.

For a theme asset you could add a complete object(img,template,etc) or fetch an existing asset perform operations on it (like text replacement in a template). Meanwhile with script tag you just inject javascript and do client side modifications, though arguably you can add javascript via the asset api but often needs merchant to update some other template manually.

 

Good integrations generally use either use the asset api directly and/or have a process to add code automatically and/or manually(either by docs for merchants, upsell setup service, or eat the overhead to install for the merchants first install).

For script_tag a lot of apps over aggressively inject overreaching code creating a kind of three-stooges-syndrome performance problem forgetting they wont be the only kid in the merchants candy store so performance quickly tanks as more apps are added that behave in the same way.

 

 


For example, If i am a courier company, and I want to add my own courier service as an option to the buyer when checking out? what's the best way to achieve it? 


Completely different use the Carrier service api, that's mostly for operations that occur AFTER the customer leaves the front end /cart entering shopifys hosted flow during the shipping step ( checkout.shopify.com,etc).

Or just add a custom carrier service using an email address in a store admin shipping fulfillment settings (this just a static emailer using the fulfillment notification template) . Note: script_tags inject code to  online store-front or order-status page (aka thank youpage ) basically bookending the checkout process for purposes of adding code

 

 

Problem Solved? ✔️Accept the solution so you can help others.
Confused? Busy? ? Get me to solve it paull.newton+shopifyforum@gmail.com.
Buy me a coffee? ☕ paypal.me/paulnewton or donate to eff.org
1 Like