Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fuji Kusaka 2203 posts 4220 karma points
    May 04, 2011 @ 11:37
    Fuji Kusaka
    0

    Email Notification

    Can someone explain to me what is the best way of sending an email to a user when he clicks on a button.

    Lets say i want i have a list of products on my website and add 3 items to my basket, on order i click on a button which will send an email to the user with all the items.

    What i the best approach for this?...

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 04, 2011 @ 11:53
    Jan Skovgaard
    0

    Hi Fuji

    I'm not sure what you're asking here...

    is it the UX side, or the programming you're in doubt about?

    Usually it's a good idea to send the e-mail, once the order has been submitted and the transaction has been succesfull so once the user sees the receipt on their screen they receive it in their inbox as well.

    Are you builiding something custom or are you using something like uCommerce/Teacommerce or SuperSimpleWebshop?

    And what tool are you considering to use? XSLT, C# or something else? :-)

    /Jan

  • Fuji Kusaka 2203 posts 4220 karma points
    May 04, 2011 @ 12:04
    Fuji Kusaka
    0

    Jan,

    We are not using uCommerce/TeaCommerce or any package for this ecommerce website but only javascript under umbraco version 4.7.

    To be more precise its a fake shopping basket, the user will only choose a list of products and add to his basket, and on order both user and admin will receive an email notification.

    Am not really sure what to use for this??....since am using an XSLT for the items listing will it be best to use XSLT for the Submit as well?

     

    /Fuji

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 04, 2011 @ 12:31
    Jan Skovgaard
    0

    Hi Fuji

    Ok, so I guess you have a form in your current XSLT file?

    What I usually do in this kind of situation is to make a choose...

    <xsl:choose>
      <xsl:when test="umbraco.library:Request('sent')">
      <!-- Display a thank you message here and send the e-mail using umbraco.library:SendMail() extension-->
      </xsl:when>
      <xsl:otherwise>
       <form method="post">
         <input type="hidden" name="sent" value="sent" />
         <!-- rest of the form goes here -->
       </form>
      </xsl:otherwise>
    </xsl:choose>

    In here the trick is that when the hidden input value has not been set the form is shown and when you hit submit the thank you message is shown and the e-mail  can be sent.

    I hope this makes sense and is usefull for you.

    /Jan

  • Fuji Kusaka 2203 posts 4220 karma points
    May 04, 2011 @ 12:36
    Fuji Kusaka
    0

    Make sense, will give it a try and let you know.

     

    /Fuji

Please Sign in or register to post replies

Write your reply to:

Draft