Hi,
Another approach could be to use repeater instead of datalist, or do you need to use Product datalist web part for showing the products? If it is possible for you to use repeater, you can put to the transformation following code, which will render the attachments of the product document:
<%@ Register Src="~/CMSModules/Content/Controls/Attachments/DocumentAttachments/DocumentAttachments.ascx" TagName="DocumentAttachments" TagPrefix="cms" %>
<cms:DocumentAttachments ID="documentAttachments" runat="server" TransformationName=" cms.root.attachmentLightboxDetail " Path='<%# Eval("NodeAliasPath") %>' />
Best Regards,
Roman Konicek