Jump to content

How to query Prestashop's DB from an external application?


DeepVoid

Recommended Posts

I'm building a corporate web site, having a Prestashop install as one of its parts, within a subdirectory of the main domain. I would like to show on the home page of the web site one random product from the Prestashop database (just the product image and its name, with its link to the Prestashop's details page). How to do that? Can you give me some hints to query the Prestashop's DB in order to retrieve a random product?

Thank you in advance!!! :-)

Link to comment
Share on other sites

you can query the products

select * from your_eschema.your_prefix_product a , your_eschema.your_prefix_product_lang b
where a.id_product = your_product_id and
a.id_product = b.id_product and
b.id_lang = your_language_id


replace * whith the attributes you want
replace your_schema and your_prefix with appropiate values

hope this helped

regards

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...