View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Returning to Previous Page When Clearing Cart

Thread began 8/20/2009 7:19 pm by duncanc213061 | Last modified 9/11/2009 6:39 pm by duncanc213061 | 1806 views | 11 replies

Eric Mittman

To do this within the clear cart code you can just borrow from the continue shopping code. Just after this line of code in your clear cart:

Redirect_redirStr=""'_redirStr

Add in this to set the redirect string to the page the user was on when they added to the cart:

if (true AND cStr(Session("WAEC_ContinueRedirect")) <> "") then
Redirect_redirStr=Session("WAEC_ContinueRedirect")
end if

So in the end the combined code would look like this:

<%
' WA eCart Clear Cart
if (cStr(Request.Form("birdie_Clear_100")) <> "" OR cStr(Request.Form("birdie_Clear_100.x")) <> "") then
set birdie = WA_eCart_ClearCart(birdie)
Redirect_redirStr=""'_redirStr
if (true AND cStr(Session("WAEC_ContinueRedirect")) <> "") then
Redirect_redirStr=Session("WAEC_ContinueRedirect")
end if
if (Redirect_redirStr <> "") then
birdie_redirStr = Redirect_redirStr
end if
birdie_cartAction = "ClearCart"
end if
%>

This session variable is set when you add to cart to record the current page, this is for the continue shopping but I think it will do what you are wanting in this case as well. Let me know if this is not what you were looking for.

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