Here's an example of doing it in product.simpleproduct.xml.config. Add the following near the top with the rest of the queries
Code:
<query name="Manufacturers" rowElementName="Manufacturer" runif="showproduct">
<sql>
<![CDATA[
select ManufacturerID from dbo.ProductManufacturer with(NOLOCK) where ProductID=@ProductID
]]>
</sql>
<queryparam paramname="@ProductID" paramtype="request" requestparamname="ProductID" sqlDataType="int" defvalue="0" validationpattern="^\d{1,10}$" />
</query>
Then you can get the manufacturer ID using
Code:
<xsl:value-of select="/root/Manufacturers/Manufacturer/ManufacturerID"/>
or padd it directly into the extension function
Code:
<xsl:value-of select="aspdnsf:LookupImage('manufacturer',/root/Manufacturers/Manufacturer/ManufacturerID,'','', 'icon', '')" disable-output-escaping="yes" />
If you're using a different package let me know...depending on the package the manufacturer id may already be returned in the existing queries or it may be easier to modify one of the existing queries to just return it.