close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Shipping Value not showing up on Email Receipt/Success page

Thread began 11/18/2009 9:38 am by eric284736 | Last modified 11/25/2009 12:19 pm by Eric Mittman | 3931 views | 11 replies |

eric284736

Shipping Value not showing up on Email Receipt/Success page

Hi,

I have this setup to capture the info and the client will process the card manually.

The shipping choice is setup as 3 choices based on 3 flat rates and is set as a session (ShipSelection).
This functions correctly and shows the charges on the confirm page. Once that page is submitted the Checkout Success page does NOT show the shipping charges and the Email receipt does NOT show the shipping charges.

Here are the pages.

Correction: THe shipping charges are NOT showing on the Confirm page now. So Shipping is not showing at all.

thx
Eric

Attached Files
neck.zip
Sign in to reply to this post

Eric Mittman

How have you setup the charge rules and the values that trigger it? Also since it was last working on the confirm page what changes have you made to the cart or the values that are used for the charge rules?

Please post back with this info so we can look into this issue further, also if you could post back with a copy of your WA_eCart folder from the site root that might be helpful as well.

Sign in to reply to this post

eric284736

Hi Eric,

I setup a recordset for the shipping and set the session as ShipSelection.

I have attached the cart folder.

Thanks!
Eric

Attached Files
neckcart.zip
Sign in to reply to this post

Eric Mittman

I need to know a little more about how you have setup the rules for this. Please explain how you have it now versus when it was working, if this involves variables that are being set on pages make sure to include those pages as well.

Sign in to reply to this post

eric284736

Hi Eric,

Here are some captures of the 3 rules setup. I have the session set as ShipSelection. I don't think I changed anything from the time it worked until the time it did not work.

The session is set on the checkout page and at first it was showing up correctly on the confirm page. Does the request session need to be in a certain place on the page that calls it, like before the recordsets are called?

thx
Eric

Attached Files
shipping.zip
Sign in to reply to this post

eric284736

Eric,

Here is what is setup:

Checkout page - the shipping selection is pulling from the recordset and setting a session
<%
if ((Request.ServerVariables("Request_Method") = "POST") AND (inStr(Unescape(cStr(Request.ServerVariables("HTTP_REFERER"))),Unescape(Request.ServerVariables("SERVER_NAME")&Request.ServerVariables("SCRIPT_NAME"))) > 0)) then
Session("ShipSelection") = "" & cStr(cStr(Request.Form("ShipChoice"))) & ""
end if
%>


Confirm page - running a recordset to pull the session
<%
Dim rsShipping__MMColParam
rsShipping__MMColParam = "-1"
If (Session("ShipSelection") <> "") Then
rsShipping__MMColParam = Session("ShipSelection")
End If
%>
<%
Dim rsShipping
Dim rsShipping_cmd
Dim rsShipping_numRows

Set rsShipping_cmd = Server.CreateObject ("ADODB.Command")
rsShipping_cmd.ActiveConnection = MM_connJoeMedia_STRING
rsShipping_cmd.CommandText = "SELECT * FROM dbo.ShipTable WHERE ShipFee = ?"
rsShipping_cmd.Prepared = true
rsShipping_cmd.Parameters.Append rsShipping_cmd.CreateParameter("param1", 5, 1, -1, rsShipping__MMColParam) ' adDouble

Set rsShipping = rsShipping_cmd.Execute
rsShipping_numRows = 0
%>

and below the Universal mail stuff...
<%
if (Request.ServerVariables("Request_Method") = "POST") then
Session("eCartCheckoutForm_ShipChoice") = "" & cStr(Request.Form("ShipChoice")) & ""
end if
%>

AND the store summary in Orders:
<%' WA eCart Store Cart Summary in Db
if ((Request.ServerVariables("Request_Method") = "POST") AND (inStr(Unescape(cStr(Request.ServerVariables("HTTP_REFERER"))),Unescape(Request.ServerVariables("SERVER_NAME")&Request.ServerVariables("SCRIPT_NAME"))) > 0)) then
WA_connection = MM_connJoeMedia_STRING
WA_table = "dbo.Orders"
WA_redirectURL = ""
WA_indexField = "OrderReferenceID"
WA_fieldNamesStr = "OrderReferenceID|OrderShipping|OrderTax|OrderTotal|OrderDate|OrderShipAddress1|OrderShipAddress2|OrderShipCity|OrderShipStateID|OrderShipZip|CreditCardType|CreditNumber|ExpireMonth|ExpireYear|CVVcode|Processed"
WA_fieldValuesStr = "" & cStr(Session.SessionID) & "" & "|" & WA_eCDB_ConvertNumber("" & cStr((rsShipping.Fields.Item("ShipFee").Value)) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GetTax(eCart1)) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GrandTotal(eCart1)) & "") & "|" & "" & cStr(Date()) & "" & "|" & "" & cStr(cStr(Request.Form("shipping_street1"))) & "" & "|" & "" & cStr(cStr(Request.Form("shipping_street2"))) & "" & "|" & "" & cStr(cStr(Request.Form("shipping_city"))) & "" & "|" & "" & cStr(cStr(Request.Form("shipping_state_province"))) & "" & "|" & "" & cStr(cStr(Request.Form("shipping_postcode"))) & "" & "|" & "" & cStr(cStr(Request.Form("cc_type"))) & "" & "|" & "" & cStr(cStr(Request.Form("cc_number"))) & "" & "|" & WA_eCDB_ConvertNumber("" & cStr(cStr(Request.Form("exp_month"))) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(cStr(Request.Form("exp_year"))) & "") & "|" & "" & cStr(cStr(Request.Form("cvv"))) & "" & "|" & WA_eCDB_ConvertNumber("0")
WA_columnTypesStr = "',none,''|none,none,NULL|none,none,NULL|none,none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|none,none,NULL|none,none,NULL|',none,''|none,none,NULL"
WA_sessionName = "eCart1_OrderID"
indexFieldIndex = -1
WA_fieldValues = Split(WA_fieldValuesStr,"|")
WA_fieldNames = Split(WA_fieldNamesStr,"|")
WA_columns = Split(WA_columnTypesStr,"|")
set WA_editCmd = Server.CreateObject("ADODB.Command")
updateFieldValue = ""
WA_editCmd.ActiveConnection = WA_connection
if (WA_redirectURL <> "" AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
if (inStr(WA_redirectURL,"?") > 0) then
WA_redirectURL = WA_redirectURL & "&"
else
WA_redirectURL = WA_redirectURL & "?"
end if
WA_redirectURL = WA_redirectURL & Request.QueryString
end if
for i = 0 to Ubound(WA_fieldNames)
if (WA_indexField = WA_fieldNames(i)) then
indexFieldIndex = i
exit for
end if
next
if (indexFieldIndex >= 0) then updateFieldValue = WA_fieldValues(indexFieldIndex)
if (updateFieldValue = "") then updateFieldValue = cStr(Session(WA_sessionName))
updateColType = "none,none,NULL"
if (indexFieldIndex >= 0) then
updateColType = WA_columns(indexFieldIndex)
end if
if (updateFieldValue <> "" AND updateFieldValue <> "undefined") then
valueForWhere = WA_generateInsertParams(Array(WA_indexField), Array(updateColType), Array(updateFieldValue), -1)
sqlstr = "select " & WA_indexField & " from " & WA_table & " where " & WA_indexField & " = " & valueForWhere(2) & " order by " & WA_indexField & " DESC"
set WA_eCartRecordset = Server.CreateObject("ADODB.Recordset")
WA_eCartRecordset.ActiveConnection = WA_connection
WA_eCartRecordset.Source = sqlstr
WA_eCartRecordset.CursorType = 0
WA_eCartRecordset.CursorLocation = 2
WA_eCartRecordset.LockType = 1
WA_eCartRecordset.Open()
if (NOT WA_eCartRecordset.EOF) then
updateFieldValue = cStr(WA_eCartRecordset.Fields.Item(WA_indexField).Value)
else
updateFieldValue = ""
end if
WA_eCartRecordset.Close()
end if
if (updateFieldValue <> "" AND updateFieldValue <> "undefined") then
updateParamsObj = WA_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, indexFieldIndex)
valueForWhere = WA_generateInsertParams(Array(WA_indexField), Array(updateColType), Array(updateFieldValue), -1)
WA_editCmd.CommandText = "update " & WA_table & " SET " & updateParamsObj(3) & " where " & WA_indexField & " = " & valueForWhere(2)
WA_editCmd.Execute()
WA_editCmd.ActiveConnection.Close()
else
updateFieldValue = ""
insertParamsObj = WA_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
WA_editCmd.CommandText = "insert into " & WA_table & " (" & insertParamsObj(1) & ") values (" & insertParamsObj(2) & ")"
WA_editCmd.Execute()
WA_editCmd.ActiveConnection.Close()
end if
if (indexFieldIndex < 0) then
if (updateFieldValue = "") then
obj = WA_generateWhereClause(WA_fieldNames, WA_columns, WA_fieldValues, indexFieldIndex)
sqlstr = "select " & WA_indexField & " from " & WA_table & " where " & obj & " order by " & WA_indexField & " DESC"
set WA_eCartRecordset = Server.CreateObject("ADODB.Recordset")
WA_eCartRecordset.ActiveConnection = WA_connection
WA_eCartRecordset.Source = sqlstr
WA_eCartRecordset.CursorType = 0
WA_eCartRecordset.CursorLocation = 2
WA_eCartRecordset.LockType = 1
WA_eCartRecordset.Open()
if (NOT WA_eCartRecordset.EOF) then Session(WA_sessionName) = WA_eCartRecordset.Fields.Item(WA_indexField).Value
WA_eCartRecordset.Close()
else
Session(WA_sessionName) = updateFieldValue
end if
else
Session(WA_sessionName) = WA_fieldValues(indexFieldIndex)
end if
if (WA_redirectURL <> "") then
Response.Redirect(WA_redirectURL)
end if
end if
%>


The checkout success page is running the shipping recordset, but shouldn't that page be pulling the shipping info already stored with the line:

<td class="eC_SummaryLabel">Shipping</td>
<td><%=WA_eCart_DisplayMoney(eCart1, WA_eCart_GetShipping(eCart1))%></td>


thx
Eric

Sign in to reply to this post

eric284736

Here is the shipping code on the cart_VB.asp page:

<%
function WAEC_eCart1_USPSShipping()
totalShipping = 0
if (false AND (("USPS"="USPS") AND ("" <> Session("eCart1_USPS_Quote")) AND (cDbl(Session("eCart1_USPS_Quote")) <> 0))) then
totalShipping = totalShipping + (cDbl(Session("eCart1_USPS_Quote")) + 0)'Result
end if
WAEC_eCart1_USPSShipping = WA_eCart_FormatNumber(totalShipping, eCart1.ForceDecimalsC, eCart1.DecimalPlacesC)
end function
%>
<%
function WAEC_eCart1_ShipMethod()
totalShipping = 0
if (true AND ((cStr(Session("ShipSelection")) = "12"))) then
totalShipping = totalShipping + 12.00'Result
end if
WAEC_eCart1_ShipMethod = WA_eCart_FormatNumber(totalShipping, eCart1.ForceDecimalsC, eCart1.DecimalPlacesC)
end function
%>
<%
function WAEC_eCart1_OvernightExpress()
totalShipping = 0
if (true AND ((cStr(Session("ShipSelection")) = "25"))) then
totalShipping = totalShipping + 25.00'Result
end if
WAEC_eCart1_OvernightExpress = WA_eCart_FormatNumber(totalShipping, eCart1.ForceDecimalsC, eCart1.DecimalPlacesC)
end function
%>
<%
function WAEC_eCart1_FedEx()
totalShipping = 0
if (true AND ((cStr(Session("ShipSelection")) = "38"))) then
totalShipping = totalShipping + 38.00'Result
end if
WAEC_eCart1_FedEx = WA_eCart_FormatNumber(totalShipping, eCart1.ForceDecimalsC, eCart1.DecimalPlacesC)
end function
%>

Sign in to reply to this post

Eric Mittman

Thanks for the info on these pages and where the recordset is filtering on this value. I was hoping more for a detailed description of how the old rule was setup when it was working versus the now not working shipping charge rule. If things were working previously then it indicates that a change has occurred that is causing it to not work any longer. If the shipping charge rule itself has not changed then it would be some other change that was made that would be causing this. This is why I would like to know how the rule was setup previously to determine what may be causing it to no longer work. If there is absolutely no difference in the rule itself then please explain a little about any other modifications that you have made to the site since then so I have a better idea of where to look.

Sign in to reply to this post

eric284736

Hi Eric,

Let's start over, I ran an update on the cart extension and started fresh because either I am missing something or something is not working correctly.

First:

I have setup a table with 3 shipping selections.
Priority Mail - 12.00
Overnight Express - 25.00
FedEx Overnight - 38.00

I have the cart display page. Then the user clicks the checkout button and it takes them to shipping page which only displays the shipping choices and the form to select their choice. This form sets the session variable "ShipBy" and redirects to the checkout page.

Right now the session does not show on the checkout page.

I have included the two pages. Not sure if I am doing the correct thing to show the session. I am trying to call it on the checkout to make sure it is setting and calling the session.

Thanks,
Eric

Attached Files
testpages-neck.zip
Sign in to reply to this post

Eric Mittman

Thank you so much for the info, this is exactly the type of thing that I was hoping for. The problem is that on your shipping page is where you are setting the session variable. The trigger is set to same page load, but the problem is that the form that posts this value is set to go to your checkout page.

<form name="form2" method="post" action="checkout.asp">



You can either update the action of this form to be the same page or blank, this would make sure that the session variable is set correctly.

You can also leave it as it is and add in the set session value server behavior on the checkout page, you would set the trigger to any form post if you did it this way.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...