if you have defined the "SESSION_RECREATE", zencart will reset the session_id after customer logined.after logout,it also recreate the session_id.
if you want to get a static session_id before login and after login without consider the "SESSION_RECREATE",append codes to application_top.php
if(!isset( $_SESSION["MySessionId"] ) )
{
$_SESSION["MySessionId"] = md5(microtime(true));
}
after session recreated,the value of $_SESSION["MySessionId"] will no changed