AH HA Success finally. After many frustrating hours (days) it works. Below I will describe my trials and tribulations of making a Shopping Cart system with emailed orders work Using Power Climb's Ultra Dev Shopping Cart Addon. From the number of other questions I've seen about this product I figure that many other people are having this problem too.
I first built a shopping page and a cart page with the PowerClimb addon (
). This is fairly straight forward and they have good help files. My problem came when I wanted people to be able to email me their orders from the cart page.
I had my order function working completly with a simple form that's action passed the collected data (name etc.) & the contents of the cart (dynamically created hidden form fields)to a premade CGI formmail script.
Here is the script to make a hidden field.
<INPUT TYPE="hidden" NAME="ItemNum_<% =(UCCart1__i) %>" VALUE="<%=(UCCart1.GetColumnValue("ProductID",UCCart1__i))%>">
But the problem was on larger orders (could be 2000 + characters) they were getting cut off in the email I would receive. Not sure if part of the form or the address line of the browser causes this, hopefully someone can enlighten me.
So I was finally able to contact my hosting company. They told me they used CDOSYS for their email server (first step towards success). They supplied me with a simple sample form that you can email a form using CDOSYS. The sample form has two parts (two asp pages). The first would be my cart page (cart.asp) I made. The second was the actual page that does the emailing(email.asp). I just made this my thank for your order page. On the email.asp page I also included a script block that is available from PowerClimb's website ( I edited mine as seen below). It pulls the the contents from the cart and saves them to one variable called CartData. It works with functions already included in the Ultra Dev Cart you download. I added in the html code like <br> so that it would display nicely in an email.
<% Dim CartData
UC_rowDelim = Chr(13) & Chr(10) & Chr(13) & Chr(10)
UC_colDelim = Chr(13) & Chr(10)
CartData = ""
for jRow=0 to UCCart1.GetItemCount() -1
if (jRow <> 0) Then CartData = CartData & UC_rowDelim
CartData = CartData & "ID Num: " & _
UCCart1.GetColumnValue("ProductID",jRow) & UC_colDelim & "<br>"
CartData = CartData & "Plant name: " & _
UCCart1.GetColumnValue("Name",jRow) & UC_colDelim & "<br>"
CartData = CartData & "Quantity: " & _
UCCart1.GetColumnValue("Quantity",jRow) & UC_colDelim & "<br>"
CartData = CartData & "Price: $" & _
UCCart1.GetColumnValue("Price",jRow) & UC_colDelim & "<br>"
CartData = CartData & "Total: $" & _
UCCart1.GetColumnValue("Total",jRow) & UC_colDelim & "<p>"
CartData = CartData & UC_rowDelim
Next
%>
I placed the CartData script block just before the CDOSYS code. which part of is seen below.
<%
'Gets values from form on previous cart page
Ffname=request("fname"

Flname=request("lname"

Faddress=request("addressl"

Fcity=request("city"

bodyofemail=CartData 'put cart contents into body of email
Set objConfiguration = CreateObject("CDO.Configuration"

Set objFields = objConfiguration.Fields
With objFields
.Item(cdoSendUsingMethod) = "Talk to your Hosting Company"
.Item(cdoSMTPServerPort) = "Talk to your Hosting Company"
.Item(cdoSMTPServer) = "Talk to your Hosting Company"
.Update
End With
Set objMessage = CreateObject("CDO.Message"

With objMessage
Set .Configuration = objConfiguration
.From = "whoever"
.To = "your email address"
.Bcc = "anyone"
.Subject = "Test email"
Below I combine all the person's info with the contents of their cart, I can add standard html to format the finished email.
.HTMLBody = "<html><body>" & Ffname &" " & Flname &" <br> " & Faddress &" " & Fcity &" <br> The Following is their order: <br> "& bodyofemail & "</body></html>"
.AutoGenerateTextBody = False
.TextBody = ""
.Send
End With
set objMessage =nothing
%>
P.S. there is more to the CDOSYS email script but it is best to contact your web hosting company for a sample script or there are lots of samples on Tektips for using CDONTS (very similar).
When this page is loaded the cart contents are automatically pulled along with their personal info and email to me or whoever. And all the user sees is a pretty thank you page. And because the cart values are created and sent on the same page there is no size limitation.
I hope this helps somebody. I may have yacked on here to long but if I could have found a message like this I would have saved many hours if not days. And forgive me if I have misqouted any technical things wrong, I am still very much an amatuer that is flying high on success.
TL