How to call adminhtml controller?
I want to call my custom adminhtml controller on form action. see my config file admin please and how to call controller.
<?xml version="1.0"?>
<config>
<modules>
<Mage2sol_Trackinglink>
<version>0.1.0</version>
</Mage2sol_Trackinglink>
</modules>
<global>
<helpers>
<trackinglink>
<class>Mage2sol_Trackinglink_Helper</class>
</trackinglink>
</helpers>
<blocks>
<trackinglink>
<class>Mage2sol_Trackinglink_Block</class>
</trackinglink>
</blocks>
<models>
<trackinglink>
<class>Mage2sol_Trackinglink_Model</class>
<resourceModel>trackinglink_mysql4</resourceModel>
</trackinglink>
<trackinglink_mysql4>
<class>Mage2sol_Trackinglink_Model_Mysql4</class>
<entities>
<tracklink>
<table>tracklink</table>
</tracklink>
</entities>
</trackinglink_mysql4>
</models>
<resources>
<trackinglink_setup>
<setup>
<module>Mage2sol_Trackinglink</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</trackinglink_setup>
<trackinglink_write>
<connection>
<use>core_write</use>
</connection>
</trackinglink_write>
<trackinglink_read>
<connection>
<use>core_read</use>
</connection>
</trackinglink_read>
</resources>
</global>
<admin>
<routers>
<trackinglink>
<use>admin</use>
<args>
<module>Mage2sol_Trackinglink</module>
<frontName>admin_trackinglink</frontName>
</args>
</trackinglink>
</routers>
</admin>
<adminhtml>
<menu>
<trackinglink module="trackinglink">
<title>Trackinglink</title>
<sort_order>100</sort_order>
<children>
<tracklink module="trackinglink">
<title>Manage Tracklink</title>
<sort_order>10</sort_order>
<action>admin_trackinglink/adminhtml_tracklink</action>
</tracklink>
</children>
</trackinglink>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<trackinglink translate="title" module="trackinglink">
<title>Trackinglink</title>
<sort_order>1000</sort_order>
<children>
<tracklink translate="title">
<title>Manage Tracklink</title>
<sort_order>10</sort_order>
</tracklink>
</children>
</trackinglink>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<trackinglink>
<file>trackinglink.xml</file>
</trackinglink>
</updates>
</layout>
<events>
<core_block_abstract_to_html_after>
<observers>
<trackinglink_custom_order_view_info>
<class>trackinglink/observer</class>
<method>getSalesOrderViewInfo</method>
</trackinglink_custom_order_view_info>
</observers>
</core_block_abstract_to_html_after>
</events>
</adminhtml>
</config>
magento-1.9 admin-controller
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I want to call my custom adminhtml controller on form action. see my config file admin please and how to call controller.
<?xml version="1.0"?>
<config>
<modules>
<Mage2sol_Trackinglink>
<version>0.1.0</version>
</Mage2sol_Trackinglink>
</modules>
<global>
<helpers>
<trackinglink>
<class>Mage2sol_Trackinglink_Helper</class>
</trackinglink>
</helpers>
<blocks>
<trackinglink>
<class>Mage2sol_Trackinglink_Block</class>
</trackinglink>
</blocks>
<models>
<trackinglink>
<class>Mage2sol_Trackinglink_Model</class>
<resourceModel>trackinglink_mysql4</resourceModel>
</trackinglink>
<trackinglink_mysql4>
<class>Mage2sol_Trackinglink_Model_Mysql4</class>
<entities>
<tracklink>
<table>tracklink</table>
</tracklink>
</entities>
</trackinglink_mysql4>
</models>
<resources>
<trackinglink_setup>
<setup>
<module>Mage2sol_Trackinglink</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</trackinglink_setup>
<trackinglink_write>
<connection>
<use>core_write</use>
</connection>
</trackinglink_write>
<trackinglink_read>
<connection>
<use>core_read</use>
</connection>
</trackinglink_read>
</resources>
</global>
<admin>
<routers>
<trackinglink>
<use>admin</use>
<args>
<module>Mage2sol_Trackinglink</module>
<frontName>admin_trackinglink</frontName>
</args>
</trackinglink>
</routers>
</admin>
<adminhtml>
<menu>
<trackinglink module="trackinglink">
<title>Trackinglink</title>
<sort_order>100</sort_order>
<children>
<tracklink module="trackinglink">
<title>Manage Tracklink</title>
<sort_order>10</sort_order>
<action>admin_trackinglink/adminhtml_tracklink</action>
</tracklink>
</children>
</trackinglink>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<trackinglink translate="title" module="trackinglink">
<title>Trackinglink</title>
<sort_order>1000</sort_order>
<children>
<tracklink translate="title">
<title>Manage Tracklink</title>
<sort_order>10</sort_order>
</tracklink>
</children>
</trackinglink>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<trackinglink>
<file>trackinglink.xml</file>
</trackinglink>
</updates>
</layout>
<events>
<core_block_abstract_to_html_after>
<observers>
<trackinglink_custom_order_view_info>
<class>trackinglink/observer</class>
<method>getSalesOrderViewInfo</method>
</trackinglink_custom_order_view_info>
</observers>
</core_block_abstract_to_html_after>
</events>
</adminhtml>
</config>
magento-1.9 admin-controller
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I want to call my custom adminhtml controller on form action. see my config file admin please and how to call controller.
<?xml version="1.0"?>
<config>
<modules>
<Mage2sol_Trackinglink>
<version>0.1.0</version>
</Mage2sol_Trackinglink>
</modules>
<global>
<helpers>
<trackinglink>
<class>Mage2sol_Trackinglink_Helper</class>
</trackinglink>
</helpers>
<blocks>
<trackinglink>
<class>Mage2sol_Trackinglink_Block</class>
</trackinglink>
</blocks>
<models>
<trackinglink>
<class>Mage2sol_Trackinglink_Model</class>
<resourceModel>trackinglink_mysql4</resourceModel>
</trackinglink>
<trackinglink_mysql4>
<class>Mage2sol_Trackinglink_Model_Mysql4</class>
<entities>
<tracklink>
<table>tracklink</table>
</tracklink>
</entities>
</trackinglink_mysql4>
</models>
<resources>
<trackinglink_setup>
<setup>
<module>Mage2sol_Trackinglink</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</trackinglink_setup>
<trackinglink_write>
<connection>
<use>core_write</use>
</connection>
</trackinglink_write>
<trackinglink_read>
<connection>
<use>core_read</use>
</connection>
</trackinglink_read>
</resources>
</global>
<admin>
<routers>
<trackinglink>
<use>admin</use>
<args>
<module>Mage2sol_Trackinglink</module>
<frontName>admin_trackinglink</frontName>
</args>
</trackinglink>
</routers>
</admin>
<adminhtml>
<menu>
<trackinglink module="trackinglink">
<title>Trackinglink</title>
<sort_order>100</sort_order>
<children>
<tracklink module="trackinglink">
<title>Manage Tracklink</title>
<sort_order>10</sort_order>
<action>admin_trackinglink/adminhtml_tracklink</action>
</tracklink>
</children>
</trackinglink>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<trackinglink translate="title" module="trackinglink">
<title>Trackinglink</title>
<sort_order>1000</sort_order>
<children>
<tracklink translate="title">
<title>Manage Tracklink</title>
<sort_order>10</sort_order>
</tracklink>
</children>
</trackinglink>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<trackinglink>
<file>trackinglink.xml</file>
</trackinglink>
</updates>
</layout>
<events>
<core_block_abstract_to_html_after>
<observers>
<trackinglink_custom_order_view_info>
<class>trackinglink/observer</class>
<method>getSalesOrderViewInfo</method>
</trackinglink_custom_order_view_info>
</observers>
</core_block_abstract_to_html_after>
</events>
</adminhtml>
</config>
magento-1.9 admin-controller
I want to call my custom adminhtml controller on form action. see my config file admin please and how to call controller.
<?xml version="1.0"?>
<config>
<modules>
<Mage2sol_Trackinglink>
<version>0.1.0</version>
</Mage2sol_Trackinglink>
</modules>
<global>
<helpers>
<trackinglink>
<class>Mage2sol_Trackinglink_Helper</class>
</trackinglink>
</helpers>
<blocks>
<trackinglink>
<class>Mage2sol_Trackinglink_Block</class>
</trackinglink>
</blocks>
<models>
<trackinglink>
<class>Mage2sol_Trackinglink_Model</class>
<resourceModel>trackinglink_mysql4</resourceModel>
</trackinglink>
<trackinglink_mysql4>
<class>Mage2sol_Trackinglink_Model_Mysql4</class>
<entities>
<tracklink>
<table>tracklink</table>
</tracklink>
</entities>
</trackinglink_mysql4>
</models>
<resources>
<trackinglink_setup>
<setup>
<module>Mage2sol_Trackinglink</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</trackinglink_setup>
<trackinglink_write>
<connection>
<use>core_write</use>
</connection>
</trackinglink_write>
<trackinglink_read>
<connection>
<use>core_read</use>
</connection>
</trackinglink_read>
</resources>
</global>
<admin>
<routers>
<trackinglink>
<use>admin</use>
<args>
<module>Mage2sol_Trackinglink</module>
<frontName>admin_trackinglink</frontName>
</args>
</trackinglink>
</routers>
</admin>
<adminhtml>
<menu>
<trackinglink module="trackinglink">
<title>Trackinglink</title>
<sort_order>100</sort_order>
<children>
<tracklink module="trackinglink">
<title>Manage Tracklink</title>
<sort_order>10</sort_order>
<action>admin_trackinglink/adminhtml_tracklink</action>
</tracklink>
</children>
</trackinglink>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<trackinglink translate="title" module="trackinglink">
<title>Trackinglink</title>
<sort_order>1000</sort_order>
<children>
<tracklink translate="title">
<title>Manage Tracklink</title>
<sort_order>10</sort_order>
</tracklink>
</children>
</trackinglink>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<trackinglink>
<file>trackinglink.xml</file>
</trackinglink>
</updates>
</layout>
<events>
<core_block_abstract_to_html_after>
<observers>
<trackinglink_custom_order_view_info>
<class>trackinglink/observer</class>
<method>getSalesOrderViewInfo</method>
</trackinglink_custom_order_view_info>
</observers>
</core_block_abstract_to_html_after>
</events>
</adminhtml>
</config>
magento-1.9 admin-controller
magento-1.9 admin-controller
asked Apr 14 '17 at 18:21
Ajay PatelAjay Patel
9091427
9091427
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Please use this action url to get admin controller form action -
<form action="<?php echo Mage::helper('adminhtml')->getUrl('*/adminhtml_tracklink/your_form_action'); ?>" name="trackinglink" method="post">
add a comment |
Generally admin url's are working with secret code.
$url = Mage::helper("adminhtml")->getUrl("admin_trackinglink/<your_action_name>")
When we using above code. The secret key will automatically be added to the URL.
<form action="<?php echo $url; ?>" method="POST">
you give as first parameter a route with a controller, where the method is just waiting for a controller name.
DON'T USE anything else than adminhtml/ as start of the url, because magento 1.9.2.2 forbids everything else.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f170248%2fhow-to-call-adminhtml-controller%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Please use this action url to get admin controller form action -
<form action="<?php echo Mage::helper('adminhtml')->getUrl('*/adminhtml_tracklink/your_form_action'); ?>" name="trackinglink" method="post">
add a comment |
Please use this action url to get admin controller form action -
<form action="<?php echo Mage::helper('adminhtml')->getUrl('*/adminhtml_tracklink/your_form_action'); ?>" name="trackinglink" method="post">
add a comment |
Please use this action url to get admin controller form action -
<form action="<?php echo Mage::helper('adminhtml')->getUrl('*/adminhtml_tracklink/your_form_action'); ?>" name="trackinglink" method="post">
Please use this action url to get admin controller form action -
<form action="<?php echo Mage::helper('adminhtml')->getUrl('*/adminhtml_tracklink/your_form_action'); ?>" name="trackinglink" method="post">
answered Apr 17 '17 at 10:58
Soumik RanaSoumik Rana
1577
1577
add a comment |
add a comment |
Generally admin url's are working with secret code.
$url = Mage::helper("adminhtml")->getUrl("admin_trackinglink/<your_action_name>")
When we using above code. The secret key will automatically be added to the URL.
<form action="<?php echo $url; ?>" method="POST">
you give as first parameter a route with a controller, where the method is just waiting for a controller name.
DON'T USE anything else than adminhtml/ as start of the url, because magento 1.9.2.2 forbids everything else.
add a comment |
Generally admin url's are working with secret code.
$url = Mage::helper("adminhtml")->getUrl("admin_trackinglink/<your_action_name>")
When we using above code. The secret key will automatically be added to the URL.
<form action="<?php echo $url; ?>" method="POST">
you give as first parameter a route with a controller, where the method is just waiting for a controller name.
DON'T USE anything else than adminhtml/ as start of the url, because magento 1.9.2.2 forbids everything else.
add a comment |
Generally admin url's are working with secret code.
$url = Mage::helper("adminhtml")->getUrl("admin_trackinglink/<your_action_name>")
When we using above code. The secret key will automatically be added to the URL.
<form action="<?php echo $url; ?>" method="POST">
you give as first parameter a route with a controller, where the method is just waiting for a controller name.
DON'T USE anything else than adminhtml/ as start of the url, because magento 1.9.2.2 forbids everything else.
Generally admin url's are working with secret code.
$url = Mage::helper("adminhtml")->getUrl("admin_trackinglink/<your_action_name>")
When we using above code. The secret key will automatically be added to the URL.
<form action="<?php echo $url; ?>" method="POST">
you give as first parameter a route with a controller, where the method is just waiting for a controller name.
DON'T USE anything else than adminhtml/ as start of the url, because magento 1.9.2.2 forbids everything else.
edited Apr 17 '17 at 12:05
answered Apr 17 '17 at 11:27
SrihariSrihari
187111
187111
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f170248%2fhow-to-call-adminhtml-controller%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown