Jump to content

Export feed with multiple images


Recommended Posts

Hello! 

I know how to export feed using the sql manager in the back-end. But I only get one image for every product.

My shop has many products with more than one picture.

Does anyone know how to export feed with all the images for every product?

 

Hi andreiven,

 

are you looking for a module, or for sql-only solution? What is it you are trying to achieve?

 

If all you need is an sql, then here's simple snippet that will get you started - on each line you'll get product id together with all its images (ids)

 

select 
  p.id_product AS id, 
  (select group_concat(id_image) from ps_image i where i.id_product = p.id_product) AS image_ids
from ps_product p;
Edited by DataKick (see edit history)
Link to comment
Share on other sites

Yes, I'd like to export a csv file using sql query inside prestashop. Thank you for the snippet. I am new to sql and I don't really know what to modify in order to get some data. For now I get: This SQL query has no result.

I changed ps_product to match my store source. Should I add a language id, or it is not necessarily for this kind of query?

Thank you for your prompt feedback!

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...