Questions tagged [admin-controller]

Denotes questions related to Admin Area's Controller. A controller is a part of Model-View-Controller Architecture.

Filter by
Sorted by
Tagged with
0
votes
1answer
22 views

Magento 1: Can't override Enterprise/GiftCardAccount/controllers/Adminhtml/GiftcardaccountController.php

I can't override the controller inside of the Enterprise/GiftCardAccount/controllers/Adminhtml/ folder <config> ... <admin> <routers> <adminhtml> <...
0
votes
0answers
13 views

Magento 2 Add Button in Edit Product page and land back there after POST request

So, as the title says, I want to add an Admin button in the Edit Product Admin page. That button, when pressed, will call the respective controller of a URL, sending along the product id, the ...
0
votes
0answers
25 views

How to find what is the controller responsible?

I am using the Amasty store locator module, in the backend, i am filled with all values and click the save button, how to find which controller is responsible for saving all the values. After clicking ...
0
votes
0answers
37 views

Magento 2 Admin Menu buttons (UiComponent buttons) behaviour

Question What do I need to setup a Button's behaviour, or is there CRUD built-in Magento 2 behaviour when I do not specify a Controller? This is The tutorial article I am following. I found the ...
0
votes
1answer
26 views

Magento 2 custom dashboard Page

I want to show a completely custom dashboard. I have a controller for that. I just want to show this page when Admin login. I don't want to show the default Magento dashboard controller I want my ...
0
votes
1answer
23 views

Magento 2 : Acl admin controller

I can see below code in file use Magento\Backend\App\Action; /** * Abstract assignment controller */ abstract class Assignment extends Action { /** * Authorization level of a basic admin ...
0
votes
2answers
96 views

How can i override abstract class protected function

I want to override abstract class Magento\Sales\Controller\Adminhtml\Order\Create of the below method protected function _processActionData($action = null){ } I have tried using preference but it ...
0
votes
0answers
21 views

Magento 2 how to disable or add form key to adminhtml controller?

How can I add a form key to my controller? it's redirecting me to dashboard everything it finishes. this is my code use Magento\Backend\App\Action; use Magento\Framework\App\RequestInterface; use ...
0
votes
0answers
88 views

Magento 2 Uncaught Error: Call to a member function isLoggedIn() on null

I'm trying to change the order status on Order Detail with a custom controller, but I'm getting this error Uncaught Error: Call to a member function isLoggedIn() on null This is my code: <?php ...
0
votes
0answers
16 views

Magento 2 how to redirect backend controller to previous page?

I'm trying to redirect a controller that is executed in Order Detail. If I end the controller returning redirect like this, it throws an error: return $resultRedirect; If I end the controller with ...
0
votes
1answer
29 views

check admin loggedIn on frontend magento 2

i have tried through this method public function isAdmin() { $this->_coreSession->start(); echo $this->_coreSession->getMessage(); echo 'session test4'; ...
0
votes
1answer
33 views

how to check admin loggedin or not on frontend magento 2 [duplicate]

how to check admin loggedIn or not on front-end magento 2 .I have tried this class BackendAuthUserLoginSuccess implements ObserverInterface { const DEFAULT_SESSION_NAME_OF_FRONTEND = 'PHPSESSID'; ...
0
votes
1answer
43 views

how to get magento admin users from magento 1.9

I want to get magento admin users and assign them a mobile number, from each particular agent panel, agent can able make a call from that number.
0
votes
1answer
22 views

Magento 2 admin controller is not working

Here am added a admin controller, here is my code etc/adminhtml/routes.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
2answers
247 views

save admin form and redirect back url in magento 2.3

I have create admin sales grid. All is working fine. And i have added one link in order view page. This link click redirect custom admin form. And Finally i want to save custom admin form. And ...
1
vote
0answers
70 views

Magento 2 add text input to massaction from dropdown

In magento 1, if I wanted to add a text input to send a custom value with my massaction to my controller, I would do something like: $this->getMassactionBlock()->addItem('add_ship_method', array(...
0
votes
2answers
361 views

Type Error occurred when creating object

I am having the massaction "delete" in the ui_component and it is then process by a controller MassDelete in my adminhtml folder. like this: <?php namespace Apriljune\Testimonial\...
1
vote
1answer
200 views

How To Add Fixed Filter In Custom Admin Block Grid in Magento 2?

Here is my custom grid i wan to show only those data that status is paid but now the data present with paid and unpaid both . how can i set default filter to these custom block grid... here is my ...
1
vote
0answers
155 views

Magento 2 override admin Controller Address Save.php

How to override admin controller address save.php I am using this code - di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
2
votes
5answers
3k views

Custom Module Controller: Invalid security or form key. Please refresh the page

I have a custom module with an admin controller, but when I try to access from the administration page I get the following error: My controller is in Controller/Adminhtml/Login/Index.php class Index ...
0
votes
1answer
44 views

Find backoffice controller

I have a javascript call to this url : https://mysite/admin/admin/export/export/key/b7c4bdb5a1b9f5147f498741adc99/entity/catalog_product/file_format/csv From this url how can I find where is located ...
0
votes
1answer
133 views

Magento 2 admin Ajax call failed bad request

I'm using custom js in Product Add/Edit page of magento 2 admin. I need to make a ajax call when the product save button clicked. I used the below code. require(['jquery', 'domReady!'], function ($) {...
1
vote
1answer
381 views

Magento 2 Admin controller is not working 404 error

I don't why my admin controller is not working, I have checked it and everything seems to be ok. This is my code: etc/adminhtml/routes.xml <?xml version="1.0"?> <config xmlns:xsi="http://...
0
votes
1answer
42 views

How to collect customer data who has added the product to wishlist?

I have a requirement that is collect customers data like wishlist, address and send them to another server using SFTP. These all should be programmatically. Could anyone please guide me on this? ...
0
votes
0answers
80 views

My ajax request isn't working properly in phtml

vendor\module_name\view\adminhtml\templates\tab\customer_view.phtml <?php $buttonTitle = __('Invalidate Quotes');?> <div class="fieldset-wrapper customer-information"> <div ...
1
vote
1answer
424 views

Magento 2: Abstract Controller class is not being override

I am trying to override an abstract class vendor/magento/module-sales/Controller/Adminhtml/Order/Create.php using di.xml but it is not working. I need to do some changes in method protected function ...
0
votes
1answer
596 views

How to override product attribute Save.php controller using modulein magento 2?

I am trying to create a module in which I am facing some issues to override Save.php Controller as well as save that data in the new table. here is my updated di.xml code, but now after click on save,...
0
votes
1answer
317 views

Magento 2 Custom Admin module 404 Not Found

I have been struggling with this error all day, I have tried all the solutions on Internet, but it keeps showing 404 Error when I click the link on my custom menu. Here is my code /app/code/Vendor/...
2
votes
3answers
438 views

Magento 2: How to get current category id in admin controller

I have made a custom button on category edit page in admin. The button redirects to custom admin controller. I need to fetch the current category id in the controller.
3
votes
1answer
699 views

How can I make my controller return JSON back to my template PHTML

Controller: <?php namespace MyCompany\ExampleAdminNewPage\Controller\Adminhtml\Product; use Magento\Framework\App\Action\Context; use Magento\Framework\Controller\ResultFactory; class Product ...
1
vote
2answers
323 views

How to create controller without creating menu in Adminhtml Magento 2

I have referred below Article to display button in my Configuration page. https://magecomp.com/blog/add-a-button-in-magento-2-stores-configuration-with-custom-action/ In file app\code\Vendor\...
3
votes
1answer
341 views

Magento 2 - How to pass parameter from menu.xml

Is there any way to pass a parameter to controller from menu.xml file? Actual URL : http://127.0.0.1/mg231/admin/vendor/module/index/key/...
0
votes
1answer
271 views

Can't access admin after update Magento 2.3.1

I recently updated my Magento 2.3.0 to 2.3.1, and my site works, but I when I try to go to my admin url I get a 504 error. I have tried clearing my cache, and I tried following advice to clear the ...
1
vote
1answer
298 views

Can we redirect controller to another controller in another custom function rather execute function?

Can we redirect controller to another controller in such a way that previous controller continue its working in its execute method and next controller works render the layout at a same time? and after ...
3
votes
0answers
52 views

Extension works fine on local system but on live instance it gives me error

Can someone please give me some detail about my issue. I am duplicating categories along with the product on my local system it works fine although it takes little more time but works fine on my live ...
4
votes
0answers
40 views

System stuck on a controller on live instance does not return any thing nor redirect

I am duplicating the category tree with products works fine on my system while checking on live instance. scenario Duplicate category and subcategory but not products works fine. Duplicate category ...
1
vote
1answer
109 views

Magento 1.9 custom module for managing admin users in different role

Am working on a custom module for managing admin users in a custom role. Just finished the grid section. I need to edit the listed users, also a add form. I just tried by overriding the 'Mage/...
0
votes
1answer
261 views

Magento2 Admin UI Component: On fileUploader ajax completion in ui component, how can I reload the page it is on?

I have a grid that just shows a collection of a specific table. below is a file upload component that I want to use for CSV upload, that will replace all old collection. Image reference is below: ...
0
votes
0answers
36 views

Magento 1.9 admin menu is going to 404!

I am using custom module to getting tax report. It is working fine on demo site. Below is the etc/config.xml: <?xml version="1.0" ?> <config> <modules> <DS_News> ...
0
votes
0answers
42 views

Custom action won't work?

My Customized controller seems not work. Added new method which suppose to update some values in table, here is my method: public function reorderAction() { Mage::log('=> test',true,'...
2
votes
2answers
139 views

Grid with multiple Resource Models

I'm trying to use one grid for multiple ResourceModels, so far I've got one grid working fine. I can load the grid up fine using http:{}/admin/grid/grid/ However when i create a new route to load ...
1
vote
1answer
648 views

call block from controller via ajax

I call controller function from phtml via ajax, it calls controller function Now i am trying to call block function in controller it is not working Controller code public function __construct( ...
0
votes
2answers
630 views

Registry not working in magento 2

I need to call the controller function from block . in magento 2 i use the registry. In my block i wrote public function __construct( Template\Context $context, \Magento\Catalog\...
0
votes
1answer
729 views

override Magento\Sales\Controller\Adminhtml\Order\Create\Save.php file

How to override Magento\Sales\Controller\Adminhtml\Order\Create\Save.php the file can you please help me out?
0
votes
1answer
58 views

Magento 2 Custom admin module not working

I have created my custom module for order export and this is working fine in my magento 2.5 and magento 2.6 but this OR any other module is installed in my magento 2.2 it will not show in admin and ...
2
votes
2answers
3k views

Fatal error: Uncaught Error: Call to a member function isLoggedIn() on null in

di.xml <preference for="Magento\Catalog\Controller\Adminhtml\Category\Save" type="Modulename\Complexgrd\Controller\Adminhtml\Category\Save" /> Save.php <?php namespace Modulename\...
3
votes
2answers
696 views

Controller function not working after overwrite afterExecute : M2

Di.xml <type name="Magento\Catalog\Controller\Adminhtml\Category\Save"> <plugin name="mymodule" type="Module\Name\Plugin\Controller\Adminhtml\Category\Save"/> </type> ...
0
votes
1answer
631 views

How to get selected Order Ids in block from Sales Order Grid? Magento2

I want to generate PDF of selected orders, Rest of the functionality is complete just wanted to get selected Ids from sales order grid. For now I am getting full list of Orders on clicking my custom ...
0
votes
2answers
1k views

How to create custom pdf on controller action using TCPDF in magento 2

I have added TCPDF as follows: Downloaded TCPDF library from https://github.com/tecnickcom/tcpdf and place at magento2.0/lib/internal/TCPDF Renamed tcpdf.php to TCPDF.php Opened TCPDF.php and change ...
2
votes
2answers
8k views

magento 2 redirect url with parameters from controller

I am trying to redirect to a different controller from one controller . I also want to set an Url parameter along with the redirect. But this is throwing me an error Uncaught Error: Call to ...