KenFranklin Posted October 31, 2015 Share Posted October 31, 2015 (edited) Hello! This is article. ----------- http://opencart.hostjars.com/blog/68 ----------- public function getContent() { $ajax_url = $this->context->link->getAdminLink('AdminModules').'&configure='.$this->name; $res .= '<script> $.ajax({ url: \'' . $ajax_url . '\', data: { ajax: true, action: \'MyAjaxMethod\', my_name: "name_name" } }); </script>'; return $res; '; public function ajaxProcessMyAjaxMethod() { $name = Tools::getValue('my_name'); $a = "Hello " . $name . "!"; return $a; } This code can and should work? Edited October 31, 2015 by workstyling (see edit history) Link to comment Share on other sites More sharing options...
joshwa Posted October 31, 2015 Share Posted October 31, 2015 in your URL or data, I think you need at least pass in the security "token". otherwise it will be rejected or redirected to log in. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now