close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Store Summary and Store Details

Thread began 10/06/2009 3:56 pm by gcollins189987 | Last modified 10/08/2009 3:42 pm by Jason Byrnes | 1767 views | 4 replies |

gcollins189987

Store Summary and Store Details

When I use the store summary and store details wizards my site adds this first order to these tables. I then do a second order and it updates/deletes the first order instead of adding a new record.

Any ideas why this would be happening?

Sign in to reply to this post

gcollins189987

Using some response.write()'s I came up with this.

First time through:

ADD STUDENT1: INSERT INTO tbl_Students (StudentBuyerID,StudentUserName,StudentPassword,StudentGender,StudentFirstName,StudentLastName,StudentEmail,StudentAddress1,StudentAddress2,StudentCity,StudentStateProv,StudentCountry,SudentZipPost) VALUES (1,'core','learning','1','Core','Learning','g@learning.com','2244 Somewhere','','Port Hope','Ontario','Canada','M2P 2A9')

ADD STUDENT2: SELECT StudentID FROM tbl_Students WHERE StudentBuyerID = 1 AND StudentUserName LIKE 'core%' AND StudentPassword LIKE 'learning%' AND StudentGender LIKE '1%' AND StudentFirstName LIKE 'Core%' AND StudentLastName LIKE 'Learning%' AND StudentEmail LIKE 'g@learning.com%' AND StudentAddress1 LIKE '2244 Somewhere%' AND StudentAddress2 LIKE '' AND StudentCity LIKE 'Port Hope%' AND StudentStateProv LIKE 'Ontario%' AND StudentCountry LIKE 'Canada%' AND SudentZipPost LIKE 'M2P 2A9%' ORDER BY StudentID DESC

ADD CART SUMMARY3: insert into tbl_Orders (OrderReferenceID,OrderBuyerID,OrderStudentID,OrderSubTotal,OrderDiscount,OrderTax,OrderTotal,OrderCardType,OrderCardNumber,OrderCardHolder,OrderCardExpire) values ('2009100618402201475',1,1,'$40.00','$0.00','$5.20','$45.20','Visa','......1111','Core Learning','02/10')

ADD CART SUMMARY4: select OrderID from tbl_Orders where OrderReferenceID='2009100618402201475' AND OrderBuyerID=1 AND OrderStudentID=1 AND OrderSubTotal='$40.00' AND OrderDiscount='$0.00' AND OrderTax='$5.20' AND OrderTotal='$45.20' AND OrderCardType='Visa' AND OrderCardNumber='......1111' AND OrderCardHolder='Core Learning' AND OrderCardExpire='02/10' order by OrderID DESC

ADD CART DETAIL1: Delete from tbl_OrderDetails where DetailOrderID = 1

ADD CART DETAIL2: insert into tbl_OrderDetails (DetailOrderID,DetailCourseID,DetailCourseName,DetailQuantity,DetailPrice,DetailSubscriptionType) values (1,286079434,'English Grammar I','1','$40.00',4)

Second time through (do not need to add student because we added firsttime):

ADD CART SUMMARY1: select OrderID from tbl_Orders where OrderID = 1 order by OrderID DESC

ADD CART SUMMARY2: update tbl_Orders SET OrderReferenceID = '2009100618441101478', OrderBuyerID = 1, OrderStudentID = 1, OrderSubTotal = '$40.00', OrderDiscount = '$0.00', OrderTax = '$5.20', OrderTotal = '$45.20', OrderCardType = 'Visa', OrderCardNumber = '......1111', OrderCardHolder = 'Core Learning', OrderCardExpire = '03/11' where OrderID = 1

ADD CART DETAIL1: Delete from tbl_OrderDetails where DetailOrderID = 1

ADD CART DETAIL2: insert into tbl_OrderDetails (DetailOrderID,DetailCourseID,DetailCourseName,DetailQuantity,DetailPrice,DetailSubscriptionType) values (1,286079302,'English Grammar II - Essentials','1','$40.00',4)

Sign in to reply to this post

Jason ByrnesWebAssist

The session needs to be destroyed when an order goes through to begin a new session.

On the Checkout success page, add the following after the </html> tag:
<%
Session.Abandon
%>

Sign in to reply to this post

gcollins189987

That worked.

But this completely logs my user out.

If I don't want them to be logged out what session variables must I clear so that I don't have the problem I was having.

Sign in to reply to this post

Jason ByrnesWebAssist

On the confirm page, open the Store order Summary Behavior. Note the name that is set inn the Store As option.


Do the same for the Store order details serer behavior.



Then add asp code to set those sessions to be blank:
<%
Session("<Summary Session Variable Name>") = ""
Session("<ddetails Session Variable Name>") = ""
%>

Sign in to reply to this post

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...