Integrating with Shopify
Shopify integration in Beanstalk is a great way to streamline the development, review, and deployment of your store themes. It also greatly simplifies the process of managing multiple themes, at the same time and keeping track of updates going to many stores.
We took great care in designing this integration and tried to make it as useful as possible for as many people as we could, so in this document we will try to go through all the options you have one by one.
Importing your existing Shopify theme as a repository
On the Repositories tab there's a "Fetch from Shopify" button that will get you into the following wizard:
Here you have two options – connect to your store automatically (through OAuth) or use API keys generated by Shopify. We recommend using the automatic way if you're integrating with your store, but for agencies it may be easier to use API keys provided to them by their customers.
After completing this step, you should see the following screen, where you can select a theme that you want to import into Beanstalk:
The next step will be to choose what kind of repository you want the theme to be imported as, and its name:
On the last step, you can select permissions for that repository and integration:
After finishing with the wizard, you'll be taken to the repository page that will be updated as soon as import process is finished. After that, you can copy your repository URL from the sidebar, and clone your new repo locally, or edit the files right in the Browse section. If you would like to setup automatic deployments for changes you make into the repo, please look into environment settings on the Deployments page.
Creating new Shopify theme and it's repository through Beanstalk
If you'd like to start working on a new Shopify theme for your store and initialize the repository in Beanstalk at the same time, here's how you can do it.
Connect the Shopify store as described in the first step in the instructions above. When you reach the page that asks you to select a theme, pick "Create a new theme...". After you do, you should see something like this:
Here, you have a choice to base the new theme on the Skeleton or Timber frameworks made by Shopify, on another theme in your store (we will make a copy of it), or on another repository in your account.
After you're done with this step, you can continue with the repository setup described in the section above.
Setting up deployment to Shopify theme from existing repository
If you already have a repository in your account that has a Shopify theme and you want to be able to deploy it through Beanstalk, here we will describe how you can do it.
Start by creating a new deployment environment in the Deployments tab or use an existing environment. Once the environment is created, you can add a new server of "Shopify Theme" type and you should see the following screen (part of the page is shown):
On that page you can enter a name of a server for your convenience, and your store details. Again, you have an option of automatic or API key based integration to Shopify explained in the first section of this reference. After you integrate with the store you can select either an existing theme or create a new one in your store, and that's where we will deploy the files.
Why are some of the files I deploy are ignored?
Shopify is very restrictive in what it accepts as theme files; only certain directories and files are allowed to be stored in a theme. Shopify has strict restrictions on what files can be uploaded to the theme. Only files in the following directory are allowed: assets, config, layouts, snippets, templates, and locales. No other directories are allowed.
Every file or directory that does not fit the pattern accepted by Shopify will be ignored and reported as such in the Transfer Log.
My deployment fails on one file. Why?
Please check if the file contains broken unicode characters. One good way to test if something is wrong with the file is to try to upload it manually to your theme through the Shopify interface and see if it works there. If it works there, but not in Beanstalk, please contact our support to investigate the issue.