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.
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? :-)
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?
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.
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?...
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
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
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
Make sense, will give it a try and let you know.
/Fuji
is working on a reply...