Ad

Shopify App Necessary? Hard-code Into Theme?

- 1 answer

I have much experience developing for WordPress but this will be my first project developing for Shopify.

I will be customizing a 3rd-party Shopify Theme with custom functionality as per the client's website needs. I've been reading much documentation but I am still a bit confused about Shopify Apps...

My question is:

Do I need to build an App to extend the functionality of my theme, or can I just hard-code the new functionality directly into the theme? Is there any reason to develop an App for functionality that will only be used on my theme?

I thank you very much for your advice.

Ad

Answer

Do I need to build an App to extend the functionality of my theme, or can I just hard-code the new functionality directly into the theme?

Short answer: Yes. (Damn that mathematician's response!)

Is there any reason to develop an App for functionality that will only be used on my theme?

Longer answer: Sometimes, yes.

That wasn't very helpful

Longest answer: True. Let's break it down a little more, then.

Without knowing what you need to do, I can't offer a concrete yes-or-no answer to the question, "Should I build Feature X as an app?"

If you...

  • Need to add, modify or delete any objects that require admin privileges (including products, variants, collections, orders, etc.), or...
  • Need to listen for any of Shopify's webhooks, or...
  • Need to store data in an external database for any reason...

... you will need an app to have the permissions required to access and manipulate data at this level.

However, if you...

  • Can do everything you need with the existing Shopify objects, and...
  • Need few or no settings to control the desired behaviour...

... you would not need to create an app. Shopify themes have some powerful tricks & tools available to you, including:

  • The ability to create custom endpoints for any of the main types of objects to get the data you need;
  • Easily-edited settings_schema file to add arbitrary configuration variables to help control your mini-app;
  • Javascript endpoints to let you add, remove & edit products in the cart

Hopefully this quick breakdown helps you decide if you need to create an app or not. (And to anyone who does need to make a single-site app, remember that Shopify lets you create 'Private Apps' that don't have to go through the app store process to get widespread approval)


I thank you very much for your advice.

You're welcome! Hopefully it proves to be helpful. Good luck!

Ad
source: stackoverflow.com
Ad