API Integration (JSON Response)
In this guide...
If you are first starting your setup of Pages, read this guide first. This guide will go in-depth on API integration.
Requirements & Prerequisites
This is the most flexible way to integrate, but it also requires some more work. You send API calls to Hello Retail and get product data and information about available filters returned as JSON.
You have to implement the user interface of the product page, including the user interface for applying filters and sorting.
Read more about the Pages API in our developer documentation.
Example
Below is a very rudimentary example of how this could be done in PHP for a WooCommerce shop. It is split into two.
1. The first part reads parameters from the URL and sends the API call:
2. The second part builds a very rudimentary UI:
The above code will build a category page that looks something like the screenshot below. It illustrates the functionality, but more work is needed to make the page look good and support all the expected features of a modern product page.