Overview
Basics
Relatable is a way for you to connect different resources throughout a Shopify store. The data that links any two items together are stored on our servers and data is delivered to the shop via an AJAX request as JSON. The result is a fast and effective way to build out custom associations between products, collections, pages, and articles.
Installation
To get the app in your Shopify admin, install the app.
Click on the "Install" tab within the app, and paste the provided code into the head of your theme. This will include our JavaScript API to your store.
Place in Online Store > Themes > Edit HTML/CSS > Layout > theme.liquid. Paste somewhere before the closing head tag (</head>)
Associations
Associations determine what sort of resources you can relate. Based on the relationship you setup, your resources will have the ability to associate with one another. You can create associations within the app's sidebar menu. Once you've created an association, you can relate these resources together by clicking "Edit Relatable" from within the Shopify admin app dropdown menu. There are two types of associations:
-
One to Many
Best used when you want to maintain a structured order that cascades from parents to children. For example, you could setup a multi-level collection tree that provides a nested collection list.Example:- collection.collections
- collection.collection
-
Many to Many
Useful when you have two resources the have many of each other. An example of this is have multiple products related to multiple other articles (and vice-versa).Example:- product.articles
- article.products