close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Clear Cookie Cart

Thread began 8/25/2012 11:02 am by psychobilly1165508 | Last modified 8/30/2012 8:54 am by Jason Byrnes | 1755 views | 5 replies |

psychobilly1165508

Clear Cookie Cart

I just changed my cart from session to cookie.

The clear cart server behavior does not clear the cart. I have it to clear on load, but never gets triggered. Please note, I just want to clear the cart, orderID and coupons. Customers are logged in at this point, so I want to keep them logged in.

Here's what I have below the </html> on my success page.

<?php
// WA eCart Trigger Clear Cart
if ("" == "") {
$ssdcart->ClearCart();
$Redirect_redirStr="";
if ($Redirect_redirStr != "") {
$ssdcart->redirStr = $Redirect_redirStr;
}
$ssdcart->cartAction = "ClearCart";
}
?>
<?php
unset($_SESSION[ssdcart_OrderID]);
unset($_SESSION[PromoCode]);
unset($_SESSION["giftstartDate"]);
unset($_SESSION["giftPrice"]);
unset($_SESSION["giftName"]);
unset($_SESSION["giftCode"]);
?>

Sign in to reply to this post

Jason ByrnesWebAssist

this code is wrong:
<?php
unset($_SESSION[ssdcart_OrderID]);
unset($_SESSION[PromoCode]);
unset($_SESSION["giftstartDate"]);
unset($_SESSION["giftPrice"]);
unset($_SESSION["giftName"]);
unset($_SESSION["giftCode"]);
?>

you are missing the single quotes around variable names:
unset($_SESSION[ssdcart_OrderID]);

should be:
unset($_SESSION['ssdcart_OrderID']);

or using double quotes in some cases:
unset($_SESSION["giftCode"]);

should be:
unset($_SESSION['giftCode']);


once you fix that, if you continue to have problems, please send a link to the success page.

Sign in to reply to this post

psychobilly1165508

Those are actually working. The Sessions for OrderID, giftID, etc... are removed correctly.

The products in the cart are not being removed. When I changed it to a COOKIE base cart this started happening.The code does not execute. I tried moving the code to the <HEAD> to test it and it removed the cart items properly.

But this is the success page so obviously I need the items in the cart still.

How can I fix this?

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the page so i can examine the code in context.

Sign in to reply to this post

psychobilly1165508

File attached thanks

Attached Files
pp_checkout_success_finalSAMPLE.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

can you send a link to your store where I can test this please.

Sign in to reply to this post

psychobilly1165508

Can I send you a PM? I'd prefer to not have the link in a public forum.

I'm getting ready to launch this project and still cannot get the clear cart server behavior to execute below the </html>.

Works fine at the top of the code.

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

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