[Tex/LaTex] How to put footnote in footer for KOMA Script

footerfootnotesheader-footerkoma-script

I want to put footnote in footer like this image:
enter image description here

My article now looks like this:
enter image description here

Frank Engelhardt provided a way to get this, but need to manually number. footnote in footer

Can you provide a better way? Thanks in advance

Code for Test:

\documentclass[%
    a4paper,            
    oneside,        
    12pt,               
    onecolumn,          
    openright,          
    openany,            
    parskip=full*,      
    headsepline,        
    footsepline,        
    bibliography=totoc,
    ]{scrbook}
\usepackage[T1]{fontenc}

\usepackage[utf8]{inputenc}

\usepackage[
    left=30mm,
    right=20mm,
    top=40mm,
    footskip=12mm,
    bottom=35mm
    ]{geometry}

\usepackage{scrpage2}
\pagestyle{scrheadings} 
\renewcommand*\chapterpagestyle{scrheadings}
\renewcommand*\sectionmark[1]{\markright{\makebox[0.8cm][l]{\thesection}\ #1}} 
\clearscrheadings
\ohead{\rightmark}
\cfoot{}
\ofoot{\vspace{-2em}\pagemark}



\begin{document}

\chapter{Test Chapter}

StackExchange   \footnote{Stack Exchange is a network of question-and-answer websites on topics in varied fields}

\end{document}

Best Answer

I would never do this, but if you insist on it, you could hack something like:

\documentclass[%
    a4paper,% not needed because default       
    oneside,        
    12pt,               
    onecolumn,          
    openright,% nonsense after oneside or before openay
    openany,% nonsense after onecolumn
    parskip=full*,      
    headsepline,        
    footsepline,        
    bibliography=totoc,
]{scrbook}
\usepackage[T1]{fontenc}

\usepackage[utf8]{inputenc}

\usepackage[
    left=30mm,
    right=20mm,
    top=40mm,
    footskip=12mm,
    bottom=35mm
    ]{geometry}

\usepackage{scrlayer-scrpage}
\renewcommand*\chapterpagestyle{scrheadings}% not recommended
\renewcommand*\sectionmark[1]{\markright{\makebox[0.8cm][l]{\thesection}\ #1}} 
\clearscrheadings
\ohead{\rightmark}
\cfoot{}
\ofoot{\pagemark}

\usepackage{blindtext}

\ifoot{\showfooternotes}
\newcounter{footernote}
\newcommand*{\footernotes}{}
\makeatletter
\newcommand*{\footernote}[1]{%
  \stepcounter{footernote}%
  \textsuperscript{\thefooternote}%
  \edef\reserved@a{\thefooternote}%
  \expandafter\g@addto@macro\expandafter\footernotes\expandafter{%
    \reserved@a.\enskip #1\par
  }%
}
\makeatother
\newcommand*{\showfooternotes}{%
  \normalfont\footnotesize
  \smash{\parbox[t]{.9\linewidth}{\footernotes}%
  \gdef\footernotes{}}\par
}

\begin{document}

\chapter{Test Chapter}

StackExchange   \footernote{Stack Exchange is a network of question-and-answer
  websites on topics in varied fields}

\chapter{Problems}

StackExchange   \footernote{Stack Exchange is a network of question-and-answer
  websites on topics in varied fields}

TeX.StackExchange \footernote{TeX.StackExchange is the \TeX{} section of Stack
  Exchange}

Footnotes \footernote{Hacking something like footnotes into the page footer
  can be very problematic, as you can see here: \blindtext}

\end{document}

problem at second page

With this very simple suggestions there can be other unwanted effects like footnotes on an page before the footnote mark. Once again: I would never ever use it.