Skip to main content
How does JSON logic work?

From this article you'll learn how JSON logic works and what it can be used for.

M
Written by Martyna Woźniszczuk
Updated over 2 years ago

JSON logic allows displaying a frame with a selected list of products to be displayed. Example use: a box under a blog article containing only the products mentioned in that article. How to configure a JSON frame?

1. You indicate the place (called ZONE-ID) where you want to display the frame, and we take care of the entire configuration process.

2. After we finish the configuration process, about which we will inform you, log in to the customer's panel.

3. Go to the Recommendations section, then click Add widget.

4. Choose a placement for the recommendation frame (step one), and then, in the second step, select the tile with the name Json Data.

5. Click Show advanced settings below. In the Json Data Logic field, the structure that we have prepared for you is implemented.

An example structure looks like this:

{ 
"default": {
"title": "Title for default",
"content": [
"20221077",
"20221081",
"20221096"
]
},
"testA": {
"title":"Title for testA",
"content":[
"20220406",
"20220412",
"20220413"
]
},
"testB": {
"title":"Title for testB",
"content":[
"20220708",
"20220711",
"20220762"
]
},
"test3": {
"title":"Title for test3",
"content":[
"20220849",
"20220890",
"20220984"
]
}
}

Provide the content fields with product IDs.

Remember! The IDs of the products entered in the content fields must match the product catalogue provided by you. To check the ID of the products you want to display in the JSON frame, go to Settings (the main menu bar on the left) -> Product feed, then select the one you are interested in in the catalogue list and click the gear symbol. Select Show Folder to check its contents.

On the product feed information page, you will find the last update data, the number of products and a list of them. The list of products shows their thumbnail, title, price, as well as the ID.

Remember that the products you choose must be available if all indicated products are unavailable, the frame will not be displayed at all!

6. After pasting the appropriate product IDs into the content fields, complete the frame creation process in accordance with further steps. You can refer to the Adding recommendation widgets article for more information on creating frames.

Did this answer your question?