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 3 of 3

Thread: how to get Customer name in welcome email

  1. #1
    eassha is offline Junior Member
    Join Date
    Oct 2009
    Posts
    3

    Red face how to get Customer name in welcome email

    hi


    i am using ASDNS V8.0.1

    how do i get customer name in welcome notification email
    i edit notification.newmember.xml config file to get customer name but it didn't work

    even in my lost password notification email customer name does not display

    Pleas give me some Idea how to fix that problem

    Thanks

  2. #2
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Sure, first, you'll have to add this query section on notification.newmember.xml config:
    Code:
      <query name="Customer" rowElementName="Cust">
        <sql>
          <![CDATA[ 
                  SELECT FirstName,LastName from dbo.Customer where CustomerID = @CustID 
                ]]>
        </sql>
        <queryparam paramname="@CustID" paramtype="runtime" requestparamname="CustID" sqlDataType="int" defvalue="0"  validationpattern="^\d{1,9}$" />
      </query>
    Then modify this line:
    Code:
    Thank you for registering with *<xsl:value-of select="aspdnsf:AppConfig('StoreName')" disable-output-escaping="yes" />.  **To access your account and view order history click <a href="{/root/System/StoreUrl}/account.aspx">here</a>
    To:
    Code:
    Thank you <xsl:value-of select="/root/Customer/Cust/FirstName" disable-output-escaping="yes" />*<xsl:value-of select="/root/Customer/Cust/LastName" disable-output-escaping="yes" />for registering with *<xsl:value-of select="aspdnsf:AppConfig('StoreName')" disable-output-escaping="yes" />.  **To access your account and view order history click <a href="{/root/System/StoreUrl}/account.aspx">here</a>
    Then on the createaccount.aspx.cs, modify the following lines:
    Code:
    AppLogic.SendMail(AppLogic.GetString("createaccount.aspx.79", ThisCustomer.SkinID, ThisCustomer.LocaleSetting), AppLogic.RunXmlPackage(AppLogic.AppConfig("XmlPackage.WelcomeEmail"), null, ThisCustomer, this.SkinID, "", "fullname=" + FirstName.Text.Trim() + " " + LastName.Text.Trim(), false, false, this.EntityHelpers), true, AppLogic.AppConfig("MailMe_FromAddress"), AppLogic.AppConfig("MailMe_FromName"), EMailField, FirstName.Text.Trim() + " " + LastName.Text.Trim(), "", AppLogic.MailServer());
    To:
    Code:
    AppLogic.SendMail(AppLogic.GetString("createaccount.aspx.79", ThisCustomer.SkinID, ThisCustomer.LocaleSetting), AppLogic.RunXmlPackage(AppLogic.AppConfig("XmlPackage.WelcomeEmail"), null, ThisCustomer, this.SkinID, "", "CustID=" + ThisCustomer.CustomerID, false, false, this.EntityHelpers), true, AppLogic.AppConfig("MailMe_FromAddress"), AppLogic.AppConfig("MailMe_FromName"), EMailField, FirstName.Text.Trim() + " " + LastName.Text.Trim(), "", AppLogic.MailServer());
    From:
    Code:
    AppLogic.SendMail(AppLogic.GetString("createaccount.aspx.79", ThisCustomer.SkinID, ThisCustomer.LocaleSetting), AppLogic.RunXmlPackage(AppLogic.AppConfig("XmlPackage.WelcomeEmail"), null, ThisCustomer, this.SkinID, "", "", false, false, this.EntityHelpers), true, AppLogic.AppConfig("MailMe_FromAddress"), AppLogic.AppConfig("MailMe_FromName"), EMailField, FirstName.Text.Trim() + " " + LastName.Text.Trim(), "", AppLogic.MailServer());
    To:
    Code:
    AppLogic.SendMail(AppLogic.GetString("createaccount.aspx.79", ThisCustomer.SkinID, ThisCustomer.LocaleSetting), AppLogic.RunXmlPackage(AppLogic.AppConfig("XmlPackage.WelcomeEmail"), null, ThisCustomer, this.SkinID, "", "CustID=" + ThisCustomer.CustomerID, false, false, this.EntityHelpers), true, AppLogic.AppConfig("MailMe_FromAddress"), AppLogic.AppConfig("MailMe_FromName"), EMailField, FirstName.Text.Trim() + " " + LastName.Text.Trim(), "", AppLogic.MailServer());
    See if this works for you...
    Last edited by Jao; 10-16-2009 at 07:14 AM.

  3. #3
    eassha is offline Junior Member
    Join Date
    Oct 2009
    Posts
    3

    Thumbs up Thanks It works

    Thanks It works

    Thanks again