skip to Main Content

How to create and use Shopify theme extension for Shopify Apps with PHP?

I have created a Shopify app and I want to use a Theme extension instead of a script tag. I create theme extensions using Shopify CLI. now I want to connect it with stores.

command

This is the screenshot of the folder that I created.

2

Answers


  1.                                                                                                                                                      Put a line of code in your extension block, push to your development store. Now enable previews in your App by clicking the link the CLI gives you, and then visit the store, theme, customizer. Now you can test if your extension loaded by enabling it in the customizer and seeing the code from your block, in the theme, where you put it. 
    

    It is pretty easy to do. Shopify has ironed out most of the kinks, so I find it takes very few keystrokes to go from typing in my code editor, using the CLI and seeing the result live in a theme.

    I suggest you play and follow the Shopify recipes to get to this point.

    Login or Signup to reply.
  2. If you navigate to your app settings from the Shopify partner account, you will find the settings for extensions. There you will see to Enable/Disable theme app extension.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search