Page 1 of 1

Export product images URLs

Posted: Thu Jul 13, 2017 7:25 pm
by bg17aw
Hello, any idea how to figure out the correct link to images?
I am exporting products to a .csv file, but having issues exporting images.
I am using the image field in the product table, but there is a problem:

- in the product table, the image name is something like "catalog/products/1113/whatever.jpg"
- I am manually adding the prefix "http://example.com/image/cache/" so image URL becomes "http://example.com/image/cache/catalog/ ... atever.jpg"
- however, this is not working, as actual image links are changed to catalog/products/1113/whatever-600x451.jpg
- who/what is adding the "-600x451" part and how can I manage to export correctly?

PS: I know there are multiple images per product in the images table, but for now, I would like to solve the first issue.

Re: Export product images URLs

Posted: Thu Jul 13, 2017 10:59 pm
by uksitebuilder
Original image URL is:

http://www.yourstore.com/image/ -- Then the image field value from the product table in your DB

Re: Export product images URLs

Posted: Fri Jul 14, 2017 9:10 pm
by bg17aw
uksitebuilder wrote:
Thu Jul 13, 2017 10:59 pm
Original image URL is:
http://www.yourstore.com/image/ -- Then the image field value from the product table in your DB
Thanks a lot for that.
Could you by any chance suggest a solution to export the additional images as well?
The ones from the images table, I need a query that would concatenate them in one long string, comma separated

Re: Export product images URLs

Posted: Fri Jul 14, 2017 9:54 pm
by uksitebuilder
Is this a script you have created yourself ?

If so, simply joining the product_image table to the product table on product_id will give you all the images for a specific product. The URL for the additional images is the same format as the main image. Shouldn't be a problem then concatenating the fields together using a bit of logic/testing.