Re: How to generate a product catalog to embed on any (non-X-Cart) page?
I thought of rendering embedded catalog pages exactly the same way that they appear on the X-Cart-based site.
But if JSON information about products works for you (and you render the catalog with your own templates), REST API may be a solution.
Although REST API doesn't provide the full access to the source code, it is a mediator between third-party applications and the X-Cart database. With the API you can query database records. Every API call matches to a method in the Model\Repo\* class that handles that database table. So, if you "search" for products, it looks for "search" method in the repository class for Product model and runs it with the parameters you pass in your API call - this way you can filter products returned by the query.
|