View Single Post
  #4  
Old 04-04-2017, 12:30 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default 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.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote