close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

session abandon

Thread began 11/11/2011 1:41 pm by Fritz Stickers | Last modified 8/29/2012 11:32 am by Fritz Stickers | 1264 views | 18 replies |

Fritz Stickers

session abandon

Hi,

The "<% Session.Abandon() %>" is on my confirm-page to delete the content of the shopping cart after ordering. But with this script also the userID will destroy. So customers need to login again after they confirmed their order.
How can I fix it that only the shopping cart session will be destroyed ?

I'am working with aspVB-script and dreamweaver.


Thanks in advance,
Geert.

Sign in to reply to this post

Jason ByrnesWebAssist

instead of using session.abandon, use a clear cart behavior.


on the server behaviors panel click the plus button and select eCart -> Cart Display -> Clear Cart and set the trigger to Page Load.

you may need to move the placement of the clear cart code so it is after the other processing on the page, this will clear the cart, but leave the user logged in.

Sign in to reply to this post

Fritz Stickers

This behaviour makes a "Clear Cart Button" !?
There's no "Clear Cart" behaviour.

Sign in to reply to this post

Jason ByrnesWebAssist

Go to the server behaviors tab, click the plus button and select eCart -> Cart Display -> Clear Cart to add the clear cart behavior.

Sign in to reply to this post

Fritz Stickers

Sorry ... but as you see in attach, there is no "Clear Cart".
There is a "Clear Cart Button". I tried that, but that's not the purpose.

Sign in to reply to this post

Jason ByrnesWebAssist

It will still add the clear cart code to the page.


you can delete the button from the display and edit the trigger so it will occur on page load, send a copy of the page with the clear cart button on it, and i can tell the code change to make.

Sign in to reply to this post

Fritz Stickers

See attach.

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

Jason ByrnesWebAssist

the clear cart code is at line 70 - 80:

<%
' WA eCart Clear Cart
if (cStr(Request.Form("stickersBE_Clear_1")) <> "" OR cStr(Request.Form("stickersBE_Clear_1.x")) <> "") then
set stickersBE = WA_eCart_ClearCart(stickersBE)
Redirect_redirStr="index.asp"'_redirStr
if (Redirect_redirStr <> "") then
stickersBE_redirStr = Redirect_redirStr
end if
stickersBE_cartAction = "ClearCart"
end if
%>



you can edit the if statement;

if (cStr(Request.Form("stickersBE_Clear_1")) <> "" OR cStr(Request.Form("stickersBE_Clear_1.x")) <> "")     then




to:

if ((Request.ServerVariables("Request_Method") = "POST"))     then



so it will trigger when the order is processed to clear the cart,

you will also want to move the code block so it is after the email, and store Cart summary / details behaviors.

Sign in to reply to this post

Fritz Stickers

Thanks, it works now like it should.
Even my other issue is solved, "Block UEmail when ...".


Geert.

Sign in to reply to this post

Jason ByrnesWebAssist

Glad to hear it is working.

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