E-Junkie Forum http://www.e-junkie.com/bb/ E-Junkie Forum RSS en-us Copyright 2013, 19.5 Degrees. All rights reserved. webmaster@e-junkie.com webmaster@e-junkie.com Tue, 3 Aug 2010 00:17:53 GMT Wed, 22 May 2013 00:42:20 GMT 681 E-JUNKIE 5 E-Junkie Forum http://www.e-junkie.com/bb/ http://www.e-junkie.com/ej/logo.gif 290 104 Post #14 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Tue, 3 Aug 2010 00:17:53 GMT http://www.e-junkie.com/ej/developer-directory.htm]]> E-junkie Discussions; E-junkieGuru Post #13 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Sun, 1 Aug 2010 00:54:59 GMT
function Set_Cookie( name, value, expires, path, domain, secure ) {
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );
// if the expires variable is set, make the correct expires time, the
// current script below will set it for x number of days, to make it
// for hours, delete * 24, for minutes, delete * 60 * 24
if ( expires )
{
//expires = expires * 1000 * 60 * 60 * 24;
expires = expires * 1000 * 60;
}
//alert( 'today ' + today.toGMTString() );// this is for testing purpose only
var expires_date = new Date( today.getTime() + (expires) );
//alert('expires ' + expires_date.toGMTString());// this is for testing purposes only
alert('new value ' + escape(value));
document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + //expires.toGMTString()
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}

// this deletes the cookie when called
function Delete_Cookie( name, path, domain ) {
if ( Get_Cookie( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

// This also deletes the cookie at end of session
function del_cookie(name) {
document.cookie = name +
'=; expires=Thu, 01-Jan-70 00:00:01 GMT;';
}

// This deletes the cookie right now
function blank_cookie(name) {
alert(Get_Cookie(name));
Set_Cookie(name,'0','/','.bftix.org');
// or Set_Cookie(name,'0'); neither works
alert(Get_Cookie(name));
}

If you go to the site and select Santaland Diaries, click the 'Start Over' button, you'll see the alerts from a call to blank_cookie.]]>
E-junkie Discussions; bfjack
Post #12 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Sun, 1 Aug 2010 00:15:41 GMT Thanks!]]> E-junkie Discussions; bfjack Post #11 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Sat, 31 Jul 2010 22:46:07 GMT E-junkie Discussions; E-junkieNinja Post #10 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Fri, 30 Jul 2010 03:08:16 GMT The configuration change to set the days to expire is good. I would like to be able to shorten the time to something like 7 minutes. Is there a EJEJC_CMINUTES?
Thanks!]]>
E-junkie Discussions; bfjack
Post #9 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Wed, 21 Jul 2010 23:09:57 GMT E-junkie Discussions; bunkbedking Post #8 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Tue, 20 Jul 2010 01:36:03 GMT
We have modified our cart software to allow customizing the number of days before the cart cookie expires in each buyer's browser; just add these lines to your View Cart code on every page, just before the "// -->" line in the standard code you obtained from Seller Admin:

function EJEJC_config() {
EJEJC_CDAYS = 7;
}

You can replace the "7" with however many days you want each buyer's cart to retain its contents; as the Ninja explained above, this expiration period starts counting from the last time the buyer viewed their cart. If you are already using function EJEJC_config(){} for other cart customizations, just add the EJEJC_CDAYS line to your existing customization code anywhere before the closing "}" (but before function EJEJC_shown(){} if you're also using that).]]>
E-junkie Discussions; E-junkieGuru
Post #7 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Mon, 19 Jul 2010 21:28:01 GMT To delete:
function del_cookie(name) {
document.cookie = name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT;';
}

The "name" is as E-junkieGuru explained above.]]>
E-junkie Discussions; bfjack
Post #6 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Mon, 19 Jul 2010 16:31:52 GMT E-junkie Discussions; epatio Post #5 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Mon, 19 Jul 2010 02:26:20 GMT It's possible to "reset" the cart by deleting the cookie we set in the buyer's browser to keep track of their cart contents. This cookie's name in your case would be 'ej_ejc_cart_id112637' (since your E-junkie client ID is 112637), so any generic JavaScript that can delete a cookie by name will do the trick.

@bunkbedking:
At present the cookie's lifespan is hardcoded at 24 hours for everyone, but Development is investigating to see if there's some way we could make that customizable.]]>
E-junkie Discussions; E-junkieGuru
Post #4 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Sun, 18 Jul 2010 22:23:28 GMT
(we sell tangable goods)]]>
E-junkie Discussions; bunkbedking
Post #3 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Sun, 18 Jul 2010 02:29:15 GMT E-junkie Discussions; bfjack Post #2 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Sat, 17 Jul 2010 18:44:37 GMT E-junkie Discussions; E-junkieNinja Post #1 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 http://www.e-junkie.com/bb/topic/4516/pg/0#post15065 Sat, 17 Jul 2010 18:30:56 GMT
A lot of customers seem to use the cart as a "bookmark" to store potential purchases, so the longer it stays in the cart the better]]>
E-junkie Discussions; epatio