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
2answers
2k 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
52 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
516 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
2k 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\...
1
vote
2answers
1k 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
104 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
629 views

Magento 2 Programmatically set theme for specific stores

Programmatically How can set a theme for specific stores in Magento 2.1
3
votes
5answers
3k 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
36 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
74 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
1k 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
139 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
479 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
228 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
104 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 ...
2
votes
1answer
295 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
296 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
4k 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/...
4
votes
1answer
2k 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
408 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
431 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
3k 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
505 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
53 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
21 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 ...
4
votes
1answer
2k 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\...
1
vote
4answers
3k 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
105 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 : ...
0
votes
2answers
409 views

Magento2 : new admin page controller issue

In order to add a new admin page, I follow this tutorial : in the routes.xml, If I use as it is said the module name for id and frontname, I get an error when I try to access magento2 backend ...
0
votes
1answer
656 views

Adminhtml - NULL in saveAction() form

I'm creating a new admin module, when i click on save button in my form, he calls saveAction with all paramaters fields but he saves me NULL value. I think that the problem comes from saveAction() but ...
0
votes
1answer
39 views

Why does my view page not load in Admin Panel?

I need your help to figure out why my form isn't loading in the Admin Panel. I currently just get the error: Fatal error: Call to a member function setData() on a non-object in /home/makeyou/...
0
votes
0answers
35 views

how to get selected categoryIds in magento 2?

I want to get selected categoryId to save it : $productObj->setCategoryIds(selectedCategoryId); $productObj->save();
0
votes
2answers
1k views

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> <...
5
votes
1answer
363 views

Magento 1: adminhtml controller rewrite and module dependencies

Explanation So I have a module, I'll call it Hello_World with the following code in config.xml <admin> <routers> <adminhtml> <args> &...
0
votes
1answer
2k views

magento2 admin : generate controller url for form action

On a Magento2 admin page (order/view) I added a form using phtml file with block. I would like to define my form action to my controller url : www.xxx.com/admin_toto/foo/bar/index How can I generate ...
1
vote
3answers
3k views

Magento2 : admin controller not working

i created a button in the order/view page in magento2 backend, and would like to call a controller when button in clicked. In my module, I added : etc/adminhtml/routes.xml <?xml version="1.0" ?&...
1
vote
1answer
833 views

how can I append custom block to head in adminhtml controller action

I was trying to add a block to the head in magento backend for a specific controller action. public function updateAction(){ $block = $this->getLayout()->createBlock( '...
0
votes
1answer
42 views

magento edit not working in admin form

I try to add new Form Every filed save properly in database <?php class MPS_Gallery_Adminhtml_GalleryController extends Mage_Adminhtml_Controller_action { protected function _initAction() ...
0
votes
1answer
416 views

Template for custom admin panel tab

I've created a module which creates a custom tab in the admin panel but I've not been able to display the required data.` This is my config.xml file Path: app/code/community/Rohan/...
3
votes
5answers
10k views

Magento 2 custom Admin controller redirect to Dashboard

I am trying to add a new Admin Menu in Magento 2 for first time. I followed these tutorials: https://www.mageplaza.com/magento-2-module-development/create-admin-menu-magento-2.html https://www....
1
vote
2answers
567 views

Magento 2 - custom admin menu > access denied

i have this controller News\LatestNews\Controller\Adminhtml\News.php and if i comment this protected function _isAllowed() { // return $this->_authorization->isAllowed('News_LatestNews::...
3
votes
4answers
8k views

How to send ADMIN AJAX request?

I need to retrieve some information from my custom admin controller using AJAX. But when AJAX is used I get current page's entire HTML ! I simply want to get some JSON data from my custom ...
1
vote
1answer
281 views

Overriding local controller with own new local controller

I've added some functionality to the Amasty_Xcoupon module, but after upgrading from v1.0.6 to 1.1.6, the codepool of the module changed from community to local. This somehow results in my controller ...
3
votes
1answer
1k views

Magento 2 admin form controller error

So i have a controller to access form with structure like this: Controller>Adminhtml>Preferences>NewAction.php but when i try to acces /preferences/new, it gives me an error like this: Fatal ...
0
votes
1answer
108 views

Why does magento wait for a request to complete before processing others?

I have added a script to an admin page on a magento site to initiate a long running process and periodically query the progress using AJAX (or XHR) requests so that it can update a progress bar. The ...
0
votes
1answer
171 views

Magento grid _addButton that filters collection from the controller. How?

we have a grid where we add a button. It triggers the shownewonlyAction in the controlller. But I have no idea how to set a filter (or even reset all filters) in the controller shownewonlyAction (). ...
0
votes
0answers
539 views

Magento 2.0 Pass custom input in phtml to controller

I want pass an input data from phtm file to controller. I create a js file and I can get the value of input that I want pass but how I pass this value to controller only with JavaScript (no Jquery). ...
1
vote
2answers
201 views

Fatal error: Call to a member function Fatal error: Call to a member function setRecipeProducts()

I am getting the error in my custom admin module - Fatal error: Call to a member function setRecipeProducts() on a non-object in C:\xampp\htdocs\sample\app\code\local\Sigmasolve\Recipe\controllers\...
0
votes
1answer
37 views

Override Admin Controller - All Url paths included - Magento 1.7

I want to override this specific controller file: (app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php) I created a custom module with the following files and their contents: ...