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.
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!
Related
First of all this is my 1st stackoverflow post so sorry if I am missing context or do if the question is too out of the ordinary.. Onto some context and example use case for my question.
Context
I'm making a simple app for an uni assignment in React-Native but one of the requirements client we are making it for is that the text (copy) in the app can be adjusted by him after we deliver it to him.
Example Use Case
They want to change the text on the welcome screen from "Welcome, [Name]" to "Hello there, [Name]". But they aren't technical so they expect to be able to change this in a simple UI.
I've tried googling for solutions but keep finding Localization solutions instead and all I've found so far require in-code edits.
Example:
🌍 react-native-localize & Expo Localization Docs
Any help/pointers are much appreciated!
There are two basic ways to solve this issue.
Create an API that the app calls to get the text. Make web or app tools for the client to edit the text in the API. This is usually called a CMS (content-management solution). There are a huge range of options, including building your own.
Pros:
the client can maybe manage their own content without intervention... sometimes
content changes are "instant" - without an app release
Cons:
non-trivial to plan and set up
requires support/maintenance
additional costs for hosting
additional app complexity (need to think about error states, caching, polling?)
app NEEDS to be online to have content
OR
The client submits a ticket for the text changes and a developer makes them.
Pros:
doesn't require the creation/ maintenance of additional tools
app doesn't need to make network requests for content
Cons:
changes take longer and require a new release of the app
My Shopify app needs to edit storefront to change existing element. There are two ways to change storefront code in Shopify
Edit liquid theme file
Add client side JS with Asset API
However, different merchants use different themes in their stores. Is there any way my app works with every theme or how can I write a script which supports maximum themes? It would be very helpful if you can give some hints or share your thoughts about this issue.
After searching more about this issue I got some insights like Unfortunately we can't edit different theme with same script, because each theme might be very different. Some themes might even have different filenames for this sections or they might have completely different HTML structure.
There is no easy and universal way how to solve this problem. One of the ways:
You can do some heuristic in the theme files and try to find a correct place where to insert your code. For example, langify is doing that. It's scanning the whole theme and finding places where to insert their code.
You can ask a customer to add your code manually. Many apps are doing that because it will cause fewer errors. You just need to prepare detailed manual how to set it up properly.
You are wrong, exist more ways.
on storefront 2.0 you can create a theme app extension this is the recommended way today.
UPDATE: On 2.0 you should recommend your customer to replace their section with your section, this is currently the clean and recommended way to do.
On 1.0 well depends a lot on your project complexity or the part on the code your app touch...
Many apps use the theme Rest API, with that you can add on your app installation script a step for downloading the published theme. After that 2 options:
You can search and replace something specific, you can write a script then read the theme files and replace what you need to be replaced, then do the change automatically and republish your changes on the store. Faster no human intervention
use the downloaded code to easily read and replace manually the code using an IDE and after manually upload your changes using the same API. slow, need human intervention but more flexible.
You can start with option 2 now and continue to develop the script for option 1.
We have an online store that used to be managed by a third party (lets call them BS Company) that did the hosting, webdesign and everything... Now we've decided to move to Shopify because this company has screwed us over in every step along the way.
We already have the store ready on Shopify. Our current website is hosted on DigitalOcean, for which BsCompany has all the access.
They are being impossible, saying that they can't transfer out of DigitalOcean because they have several client's sites with the same hosting. This sounds like royal BS. We just want to move everything to shopify.
I'm going to be on the phone with them shortly, I just want to be informed. What should I ask them to do specifically? What I'm I trying to get them to do?
I'm totally lost here guys, please help.
This goes outside of the scope of StackOveflow purpose which is to help developers with their code issues.
That said you are providing too little information here.
If you want to transfer your store to Shopify and the theme is already done then you need probably only the content from the old store.
Since you didn't mentioned what is the previous platform (WordPress/Drupal/Magento/etc...) it will be hard to provide a recommendation for an App that will import the content from the other platform to Shopify.
So pretty much you need to know what platform the current store is using. For example if you are using WordPress with WooCommerce you will need the following App in Shopify -> https://help.shopify.com/en/manual/migrating-to-shopify/import-store-app/woocommerce-migration and you will need to export the content from the WordPress.
Please have in mind that this will focus mainly on the products, if you like to import the pages and custom post types ( we are still are talking about WordPress here ) you will need some other App or custom logic.
So long story short is not an easy job if there is no App for it.
If you want to keep the SEO for your previous site please have in mind that the Shopify have a predefined URL structure that you can't overwrite.
This means that pages that were using a specific url structure will be different now and you will need to create redirect rules in Shopify manually for each page, which will be a tedious process if you have too much content.
So pretty much you need to know:
What platform the site was written at
Export of the database ( and what database was used MySQL/MongoDB/etc... )
The site files ( they need to provide them to you )
With this information you will be able to create a local copy of the site for reference.
I am in the planning phase for a shopify app that will add a tool on the checkout screens and I am a newbie to shopify. I also need to provide admin. screens where the user can modify options that will change the tool to fit different scenarios. On reading the docs., I am confused regarding what shopify options I need to use to pull this off.
1) For the part of the app that will display something on the checkout screens what would I need to do for providing this functionality?
2) For the admin. screens that make the tool appear on the checkout screens, what would I need to do for this to appear in the admin. section for shopify, embedded app, etc.?
It seems like I would need to split this into two separate apps. Am I correct in this thinking?
You cannot add tools to checkout. You should do some research about Shopify Platform before scheming to make Apps. Once you understand the platform, you can dream up useful Apps. Asking questions about how and where to place admin screens reveals you have not really done any research, so expecting help here is likely not going to happen.
Is there a good Open Source shopping cart implementation for TurboGears? (I found Satchmo for Django, but I'm coming up empty handed for TurboGears.) I'd like to avoid reimplementing this particular set of wheels.
No, I do not believe there is.
You might want to take a look at stroller it's a library to add ecommerce features inside turbogears2 apps. It supports both manual payments handling, dispatching and paypal payments. It is meant to be used without forcing users registration.
It is still in playground status and is missing documentation, but should be quite easy to mount it inside your app and start playing with it.