Boilerplate theme shopify

Find out your best Shopify theme and theme on shopify in less than two minutes

Find Shopify Theme — it's free
No difficulty
No complicated process
Track competitor's stores
BACK

How to use JSON Templates with Shopify Themes

嗨,我是Liam,我是Shopify的佈景主題開發人員推廣者,在這段影片中,我們要學習 如何利用JSON範本製作佈景主題,JSON範本能讓商家 在所有頁面上新增與重新排列動態內容,商家可以藉由這個功能擴增網路商店的自訂選項,若要將佈景主題上架至Shopify佈景主題商店,就必須包含JSON範本,所以說,如果你想將佈景主題發佈至市集,就必須在所有頁面使用JSON範本,一起來學習吧,先來看看一個已經套用了JSON範本的佈景主題,瞭解商家在自訂佈景主題時會看到的效果,這是我的開發商店,我開啟了佈景主題Dawn,我們預先安裝的招牌免費佈景主題,JSON範本已經設定好了,也能在GitHub中找到,你也能在那裡找到JSON範本設定的參考資料,現在打開佈景主題編輯器,前往任何首頁以外的頁面,可以看到佈景主題編輯器中有個新的區段選項,點擊之後,就會打開一系列 適用於這個頁面種類的各種區段,等等也會學到這些區段要如何啟用,商店的其他頁面也是如此,每一頁都會出現新增區段的選項,使用JSON範本就能啟用這個功能,前往Shopify管理介面的編碼編輯器,看看佈景主題的範本目錄,可以看見所有範本用的都是.JSON檔案,而非舊版佈景主題使用的.LIQUID檔案,這是.JSON頁面的範本,這個範本可以套用至普通的靜態頁面,在這個JSON檔案中,可以看到這個陣列,代表範本包含指派的區段,有個區段叫作「主要」,還有類型欄位,類型的值是「主要頁面」,意思就是,這個頁面範本含有一個主要頁面區段,而這個主要頁面區段,或者說是主要頁面類型,則與區段目錄中的一個區段相符,我們能在這裡看到主要頁面.LIQUID,其中包含顯示頁面所需的標記與Liquid,這裡可以看到頁面.title,和頁面.content,分別位於不同容器或頁首中,依據object而定,回到這個.JSON範本,它的功能就是指示頁面顯示主要頁面區段,這裡還有一個順序區段,如果有多個區段的話,它就能決定區段顯示的順序,還有一點也很有趣,如果回到,來到這個頁面,這就是使用.JSON顯示的頁面,可以新增一個區段,舉個例子,加入聯絡表單區段,然後儲存,現在回到編碼編輯器,看看主要頁面的Liquid,但若看看.JSON頁面,就能看到這裡已經改變了,我在這個頁面上加入了聯絡表單區段,.JSON頁面的後台就會,同步更新並包含這個區段了,這個編碼對應到剛才建立的區段,也能看出區段種類,也就是聯絡表單區段,如果查看聯絡表單,這也會出現在區段目錄,表示這個區段包含在範本中,而且順序也已更新,從這個使用.JSON的範本可以看出,.JSON能增強佈景主題編輯器,與佈景主題本身的關聯性,現在我們瞭解了JSON範本的基本知識,現在來學習如何將使用Liquid範本的佈景主題 移轉至JSON範本,好讓區段在所有頁面上都能使用,舉例來說,這個佈景主題叫「Liam的佈景主題」,所有頁面都使用Liquid範本來顯示,可想而知,自訂佈景主題時,如果前往首頁以外的頁面,我就不會看到「新增區段」的選項,我要改變的就是這個部分,基本上,我們要做的是,將內容自.liquid範本,移轉至既有的區段,或者建立新的區段,以將內容移轉過去,接著我們要將每個檔案類型的.liquid範本刪除,並以.JSON範本取代,首先,建立佈景主題的副本,或者備份佈景主題,以便復原,降低破壞佈景主題的風險,我要使用Shopify CLI,在我的電腦上編輯佈景主題,好讓我在將佈景主題發佈至商店之前,先以未發佈的狀態進行測試,若你想瞭解如何為佈景主題設定主機開發環境,我們最近發佈了一支很棒的影片,可以在下方的說明欄中找到連結,我們要先從.liquid移轉至.JSON的範本,就是產品.liquid檔案,在這個檔案中,可以看到我們加入了一些區段,區段下方也有一些編碼,但首先,我要看的是包含標籤的區段,有個區段叫作產品—範本,我要從區段目錄中找到這個區段,產品—範本,這個區段包含了,產品頁面需要的所有標記,例如產品多媒體檔案,產品表格,其中包含所有環節,包括「新增至購物車」按鈕,由此可見,這是產品頁面的主要區段,現在我們要將,出現在這個範本中的內容轉移至產品範本區段,此外,我們還要記下這個頁面中的產品推薦區段,並新增至JSON範本中,現在,我要複製下方的區段編碼,再貼上至產品範本區段,我要把它新增至開放結構化標記的上方,也就是範本的下方,因為在原本的範本檔案中,編碼就位於區段的下方,將編碼新增至相同的標記下方,就能確保內容移轉之後,區段也會出現在相同的位置,儲存之後,接下來的步驟不是必要的,但可以方便你管理佈景主題中的不同區段,我要將自產品範本移轉至主要產品的區段,重新命名,這會讓區段目錄更清楚,而這些區段都是產品表格所需要的,基本或主要區段,換作是頁面的話,就可能是頁面的標題或內容,重新命名後,就可以回到產品.liquid,記下產品推薦區段的位置,接著,我要刪除產品.liquid檔案,刪除的原因是,一個範本資料夾中,不能同時包含,產品.JSON與產品.liquid檔案,我們要移除或刪除範本資料夾中的產品.liquid,並在範本目錄中新增產品.json檔案,接下來,我們要生成幾個JSON檔案,以將特定區段指派至產品範本,這個擷取碼可以在下方說明欄中,移轉至JSON範本的說明文件連結中找到,你可以直接採用這個擷取碼,但我們的目的是使用JSON建立陣列與Object,以指派哪些區段要出現在範本中,使用我剛才建立的區段,也就是主要—產品,以說明此範本或頁面類型的主要區段就是主要產品,儲存之後,就能移轉至網路商店編輯器的開發實例,導覽至產品頁面後,就能新增區段了,這個頁面可存取的所有區段,都會出現在這,很好,我們成功將.liquid產品頁面,移轉至使用JSON的範本了,現在區段會出現在這裡,太好了,這些區段會出現在產品頁面上,但或許你還記得,頁面上還有一個產品推薦區段,接下來的步驟就是把它新增回去,該區段現在已經會在這裡出現,名稱為產品—推薦.liquid,只要將它重新指派至範本就行了,因此,我要指派一個新的區段,命名為「推薦」,此外,我還要,新增類型欄位,類型欄位必須與要包含的區段名稱完全相符,在這情況下,類型必須是產品—推薦,當然了,我還要調整順序,我要新增…,你會發現我以推薦作為順序,因為這是我指派至JSON範本的名字,儲存之後,我要回到開發團隊實例,讓伺服器運作看看,如果按下重新載入,就能在側邊面板中看到產品推薦區段,推薦區段也會出現在這,太好了,此外,我也可以移動它,很好,我成功重新建立了,與.liquid範本相同的產品範本,而且還能新增區段,基本上,這個做法也能應用在,其他種類的頁面,這樣一來,你就能在所有頁面中加入區段,雖然基本方法是相同的,你可以用這個方式,將內容移至區段中,再建立新的JSON範本,但在某些狀況,方法可能會比較複雜,或有些許不同,舉例來說,這裡有個文章範本,我要在此加入主要文章範本區段檔案的區段,但如你所見,區段的上方與下方都有內容,而這裡的內容,就是與商店評論相關的內容,這裡的做法之一就是建立新的區段,其中包含所有,與評論相關的內容,首先,我要建立一個新的區段,命名為「網誌—評論」,.liquid,接著,我要將,所有與評論相

The above is a brief introduction to Boilerplate theme shopify

Let's move on to the first section of Boilerplate theme shopify

Online Store 2.0: Building themes on Shopify | Shopify Unite 2021

Online Store 2.0: Building themes on Shopify | Shopify Unite 2021

hi everyone my name is tebow i'm a,developer at shopify and with matt and,ryan we're going to walk you through the,new theme architecture in online store,2.0,we'll start with what's changing in the,themes then talk about what meta fields,are and how will merchants use them,and finally how we're combining themes,and metaphase to make the theme editor,extremely powerful for all merchants,let's get started a few years ago we,released,sections section files go in the,sections directory of a theme,they use liquid or homegoing templating,language to produce,html as the name implies sections are,intended to be dynamic components for a,chunk of a web page,think header footer or in this example,the title and content of a custom page,resource,merchants can then customize sections in,the theme editor without ever seeing or,modifying theme code,here we see our page section rendering,an about page,surrounded by other sections,one of the great things about sections,is that you can make what they render,and how they render it dynamic based on,a configuration that merchants can,easily customize,in the theme editor we support settings,equivalent,to ui inputs in the sidebar of the,editor for things like check boxes,drop downs various kinds of picker we,also support blocks,as you'd expect there are containers of,settings that can be added removed and,reordered within a section,for example here is a schema for an,image with text section,there's a setting for the image and two,blocks for the content that goes beside,it,here's what this example looks like in,the ui,now as many of you know our first,release of sections came with a,significant limitation,you could only add remove and reorder,sections on the home page,you could use them elsewhere but they,were fixed this turned out to be a very,hard problem to solve,in part because of the way we store data,and themes and the flexibility we give,themes to be unique,but i'm happy to report that as many of,you guessed we finally have sections,everywhere let me show you how it works,template files are the root of the code,that renders a particular page,they go in the templates directory and,follow a name convention based on the,page type,like sections they contain liquid code,but unlike sections they cannot be,configured through the ui because they,like structure,here we have an example of a template,rendering custom pages like an about,page,today if you wanted to use a section for,this template you'd end up with,something like this,just one section tag in a liquid file,that's obviously sub-optimal,when we released sections a while back,we made it possible to render sections,in a template as a progressive,enhancement,but as you can see here the template,file doesn't serve much purpose anymore,and while the section can be customized,more sections can be added to the ui,since this liquid file remains,unstructured,so with uninstall 2.0 we're giving you,the option to create structured,templates,that can be customized through the

After seeing the first section, I believe you have a general understanding of Boilerplate theme shopify

Continue the next second section about Boilerplate theme shopify

How To Use Javascript in Shopify Themes

How To Use Javascript in Shopify Themes

hey guys is your boy joe back at it,again codingphase.com in this video we,are going to be talking about,how to use javascript in your shopify,themes okay,now this is part of the course shopify,theme developer which is pretty much a,bundle of courses that teach you,everything that you need to know about,shopify okay i've already taught a,couple of the basic stuff inside of the,shopify theme development course now we,have the shopify online store 2.0 which,is basically a continuation of this,course,but with all of the new features and all,of the new ways of creating themes in,2021 2022 2023 2024 2025 okay so pretty,much everything that you're gonna be,seeing in the ecosystem shopify is,inside of this course okay so let's get,started by taking a look at this theme,that we are creating now this theme is,basically like a,child theme or a copy or like a starter,from the dawn theme that was released by,shopify which is open source which,allows us to use their their code and,use what they have already created um,but basically if we look over here this,is what shopify is using okay and this,is the cart.js,and this is what controls the cart,system okay now in here if we take a,look we can notice that they're using,class based uh components right and we,could say these are actually custom,elements now for those of you guys that,have never seen this before uh think,about this this is like react components,but natively okay with the browser okay,this is all part of vanilla javascript,like you don't need a framework to do,this again you can literally go in on,mozilla and check this out okay you,don't have to use webpack you don't have,to use any of that you can just write,your javascript and pretty much define,some custom elements okay,a few years ago i actually went in and,created a course on polymer and we,talked a lot about this uh because you,know in the future or supposedly in the,future uh we were supposed to all be,using,custom elements okay did that happen i,don't know some people use it some,people are too comfortable with react,and viewing angular okay so it's gonna,be hard for for people to take away,their their front-end frameworks even,though the you know the the browser can,already do a lot of the things that we,use frameworks for now why does shopify,decided to go with this route well,actually it's very simple the main,reason is because it just makes your,website way faster okay,now imagine this if you are using,something let's say like react right and,you are using,i don't know,some library out there like some,component library uh like let me show,you guys an example,like this one materialize i see a lot of,people that use materialize shout out to,chris shawn who love material ui okay,but if you're using this type of of,libraries right uh you're downloading,not only this component as a dependency,but then you also have react as a,dependency that you have react dom as a,dependency then you have whatever,dependencies that this material ui needs,

After seeing the second section, I believe you have a general understanding of Boilerplate theme shopify

Continue the next third section about Boilerplate theme shopify

Shopify Liquid Objects and how to use them for Theme Development

Shopify Liquid Objects and how to use them for Theme Development

so,so,so,hello,what is up my friends how is everybody,doing happy friday welcome back to,another live stream,hopefully you guys can hear me okay let,me adjust some of my volumes a little,bit here,so that my voice comes in,all right,so,let's get right into things today um i'm,actually going to be talking about,liquid objects today and specifically,how to use these liquid objects for your,shopify theme development so,liquid objects are a way for you to,essentially output dynamic content in,your shopify themes so in the background,what shopify is doing is they are,creating these objects like for your,products or for your blog posts and,they're allowing you to query them using,liquid,tags so essentially if you look at this,example,what's happening here is you're querying,the product object and you are returning,the title within these little curly,brackets,right,so we're going to dive in and actually,start playing around with some of this,code ourselves,but i do want to,talk about three really important things,the first is the,delineation between,all of the different kinds of objects so,there are,global objects which are the ones that,you're probably most familiar with and,these include all sorts of different,things if you look over here on the the,left hand side you're gonna see quite a,few of them,and this includes your blog your cart,articles uh your address your customer,data,all sorts of different things are,considered global objects now aside from,these global objects which we're going,to get into,in depth during the stream there are,what you would call content objects so,what this does is it will return all of,the content for a specific,page or specific section so if we go and,we actually take a look at some liquid,code all i've done here is oops i've,gone and i've,expanded not too big there we go,this index.liquid file which is inside,of your templates folder and here you,can see that it only has one tag in that,file and that tag is content for index,so rather than,being like a global,object where we're actually querying a,specific object here we're querying,something larger i would guess like a,page or a template or something uh so,this your is pretty common when we're,looking at um these kinds of pages like,index um,404 doesn't have it,so let's see what else has this,content for header that's another one so,querying your actual header and pulling,in all that content,your layout,i guess this is another one,so there are a few instances in your,theme especially if you're using the new,dawn theme where you're going to run,into content objects okay,so content for header content for index,and then content for layout these are,the three different types we'll go into,this a little bit at the end and then,finally there are a few other objects,that i don't really run into too often,they're kind of uh for very specific use,cases so these are for things like,adding additional checkout buttons or,content for additional checkout buttons,i'm not sure if we

After seeing the third section, I believe you have a general understanding of Boilerplate theme shopify

Continue the next fourth section about Boilerplate theme shopify

Shopify App Boilerplate with ReasonML, Hasura, Serverless.

Shopify App Boilerplate with ReasonML, Hasura, Serverless.

hello there I'm Logan call and this is,running from JavaScript today we've got,another video brought to you by sea,monster studios we've been developing a,Shopify app starter just to get the ball,rolling a little bit quicker when we,need to develop an app there of course,the front end is in reason ml as well as,our lambdas which are serverless,functions those are also written in,reason we've got hysteria to handle our,Postgres database in graphical API layer,as well as net liffe I to host our,front-end and century for error,reporting of course you're always,welcome to take this and fork it that's,the nature of open source and change,whatever you'd like but I've learned a,few things along the way and figured,we'd share it so okay so let's go ahead,and before we take a look at going,through the getting started here let's,let's talk about the repo and the layout,here we've got our lambda functions here,they have their own web pack file here,separate from the root level one that,handles the the UI we've got our server,list configuration and a few lambdas,that we'll talk about those along the,way and then of course some utils and,some bindings our public folder is just,what it sounds like it's gonna be our,next file and then of course our bundled,UI and JavaScript will get thrown there,as well and we gotta get graph QL schema,script here we've got some shared utils,shop queries the types the get graph QL,schema script is handy because we're,gonna you know we're gonna set up some,authorization so that no one can just,randomly access our API for graph QL and,that will go ahead and handle that after,we've set up that authentication okay so,we've got our source here this is all,for our UI and we've got or let's say,we've got our App Store and this is,going to set up our graph QL instance,it's going to make sure that when the,app initial low initially loads that,we're getting some key elements from,Shopify including the shop the access,token and the API key for the app and,then where if that's successful then,we're going to go ahead and store that,and then our app will be able to,continue on its merry way I've got our,App Store and then we can go ahead and,use the Shopify Polaris and Shopify,Bridge providers to go ahead and get the,UI up and running quickly there this,inner component is really just to,demonstrate that we're connected,properly to our hussar instance that,we're gonna set up it's really meant to,be replaced so all right so let's go and,get started here okay so first things,first let's go ahead and run yarn to go,to install our dependencies and while,that's happening we're gonna go ahead,and save our environment file the,example to just rather dot regular env,file and you can see those are the first,two steps right here the next step is,we're going to go ahead and go into our,Shopify partners portal and I'm gonna go,ahead and create a new app,and we're gonna set the create this as a,public application right and we need to,go ahead and set this

After seeing the fourth section, I believe you have a general understanding of Boilerplate theme shopify

Continue the next fifth section about Boilerplate theme shopify

How to Migrate Shopify Themes to Online Store 2.0 (Liquid to JSON Templates)

How to Migrate Shopify Themes to Online Store 2.0 (Liquid to JSON Templates)

hello and welcome to this final video in,this series on shopify online store 2.0,in the previous videos we covered some,of the other big announcements with,online store 2.0 such as the new meta,field functionality the github,integration and the extension of shopify,cli to work with themes in this video,i'm going to talk about the new theme,architecture and show you guys how to,move a theme created with liquid,templates into the new templates as json,system,so as part of the online store 2.0,announcements shopify finally announced,the arrival of a feature they've been,talking about for quite some time,sections everywhere previously the home,page was the only template that,merchants were able to add reorder and,remove sections from,now with the advent of json templates,that functionality has been extended to,all templates such as the product,template the collection template and the,page template to name a few in the new,system templates can be of either liquid,or json the choice is yours however if,you choose to stay with liquid templates,the section functionality that you've,been accustomed to on the home page will,not be extended to the other templates,that's why in this video i'm going to,show you how to replace your liquid,templates with json templates therefore,allowing you to take advantage of this,new feature so let's get started,all right so in this tutorial i'm going,to keep things in the browser i've got,three tabs open at the moment number one,my development store chris testing shop,as usual,and in the second tab i've got the,official documentation from shopify on,how to migrate a theme to the online,store 2.0 system which is essentially,how to migrate your liquid templates,into json templates as you can see,there's quite a lot of detail here if,you want to follow along this feel free,to but i'm here to make the process a,little simpler and to show you a visual,representation of how you can move,through this process,as you can see there's nine different,steps here what i've done is i've,simplified it into four different steps,which are remove the section tags move,surrounding code into their own sections,replace the liquid template with a json,template and add in the references to,the sections in your new json template,okay so this is based off of what we,have here,obviously they're going to suggest that,you back up your theme,but,the real process starts here when you,identify and remove section references,then we move code from the template into,a section which is either adding code to,an existing section or i would say more,commonly adding code to a new section,we're going to delete the liquid file,replace it with a json template file,and then add the references to the,sections so as you can see there's some,extra steps in here but essentially this,is the process removing the section tags,because we can't have a section within a,section,and then moving the surrounding code,around those section tags into their own,sections as we can no

After seeing the fifth section, I believe you have a general understanding of Boilerplate theme shopify

Continue the next sixth section about Boilerplate theme shopify

Free Headless Shopify Storefront Boilerplate

Free Headless Shopify Storefront Boilerplate

hey everyone my name is anthon kamerov,and i'm,founder and ceo of b2 storefront,we built a headless e-commerce shopify,and big commerce storefront so,it basically works for both platforms,and,um right now i want to present,uh our free,headless shopify storefront boilerplate,our goal was to implement as much,features as possible that are,making this usable right out of the box,and essentially stitch those,features with shopify natively,so everything is possible to,be customized from shopify,to certain level so i would,navigate through all the features and,probably will miss something but,essentially,it should be pretty much,entire system showed how how it,functioned,so let's start from uh from the main,menu,so those are the um,old categories that that are being,pulled from shopify,and we have ability to to shop by brand,we have ability to shop by by category,and here is the slider so,this slider is editable,from shopify level um,those boxes are custom code boxes,so this is something that is a part of,look and feel featured products,are taken from the collection and,those featured products have an option,of showing preview so,we have a multiple uh,pictures per product on a quick preview,we have uh variations uh displayed,so it's updating the price and so on so,of course we can share this product,we can add it to the wish list we can,add it to the,comparing,okay right now let's take a look,on other options here and,for example we can have different,variations,and different combination of those,variations are,is also implemented so you can see,how this product is different from,from this one,when we will go and open the,the product details we can,see that the page is loaded very quickly,and it is actually thanks to the,fact that it is server side rendered,uh storefront so all those pages uh is,static html but with full functionality,so,you can actually operate and make,purchases and so on so forth,so let's say i want to add couple of,those product items and you can see that,the specification,contain um complex,uh i items properties and stuff like,that,but it is vary from from,item to item so let's add this item to,cart,and we see immediately that the cart,is having six products because we added,six items,and this how the card preview looks like,uh this is uh multi-currency so if i,will choose,euro instead of usd,uh we'll see prices,given in euro so this way,when we adding those products,um to cart we'll see them,um as as,priced out in europe okay so let's go,and take a look on things,like like another product so another,product,you can see that the product description,could be could be totally different,and specifications could contain,different amount of tables and have,different shape of those tables,we have reviews and those reviews are,coming from yachtpaw,integration so,let's say we want to compare this,product,and we'll add this product to compare,list,and let's go and add something,else to the compare list we'll add this,one,and we'll add this

After seeing the sixth section, I believe you have a general understanding of Boilerplate theme shopify

Continue the next seventh section about Boilerplate theme shopify

Taking a look at Shopify's App CLI boilerplate

Taking a look at Shopify's App CLI boilerplate

all right so in my last video i showed,you how you can create your shopify app,with php laravel and if you don't,remember uh it looks,like this this is the basic app this is,uh what your app will look like if you,just create your shopify laravel app,over the cli but we haven't taken a look,into the code and so we didn't look,what's under the hood yet so that's the,purpose of this video i just want to,briefly take a look of,all of the code that they bootstrapped,i just want to show you what they've,done for you already so you don't have,to configure anything anymore or,less it's not that you don't have to,configure anything just configure less,and,yeah so let me just jump right into vs,code right here and um,just to let you know the first thing,that i did um,is i initialized a,git repo i haven't pushed it to github,yet but um just initialized this uh get,repo if you don't know how to do that,just say get in it and,your repo will be initialized,i've committed all my changes already so,i'm out here,with a,uh newly cleared created git repo,all right,and um yeah so here we are in,our app jsx this means that we are,running react here this is because uh,shopify polaris,their front-end framework is basically,based on react,and they created a lot of,react components for you to use i,believe that there is also,a version for vue if you're using vue,but it's not officially supported by,shopify there are some,git repos that use view or try to,convert this into view components i'm,not quite sure you will have to,google it and then you can see,how that works,i just saw that something like that is,possible anyways uh we're working with,react here and you can already see what,they have done for us here they already,set up the uh a browser router they,already set us up with providers and a,client router,this app provider all of this is,necessary for you to,uh,really work with polaris and i've also,made a uh tutorial on how to use browser,router with react polaris and it's a,very very complicated topic so i'm very,happy that they set us up with that here,already so you don't have to configure,that anymore,so you can see they,took a lot of work a lot of,configuration work so the first thing,that you want to do in order to see some,changes that you make to your react app,is you always want to run npm,run,watch,that will make sure that any changes you,make to your react app will be seen and,the react compiler will compile your,changes,to the public folder here and,then you can see your changes on,the shopify,page,okay uh so npm run watch is,running and now let's just say,um i want to set a new navigation,link right here i'm going to show you,really quick how that is done because,that is really easy all you have to do,is go to this component right here app,navigation,and you can already see here,that you have this navigation menu and,you have those,other navigation menus here so all i,want to do is just copy those lines and,let's just say i want to create a new,tab cal

After seeing the seventh section, I believe you have a general understanding of Boilerplate theme shopify

Continue the next eighth section about Boilerplate theme shopify

Build faster - Shopify CLI 3.0, starter templates and more | Editions 2022

Build faster - Shopify CLI 3.0, starter templates and more | Editions 2022

What's up Shopify app developers?,I’m excited to highlight the improvements,we’ve made to our developer experience.,This includes the Shopify CLI 3.0,,some revamped app starter templates,,and our new app distribution model!,It’s never been easier to build with Shopify,,so let’s check it out!,To kick things off, we simplified the build process,by reducing the number of commands needed to get started.,As an example let’s say you want to build a product subscription app.,That’s an app that allows buyers to purchase subscriptions from merchants,in order to receive products at a recurring delivery basis.,To build this you need,a web app to create and manage subscriptions,,an extension to be able to assign products to those subscriptions,,and another extension to show subscription options,on the front end of the merchant’s store.,Historically, in the old development workflow,just getting started would require a lot of steps.,The first decision would be,how you want your app to be distributed.,Either through the app store as a public app,,or through a single merchant install link, that's a custom app.,And you’d have to decide this before you even start developing.,Then, you go to your local development environment,and you still have a string of commands to get through.,These covered configuring, registering,and pushing your code changes for your app,,and its extensions individually.,Let's take a look at what we’re shipping to improve this experience for you.,We’ve really streamlined the whole process.,Start by initializing the app,,even if you don't already have the Shopify CLI installed,this command will also download and install,the necessary dependencies to build your app.,Next, you’d want to scaffold and add in your app extensions,From here, maybe you'd want to preview the app.,It’s possible to use a single command,to be able to preview your entire app and its extensions at once.,Authentication has been baked into commands like this one,,so you won't be prompted to log in to Shopify,until you’re ready to test your app.,It's simple: you can build and deploy your app,and its extensions to Shopify in a single command as well.,And that's it!,Using the Shopify CLI 3.0,,you can now build and deploy your extensions and your app easily,And remember when you had to decide a new distribution mode right away?,With our revamped Partner Dashboard,,you won’t have to make that decision until after the app is finished.,But wait there’s more!,Not only have we simplified the CLI getting started process,,we’re also releasing some new ‘Hello World’ starter templates,in PHP, Ruby and Node.,So diving right into the code that makes your app, your app is easy.,We’re also releasing a sample app that includes a real-world use case.,You can either download this app in its entirety,,or even follow one of our tutorials to build it yourself.,Now finally let’s dig into the code to see what’s included.,Each extension generated by the CLI will be in the extensions/ folder.,Using th

After seeing the eighth section, I believe you have a general understanding of Boilerplate theme shopify

Continue the next ninth section about Boilerplate theme shopify

How to Build a Shopify App with Node and React

How to Build a Shopify App with Node and React

大家好 我是Jennifer Gray,我是Shopify的UX开发员,今天 我们要学习如何构建Shopify应用,利用Node和React技术 并使用Shopify应用CLI,它可以快速为Node.js应用构建支架,并且它可以在整个Shopify应用的开发过程中,协助我们将经常碰到的,常见开发任务实现自动化,在视频结束时 我们将建好一个简单的Shopify应用,可以在您的本地环境中运行,您应该掌握让自己的应用顺利上线和运行的知识,这样您就能投入更多时间 去研究您的应用,将能解决哪些实际问题,而不是花费大量时间,了解在构建Shopify应用时可能遇到,哪些必须和常见的开发任务,那我们开始吧 看看我们将要构建的功能,我们要构建带有一个标题和按钮的嵌入式应用,点击这个按钮时,将打开资源选择器 让我们可以,从开发商店中选择多个产品,我们在选择这些产品时,会在控制台日志中记录包含单个产品ID的数组,以便您使用此信息来实现其他功能,比如向Shopify GraphQL管理后台API编写一个查询,我们来介绍一下这个Shopify应用CLI,谈谈它是什么,我们需要满足什么要求 以及您要怎么样安装它,Shopify应用CLI是一个命令行界面工具,是为Shopify应用开发者构建的,它能让我们使用Ruby on Rails或Node.js,快速构建出一个Shopify应用,这个教程将会使用的是Node.js,它将直接集成您的Shopify合作伙伴账户,并在将应用安装到开发商店时 为您处理验证任务,如我之前所述 CLI还能让常见的开发任务实现自动化,例如在开发商店中填充示例数据,例如产品或客户,CLI还能轻松生成应用中的样板文件代码,例如调用账单API或Webhooks,整体来说 这是个很实用的工具,可以加速和简化您的应用开发过程,因为它能将许多费时费力的开发任务自动化,现在我们来看看跟随本视频教程进行学习,需要满足哪些要求,首先 您需要一个文本编辑器 我用的是VS Code,用什么文本编辑器都可以,只要顺手就行 比如Sublime或Atom,这两个也都挺好用的,您还需要一个命令行工具,我用的是iTerm 这个也一样,您用什么终端工具都可以 只要顺手就行,具体说到CLI 在安装之前,您要确保满足相关的要求,您可以在Shopify应用CLI文档中查看要求列表,网址是shopify.github.io/shopify-app-cli,这个链接会被添加到下方的描述框中 方便您找到,您需要安装最新版本的Ruby,还需要一个Shopify合作伙伴账户,我登录到我的Shopify合作伙伴账户,已经准备好了,您还需要一个开发商店,Shopify开发商店是一个免费的Shopify账户,您想创建多少个都可以,但是本教程的学习只需用一个开发商店就足够了,这是我的开发商店 “Jennifer的开发商店”,如果您还没有,您可以用这个“添加商店”按钮创建一个,我还在另一个标签页里登录了我的开发商店,这是商店管理后台 这样我也可以访问前端,如果您使用Windows系统 在安装CLI之前,您还需要多安装几个工具,您需要安装适用于Windows的Linux子系统,以及Windows版Ubuntu,在满足了所有要求之后,我们来看看怎样安装CLI,可以用几个不同的包管理器来安装CLI,如果您运行的是Mac OS 并且使用Homebrew包管理器,您需要依次运行两个命令,运行完毕之后 CLI就安装好了,如果您使用的是基于Linux的系统,安装说明会略有不同,具体要看您使用的是哪种包管理器,如果您运行的是Apt包管理器,您需要安装带有明确版本号的可下载.deb文件,您可以在文档中的发布页面链接获取这个文件,完成之后 您就可以运行所提供的命令,同样地 如果您使用的是yum包管理器,您需要安装带有明确版本号的可下载.rpm文件,您也可以在文档中的发布页面链接获取这个文件,然后运行所提供的命令,最后 您可以将Shopify应用CLI 作为Ruby gem来进行安装,这次也是使用所提供的命令 CLI安装完成之后,您要检查有没有…,您要检查安装是否正确,这样您就可以运行Shopify version命令,我们继续下一步 现在就来操作,在命令行中输入“Shopify version”,它显示我用的是版本1.0 这是最新版本 所以可以继续下一步,这一步很重要,尤其是如果您在观看视频前就已经安装了CLI,因为您可能在使用旧版的CLI,在这种情况下 这里会显示“找不到命令”的错误,这就表示您使用的是旧版的CLI,您需要前往“从旧版进行迁移”页面,就在Shopify文档里,然后按安装步骤进行一次性的迁移,因为从版本0.9开始,Shopify应用CLI将以软件包的形式进行安装和管理,不再采用Git库的形式,所以 如果您使用的是这个旧版本,您需要遵照这些步骤 确保您可以继续使用CLI,我们马上准备好开始探索CLI了 在此之前,我想提一下之前没提及的最后两个要求,但是要继续学习本教程的其余部分 这两个要求也是必需的,第一个是Node.js,因为我们要构建Node应用,所以您需要安装Node.js,最后一个 您需要用到ngrok账号,免费账户或付费账号都行,Shopify应用CLI要用ngrok来创建安全隧道,从公共网络连接到您的本地开发应用,当您满足全部要求 并且安装了最新的CLI之后,我们就可以来看看部分核心的命令了,“Shopify Help”命令列出了可用的命令,并描述了命令的作用 我们来在终端工具里尝试一下,我尝试输入“Shopify Help” 它会列出四个命令,“connect”可以连接到已有的项目 “create”可以创建新项目,您可以选择Node或Rails,“logout”就是退出目前验证的合作伙伴组织,还有“version” 我们已经用过了 可以输出版本号,我们想创建一个新的Node项目,所以我输入“shopify create node”,现在提示我们输入应用名称,您想起什么名字都行,我就起个有创意的名字 比如“我的测试应用”,现在问我们构建的应用属于什么类型 公共应用还是自定义应用,公共应用是为广大商家用户构建的,通过Shopify应用商店进行销售,并且需要经过审核后,才能展示在应用页面中,自定义应用是为一位商家构建的,不能通过Shopify应用商店进行销售,也不需要经过审核,在本教程中 我们来构建公共应用,现在 我们要把应用安装到开发商店中,CLI列出了所有的开发商店,都是与我的合作伙伴账户相关联的,我之前展示过了我的合作伙伴账户,这里列出了我的一个开发商店,不过 我其实有很多已隐藏的开发商店,这些只是我以前用过的旧商店,我把它们都隐藏了 因为已经用不上了,我希望CLI不要把这些商店列出来,因为有些商店的名称比较可笑,但还是列出来 就这样吧,我们选择没有隐藏的商店 “Jennifer的开发商店”,现在正在把它克隆到我的测试应用中,并使用npm来安装从属文件,需时大概一两分钟,好了 从属文件安装完毕,已在合作伙伴控制面板中 创建了我的测试应用,我们可以用这个链接来查看应用,这是我们的合作伙伴控制面板,这里是我们新创建的应用 非常好,现在 我们回到终

Congratulation! You bave finally finished reading Boilerplate theme shopify and believe you bave enougb understending Boilerplate theme shopify

Come on and read the rest of the article!