Developer forum

Forum » Integration » Get primary image URL when exporting a product

Get primary image URL when exporting a product

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I have an EcomProducts to CSV export job. One of the columns I like to populate is a column with a link to the product's primary image in the format https://domain.com/images/whatever/here.jpg

How can I do this? The product has small, medium and large image columns but those are all deprecated. I am already using a TableScript and have access to the product so I looked into the Details services and Image patterns, but I am not sure what to do there. Some stuff I think I might need appears to be internal, like ImagePatternManager.GetProductImages.

Any ideas?

Imar


Replies

 
Michael Knudsen
Reply

Hello Imar,

- I guess you are using the Dataintegration, but using a feed with some XML/XSLT (output method="text") could easily solve your issue getting the full path to the primary image.

Br. Michael Knudsen

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Thanks Michael. I am indeed using data integration. I need to produce a file that a third party can download. Also, I need to combine a bunch of product attributes into a single column in a very specific format, so I am using a table script for that.

Anyone else have any ideas? For now, I am getting the product's Details collection and find all details that look like image, then select the primary one if it exists or select the first one otherwise. Is that the right approach?

Imar  

 

You must be logged in to post in the forum