Th Custom Code tab is usefule when working with custom made add-on apps. These apps need to decleare and may require custom settings or possibly custom Shopify app permissions. You can add all these settings here.

Managed App Custom Code Tab


Glass Manifest - This field let you define one or more URLs to refer to glass-manifest. Glass manifest is a JS file that define the resources used by Add-On apps. Content Glass app has in internal mechanism that detect add-on manifests and load the add-ons so that add-on logic can be hosed by CG API. We make distinction between two types of add-ons although technically they are working using the same concept:

1. Ready-made Add-Ons. These are add-on apps offer as an external app (for example Shopify App). When you install this type of ad-on you actually install the declaration of the add-on, but this take place internally by adding an embedded JS code. The ready made add-ons are those that you see below on the main page of managed-app, and the idea is that hoses add-ons can be used as added-value apps. In practice these add-ons run on top of CG API. 

2. Custom made add-on apps. These are add-ons that we or 3'rd party developer develop specifically for some website. Usually custom-made add-on will be adjusted to the content offer by specific website. For example in a sotre that sell postcards with poems a custom-made add-on can be used for creating poems editor that can be used by internal community of the website. In contrary to ready-made add-onds that receive management portal, the custom made add-ons are defined by adding settings - on this tab of managed-app. 

Custom Settings - your custom made add-on app may require some fix settings. You can provide these settings here. For example if an add-on need to know the product-id of some very specific product in your web store you can set this number here. It is up to you to shape the settings as long as it has valid JSON format. The data inserted here, can be used by developer to apply settings to custom add-ons. The practice of doing this is out of the scope for this book.

Custom Permissions -  Add-on app may require access to some resources in the Shopify API (We are now using managed-app for Shopify so we refer in this example to Shopify apps). For example accessing  to write-product API. In this field you specify the permissions require by add-on in relation to Shopify API.