Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

How to generate a product catalog to embed on any (non-X-Cart) page?

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 04-02-2017, 04:44 AM
 
ModDM ModDM is offline
 

Newbie
  
Join Date: Apr 2017
Posts: 2
 

Default How to generate a product catalog to embed on any (non-X-Cart) page?

How to generate a product catalog to embed on any (non-X-Cart) page?

A grid list or any type of list with the products, just as on the catalog pages of X-Cart.

Possibly all-in-one, consisting of parts like:

- thumbnails
- titles
- short descriptions
- prices
- add to cart buttons
__________________
5.3.1.3
Reply With Quote
  #2  
Old 04-02-2017, 11:10 PM
  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?

It depends on where you want to include the data. Will you do it server-side, or do you want to include the section into an HTML page via a JavaScript code?
Anyway, implementing this may be tricky as the server-side solution may conflict with your PHP code, and the JavaScript solution may require complex JavaScript code to get all the X-Cart functions (pagers, add-to-cart, ...) work as intended.
__________________
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
  #3  
Old 04-03-2017, 12:13 AM
 
ModDM ModDM is offline
 

Newbie
  
Join Date: Apr 2017
Posts: 2
 

Default Re: How to generate a product catalog to embed on any (non-X-Cart) page?

You talk about conflicts with PHP, but therefore you have for example json to have data available which can be (that's my idea, because that's where json could be suitable for) easily translated. I read your REST-api could do it. I was just - as an interested user - very interested how this works.

The data as described in my original question will be eventually used in a HTML / PHP page, that's the goal. Anyway, generating such data server side will also be fine, so we can use it in our pages. Any info about this would be more than welcome. Thanks in advance.
__________________
5.3.1.3
Reply With Quote
  #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
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:52 AM.

   

 
X-Cart forums © 2001-2020