getCartOpen SiteCatalyst Plug-in

What the getCartOpen plug-in does is looks for the very first instance of the scAdd event being set and adds the scOpen event at that same time. Each time after that the scAdd event is set, the scOpen event will not be set again.

Plug-in Prototype
s.getCartOpen(“s_scOpen”);

Example
The plug-in is used with the s.events call.

s.events=s.getCartOpen("s_scOpen");

Code

/*
 * Plugin: getCartOpen
 */
s.getCartOpen=new Function("c","" 
+"var s=this,t=new Date,e=s.events?s.events:'',i=0;t.setTime(t.getTim"
+"e()+1800000);if(s.c_r(c)||e.indexOf('scOpen')>-1){if(!s.c_w(c,1,t))"
+"{s.c_w(c,1,0)}}else{if(e.indexOf('scAdd')>-1){if(s.c_w(c,1,t)){i=1}"
+"else if(s.c_w(c,1,0)){i=1}}}if(i){e=e+',scOpen'}return e");