Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: Display Distributor Name

  1. #1
    medsupply is offline Senior Member
    Join Date
    Jul 2011
    Posts
    99

    Default Display Distributor Name

    How can I display the corresponding distributor name on the notification.distributor.xml.config XML package?

    Thx!

  2. #2
    GoVedia is offline Member
    Join Date
    Oct 2012
    Location
    Orange, CA
    Posts
    98

    Default Distributor Name

    I have not tested it, but the following steps should allow you to display the distributor name in your notification.distributor.xml.config XML package.

    1) Insert this query into your XML Package (which is responsible for retrieving the distributor name from the database, based on the distributor id being passed through as a runtime parameter):

    Code:
     <query name="Distributor" rowElementName="Data">
        <sql>
          <![CDATA[
                SELECT D.Name FROM Distributor D WITH(NOLOCK) WHERE d.DistributorID = @distributorid
                ]]>
        </sql>    
        <queryparam paramname="@distributorid" paramtype="runtime" requestparamname="DistributorID" defvalue="0" sqlDataType="int" validationpattern="^\d{1,9}$"/>
      </query>
    2) Place the following code where you would like to have the distributor name appear:
    Code:
    <xsl:value-of select="aspdnsf:GetMLValue(/root/Distributor/Data/Name)" />
    If you plan on placing the name multiple times throughout the xml package, you could consider using a param:
    Code:
    <xsl:param name="DistributorName" select="aspdnsf:GetMLValue(/root/Distributor/Data/Name)" />
    Code:
    <xsl:value-of select="$DistributorName" />
    Let me know if that works out for you.

    Robert
    Robert Kanaan
    AspDotNetStorefront Development Partner
    robert@GoVedia.com
    408-758-8845

    GoVedia
    http://GoVedia.com
    Approved AspDotNetStorefront Development Partner
    AspDotNetStorefront Recommended Reseller

  3. #3
    medsupply is offline Senior Member
    Join Date
    Jul 2011
    Posts
    99

    Default

    That worked like a charm, thanks a lot!

  4. #4
    GoVedia is offline Member
    Join Date
    Oct 2012
    Location
    Orange, CA
    Posts
    98

    Default

    Great! Your welcome!
    Robert Kanaan
    AspDotNetStorefront Development Partner
    robert@GoVedia.com
    408-758-8845

    GoVedia
    http://GoVedia.com
    Approved AspDotNetStorefront Development Partner
    AspDotNetStorefront Recommended Reseller