ECSHOP submitting order prompt "you have no items in your cart" -- solution

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

The problems that often $_SESSION is missing, The Internet to find that IE6 also has many SESSION loss problem, At this time, Going through the COOKIE to retrieve login status, But
Without rewriting the integrate.php check_cookie includes\modules\integrates\ecshop.php in the integration of its member of the class () method to validate cookie, returns the username is empty, Lost login status.
The ECSHOP template class presents the solution:
Open the ecshop.php with the following code inside.:

 1 /**
 2      * Check cookie
 3      *
 4      * @access  public
 5      * @param
 6      *
 7      * @return void
 8      */
 9     function check_cookie ()
10     {
11         if ( isset($_COOKIE['ECS'])  && isset($_COOKIE['ECS']['user_id'])  && isset($_COOKIE['ECS']['password']))
12         {
13       $ecs_user_id   = $_COOKIE['ECS']['user_id'];
14    $ecs_user_pass = $_COOKIE['ECS']['password'];
15             $sql = "SELECT " . $this->field_name ." AS user_name".
16                    " FROM " . $this->table($this->user_table) .
17                    " WHERE ".$this->field_id." = '$ecs_user_id' AND ".$this->field_pass." = '$ecs_user_pass'";
18             $username = $this->db->getOne($sql);
19             if ($username && ($this->charset != 'UTF8'))
20             {
21                 $username = ecs_iconv($this->charset, 'UTF8', $username);
22             }
23             return $username;
24         }
25         else
26         {
27             return '';
28         }
29     }


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Boyce at October 24, 2013 - 12:30 AM