Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [admin-controller]

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

1
vote
2answers
44 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 ...
0
votes
0answers
16 views

Show Model PoPuP after executing massAction in Magento 2?

I have a custom massAction after executing the function I need to show the model popup. In my case, I am sending the multiple requests to web service and storing the array of messages if I use below ...
1
vote
1answer
22 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
51 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\...
-1
votes
0answers
8 views

Multiple forms on same url

I am new to Magento forms. I have used Magento module creator to make a new model, with grid to display items and edit form. I want to add a second tab to the edit/new form, but I want it to use a ...
0
votes
0answers
33 views

Magento 2: Saving Customer Attribute Logs Admin User Out

I am working on a Magento 2.2.6 site. I've migrated the data from a Magento 1.9 site and everything is working fine, apart from customer Attributes. We are using Amasty Customer Attributes module to ...
0
votes
1answer
38 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
34 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 ...
0
votes
0answers
115 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
51 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
0answers
37 views

Sending HTTP request to admin controller

I am currently writing a module that requires sending a HTTP request to a controller in the AdminHtml folder. When ever my request hits the controller it is returning raw html and not returning the ...
0
votes
1answer
80 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
1answer
184 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 ...
1
vote
1answer
288 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 ...
0
votes
0answers
43 views

How to output PDF file to browser from a controller

I have created a custom controller. I need to send a pdf file as output, not as a downloadable file, but directly to a browser. Currently in my controller I have the following code $resultFile = $...
4
votes
2answers
177 views

Magento 225 :Notice: Array to string conversion

When I try to create a new record in my custom module I get the below mentioned error Something went wrong while saving the item.Notice: Array to string conversion in /opt/lampp/htdocs/...
0
votes
0answers
12 views

2 Different keys are being genereated, Admin Grid action column-> edit link and page created after clicking save and continue butotton

I have created a Module, I created an admin grid and crud operations. All are working fine when I disabled secret key form store configuration. In show secret key in url my Edit action and Delete ...
4
votes
1answer
238 views

Magento 2 Blank Layout Page

I tried to create a new tab in customer edit backend. First i create the app/code/Namespace/Point/view/adminhtml/layout/customer_index_edit.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
2
votes
1answer
73 views

Magento2 make simple afterSave action plugin of custom module

I am trying to create afterSave plugin for my admin form save action controller of my custom module. The purpose of this is to save some data into second table once all data completely save in first ...
0
votes
2answers
50 views

How to pass value from controller to /resourceModel/Collection.php class

There are two table t1 and t2 t1 id, name 1, abc 2, pqr t2 id, t1_id, phone 1 , 1 , 7894561230 2, 1 , 7894645125 3, 2, 7445582145 I am having two grids, grid 1 showing the first table. Now if i ...
2
votes
1answer
347 views

Magento 2 | Add Admin Configuration Button Action

I need to call a method from an admin configuration button. This is my simple custom module. The button appear on admin but notthing appen on click. No log is write. I cannot understand what I am ...
0
votes
2answers
258 views

Retrieve Values passed in Ajax Magento 1.9

After making the ajax call, i try to recover the values, but returns null this is function inside controller public function checkAction() { # Retrieve value //$checkbox = Mage::app()-&...
1
vote
1answer
29 views

Can I make separate controller for AJAX actions? (Magento 1.x)

I have my custom module and everything works fine, but I would like to create separately controller for AJAX actions (AjaxController). Currently I Have only IndexController. Everytime I get: {"error":...
2
votes
0answers
132 views

Magento 2 adminhtml layout.xml not loading

The Controller File works fine, die('dasdsa') works. But i am not getting any result on the Backend Page except the Title Change within the Controller. I Guess it's just something simple :X Classy/...
1
vote
1answer
330 views

Magento 2.2.5: Overriding Admin Controller sales/order

I need to override Admin sales/order/index controller, but still getting 404. Below the Steps I take to override - Created My Custom Module app/code/A2bizz/Order/registration.php <?php \Magento\...
0
votes
2answers
495 views

Fatal error: Uncaught Error: Call to undefined method getDirectoryRead()

I have a controller that works and does what i need it to do if i manually add a path like: $mediaImages = '/magento/pub/media/images/'; But i cant get the DirectoryList injection to work, it returns ...
1
vote
0answers
34 views

Code refactor : replace model with repository

I am trying to refactor code of app/code/Magento/Cms/Controller/Adminhtml/Page/Delete.php by replacing \Magento\Cms\Model\Page with \Magento\Cms\Api\PageRepositoryInterface and removing direct use of ...
0
votes
1answer
113 views

Magento 2 Programmatically set theme for specific stores

Programmatically How can set a theme for specific stores in Magento 2.1
1
vote
4answers
650 views

“Visible Section not found” at backend login in Magento 2

When I switch the store to a specific domain https:// example.com (secure & unsecure), I get the error "Visible Section not found" when trying to log into the backend. The funny thing: as soon ...
0
votes
1answer
26 views

Extending Core Controller without Custom Module

I want to extend a core controller: app\code\core\Mage\Adminhtml\controllers\CustomerController.php I simply want to customise the one of the functions. I have created the following file: app\code\...
4
votes
1answer
59 views

Add order status while placing order from admin Magento 1

I want to add a custom dropdown for the order status in the create an order page from admin. Admin can choose the order status while placing the order. Please see attached screenshot!!! Or Can i set ...
0
votes
1answer
257 views

Admin form action to another admin controller can not reach

In Magento2, I create a form by phtml file in admin, but when I submit it, it always redirect to admin homepage, not reach another admin controller, how to fix it? I guess the problem is in the ...
1
vote
0answers
70 views

Magento2 backend Reorder issue

I need to display the Order custom attribute values in magento2 admin re-order page. I tried the code like $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $session = $...
3
votes
2answers
114 views

predispatch on a adminthml controller

I am using magento 1.7. I would like to have a event before the call of this method Mage_Adminhtml_Sales_Order_CreateController save. I tried to do it like this : Config.xml : <adminhtml> ...
1
vote
2answers
70 views

Class vendorname\modulename\Model\ResourceModel\Wishlistnotifcation\CollectionFactory does not exist

I am creating admin grid and show data on admin grid using ui component. i have created model resource model and collection. view\adminhtml\layout\notification_notification_notification.xml <?xml ...
1
vote
2answers
102 views

About Admin Side I have a template file in which I have a form submission

In the admin side, I have a template file in which I have a form submission. On form submission, an action would be executed, but it is redirecting to dashboard. can anyone have any idea, how to ...
0
votes
1answer
104 views

Admin user save controller not called

I am trying to add an image to each admin user. I have added a form field with a plugin: namespace Vendor\UserImage\Plugin\Block\Adminhtml\User\Edit\Tab; class Main { /** * Get form HTML * ...
0
votes
1answer
144 views

Magento 2 admin user role not custom menu

Hi my custom menu not showing admin user role. etc/adminhtml/menu.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...
1
vote
3answers
1k views

Magento 2: Error 404 on ajax request

I checked this and built a Controller that executes an ajax request sent on adminhtml through a button, but I get an error 404 on my console. POST http://myurl/system_config/customAjax/key/...
3
votes
1answer
575 views

Magento 2: How to submit custom html content from ui_form to controller?

I am developing a module using ui_form. I have developed ui_form and on submit it post all fields except custom html fields. For example: <container name="pl_labelposition" > <...
2
votes
0answers
233 views

I want to upload image in each static block of magento

I have not much expertise in magento so please pardon me if i am doing pretty much wrong. I am using Magento ver. 1.9.3.2 I want to add a new image field in magento static block. I want to use this ...
0
votes
1answer
352 views

Redirct to previous url & redirect from controller not working on https server

Here is button for controller action $block->addButton('generate_label', array( 'label' => Mage::helper('sales')->__('Generate label'), 'onclick' => "...
0
votes
5answers
1k views

Custom admin menu redirecting to dashboard in Magento 2

I have created custom admin menu but when clicking on the menu it is redirecting to dashboard. Here is the xml within etc/adminhtml/menu.xml : <?xml version="1.0"?> <config xmlns:...
1
vote
1answer
297 views

only template Controller

I'm working on a module in the admin part but can someone tell me please how I can load just my template from my controller without the admin menu in the left, the title and the footer. here is one ...
0
votes
1answer
47 views

controller is not overwriting in adminhtml. I have added in di.xml

Controller File: <?php /** * * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ namespace Sm\Ordertype\Controller\Adminhtml\Invoice\AbstractInvoice; ...
0
votes
1answer
18 views

Admin form using same Action Method for both?

Magento 1.7 In the Admin Panel under System-->Permissions-->Users When I click on a User OR "Add New User" and I right click and inspect element I see the following for both: They both share the ...
3
votes
1answer
1k views

Ajax not working in Magento 2 admin

I'm using ajax in Magento 2 admin. But it not working. My controller: class CustomAjax extends \Magento\Backend\App\Action{ protected $resultJsonFactory; public function __construct( \Magento\...
0
votes
2answers
484 views

Can't access magento 2.1.3 admin getting some error

While trying to access the admin panel i got following error. This was shown up from yesterday up to that time i don't have any issue 1 exception(s): Exception #0 (Magento\Framework\Exception\...
0
votes
2answers
54 views

How use the default Magento's 'saveAction'

I want to change the $product->save(); for the saveAction Magento use's when you push the button in the admin. I don't know why, but with the first doesn't save it equal. I need to don't go or be ...
0
votes
2answers
2k views

Admin controller throws 404 page not found for my custom extension

I am creating a custom extension with Magento 1.9.0.1 but got stuck in admin controller as my admin controller throws 404 page not found error. Any help would be appreciated. Below is my code : ...