Using Simple Cart and trying to send the cart items in a regular mail
Hi All, Im using Simple Cart Js to build a product caalogue and checkout, and what i want to achieve is when the user(s) finish adding items to his basket, on checkout process they fill a form and send it directly by mail.
And retrieve all the basket items + the form fields in the mail.
As the classes items reference directly in the js, how can I get the html data and send by mail.
You should be able to use the umbraco.library:SendMail() extension to achieve this.
I don't know how you have constructed this but you need to make sure the method is triggered when the form has been submitted.
I usually do something like this to do it...
<xsl:choose> <xsl:when test="umbraco.library:Request('sent')"> <!--- Request the stuff from the form that needs to go into the e-mail here --> <xsl:value-of select="umbraco.library:SendMail(parametershere)" /> </xsl:when> <xsl:otherwise> <form method="post"> <input type="hidden" name="sent" value="1" /> <!-- Rest of the form goes here --> </form> </xsl:otherwise> </xsl:choose>
Is this what you're after? And does it make sense to you?
Have already implement the cart and created a checkout page, where I have a form and a resume of my basket items...I am able to sent the form by mail but not the basket items..think the problem is with the js itself..if you have any clue on how to retrieve the send this items by mail by modifying the js file...
Using Simple Cart and trying to send the cart items in a regular mail
Hi All, Im using Simple Cart Js to build a product caalogue and checkout, and what i want to achieve is when the user(s) finish adding items to his basket, on checkout process they fill a form and send it directly by mail.
And retrieve all the basket items + the form fields in the mail.
As the classes items reference directly in the js, how can I get the html data and send by mail.
Anyone can help?
Quite urgent
Thks
//Sam
Hi Sam
You should be able to use the umbraco.library:SendMail() extension to achieve this.
I don't know how you have constructed this but you need to make sure the method is triggered when the form has been submitted.
I usually do something like this to do it...
<xsl:choose>
<xsl:when test="umbraco.library:Request('sent')">
<!--- Request the stuff from the form that needs to go into the e-mail here -->
<xsl:value-of select="umbraco.library:SendMail(parametershere)" />
</xsl:when>
<xsl:otherwise>
<form method="post">
<input type="hidden" name="sent" value="1" />
<!-- Rest of the form goes here -->
</form>
</xsl:otherwise>
</xsl:choose>
Is this what you're after? And does it make sense to you?
/Jan
Hi Jan,
Its all about the problem they are discussing in the link below
http://our.umbraco.org/forum/developers/extending-umbraco/9309-Simple-cart-with-email-checkout
Have already implement the cart and created a checkout page, where I have a form and a resume of my basket items...I am able to sent the form by mail but not the basket items..think the problem is with the js itself..if you have any clue on how to retrieve the send this items by mail by modifying the js file...
Thks
Sam
I was wondering is there a way to get html content of body tag of a page and send by mail using XSLT....maybe in the umbraco.library codes..??
Hi Sam
How are the basket items stored? In a cookie collection?
/Jan
Hi Jan,
Sorry for late response...yes the items are stores in cookies...is there anyway to retrieve those and send by mail??
Sam
is working on a reply...