ecart cookie name
Cart items are storied in cookie,
what is the name of the cookie so i can clear it after a successful checkout ?
Cart items are storied in cookie,
what is the name of the cookie so i can clear it after a successful checkout ?
use the eCart Clear Cart server behavior on the checkout success page to clear the cart.
On the server behaviors panel (Window -> Server Behaviors), click the plus button and select eCart -> Cart Display -> Clear Cart. Set the trigger to before page load.
Then i would move the code to the bottom of the page right? since then it wouldnt show the items on the checkout success page if it was to load above the header ?
yes, that is correct, the clear cart code would need to be moved to the bottom of the page.
I am curious if it's being set and I would like to know the name so I can check in my browser.
the name will be "<cartName>_Items" where <cartName> is the name of your cart object
Thanks for that! But there's still a hitch unfortunately. I notice that even though I set my cookie to expire after 99999 days, when I look in the browser, it says Expires when I quit my browser.
Is there a way to ensure the cookie lasts as long as I would like it to?
can you send a link where i can see the problem and a copy of the eCart object file from the WA_eCart folder.
Sorry for the delay, Jason. And thanks for your constant presence in these forums. I appreciate your help!
Here is the code from the ecart :
function SetCookieInfo($theCookieString) {
$numDays = 99999;
$theDomain = "";
$thePath = "";
$cookSec = false;
if ($numDays == "") $numDays="0";
$theDate = strtotime("+".$numDays." Days");
setcookie($this->CartName."_Items", $theCookieString, $theDate, $thePath, $theDomain, $cookSec);
}
I'd like to know why it isn't working as it seems it should, however, I've changed the way my site works. I'm using the cart as a wish list, however, on logout, I save the cart to a database and on login, I create a new cookie as ecart would make it, therefore allowing ecart to access it during active use.
So it's not urgent but I'm still curious why it doesn't work.
However, I have another problem that I hope you might answer. I am saving books (title, author and description) to the wish list and when saving to the cookie, for some reason when I add to cart, any apostrophes effectively truncate what's being added to the card. Even though I manually added mysql_real_escape_string, somehow, it's still not working. So when I want to see the description displayed on the cart page, wherever there is an apostrophe—that's the end of the entry.
Any ideas?
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.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.