The task is to transfer the value from the template. I made my function in the controller which calls the model method that makes an entry to the database and returns it back from the database (Controller):
function translateYandex($text){ $this->model_query_query->getTranslate($text) } Call from view:
translateYandex('text'); I get the error:
Fatal error: Using $this when not in object context in question how to pass the task without getting an error.
translateYandex('text');From .tpl in opencart I understand the rules mvc can not touch themodelinview- newProgrammercontrollershould be responsible for themodelandviewcommunication. He can already directly refer to the model. - Pyramidhead