public function GetTotalOrderValue($sStartDate = null, $sEndDate = null)
    {
        $query = "SELECT SUM(value_total) AS ordervalue
                  FROM `shop_order`
                 WHERE `data_extranet_user_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'
                   AND (`shop_order`.`id` IS NULL OR `shop_order`.`canceled` = '0')
               ";
        if (!is_null($sStartDate)) {
            $query .= " AND `datecreated` >= '".MySqlLegacySupport::getInstance()->real_escape_string($sStartDate)."' ";
        }
        if (!is_null($sEndDate)) {
            $query .= " AND `datecreated` <= '".MySqlLegacySupport::getInstance()->real_escape_string($sEndDate)."' ";
        }
        $query .= ' GROUP BY `data_extranet_user_id`';
        $dValue = 0;
        if ($aRow = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {
            $dValue = $aRow['ordervalue'];
        }

        return $dValue;
    }