Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [action]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
34 votes
5 answers
58k views

Magento 2: How to get controller, module, action and router name?

Magento 2: How to get controller, module, action and router name?
Bhavik's user avatar
  • 1,240
13 votes
5 answers
10k views

Why can't I inject the ProductRepositoryInterface in Magento 2?

I have a controller action into which I would like to inject the product-repository namespace Nosto\Tagging\Controller\Export; use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Store\...
Mridang Agarwalla's user avatar
9 votes
1 answer
7k views

What are the Dispatch/Execute() functions and how do they work?

I would like an explanation of the dispatch and execute functions, the differences between them, when they are/should be used and how. Please limit your answer to Magento 2
LM_Fielding's user avatar
  • 1,533
7 votes
2 answers
2k views

AccountController override not working on new Action and doing 302 redirection

I am try add new action on AccountController Now: AccountController is override properly But it is whenever hit new Action (ajaxLoginPostAction) is redirect to 302. I add ajaxLoginPost() as open ...
Amit Bera's user avatar
  • 77.5k
5 votes
4 answers
7k views

Magento 2: Admin Action Logging Not able to Found

I'm using Magento 2 Comminity Edition Version 2.1.2. Need to configure Admin Action Logging. https://www.mageplaza.com/kb/how-to-configure-action-log-magento-2.html Not able to found.
Jackson's user avatar
  • 9,929
5 votes
2 answers
6k views

Change block's template in layout XML

How to change block's template in layout XML? I tried the solution proposed in this thread: <referenceBlock name="copyright"> <arguments> <argument name="template" xsi:type=...
maginfortis's user avatar
5 votes
3 answers
2k views

Custom module dynamic action controller

Each controller I need to define how many action can be like saleAction() , productAction() something else. But I want to make a action who receive all action like ......Action() It's receive all ...
Abdus Salam's user avatar
4 votes
1 answer
922 views

Magento2 :How To Use Form Key In Frontend Grid Using Ui Component

When i try to perform massdelete action from frontend grid using uicomponent than it has throws invalid form key error. Does anyone know how we can use form key in frontend grid ?
Sanjay Shiyal's user avatar
4 votes
2 answers
167 views

Is the column `Action` very important?

Is the column Action very important to being displayed in admin grids? It is actually doing exactly the same thing as "click on selected row" a'm I right ? So if I hide it will it affect anything ? ...
Rob D. A.'s user avatar
  • 867
4 votes
1 answer
1k views

How are pages such as customer account login protected?

I'm looking through controllers, routes, sections, observers... and I can't find the method for protecting a page from non-logged in customers. How is this done officially? I may have found an ...
LM_Fielding's user avatar
  • 1,533
4 votes
2 answers
2k views

Add new action to existing module, routing

I am trying to add a new action to the existing module Magento_Customer. My module has the following namespace Custom_AccountReferral I need to add a new action customer/account/referral/ I have ...
solderingiron's user avatar
4 votes
1 answer
893 views

How to use _redirect() method in Magento 2 model file

Magento\Framework\App\Action Redirect method is defined in Magento controller interface /** * @var \Magento\Framework\App\Response\RedirectInterface */ protected $_redirect; So i am aware about ...
Aditya Shah's user avatar
  • 7,617
3 votes
3 answers
1k views

Magento2 : admin grid action column position deviation

When I select multiple columns, the action is in the wrong position
Thiển Phạm's user avatar
3 votes
1 answer
3k views

Send Email and Save Data to database table with custom form

I have created the module with a form in front end on submit it send email and its working fine, now i also want to save the current form data to a Database table and keep the email functionality too ...
Xabby's user avatar
  • 529
3 votes
0 answers
1k views

admin grid action with popup modal

<actionsColumn name="actions" class="Vendor\Module\Ui\Component\Listing\Column\SelectActions"> <argument name="data" xsi:type="array"> <item name="config" ...
HaFiz Umer's user avatar
  • 1,661
2 votes
2 answers
1k views

Getting information about a request using HttpGetActionInterface

I'm in the process of removing the deprecated Action implementation from my controllers in favor of the ActionInterface implementations. With the old extension approach of the Magento\Framework\App\...
Hurrpadurr's user avatar
2 votes
3 answers
7k views

Magento 2 admin menu action result Invalid security or form key. Please refresh the page. on click

I have succesfully added a new admin menu. But the problem is whenever i clicked the admin menu button, I got Invalid security or form key. Please refresh the page. Here're some of my codes. This is ...
Daniel_C's user avatar
2 votes
1 answer
1k views

Issue with edit Option in Action column admin grid

While Creating the admin grid the action column remains empty and the Edit option is not visible. How to resolve this issue. This is my Ui_Component file (action section) <actionsColumn name="...
Naiwrita09's user avatar
2 votes
1 answer
347 views

How to execute custom controller action for product in magento2?

I would like to write some custom code product actions in a controller is executed. When I have click on the product than showing multiple brands and after that click on brand then show product ...
Devidas's user avatar
  • 3,358
2 votes
1 answer
199 views

How to create Delete function in My Order page

I want to add a new action in My Orders page that is Delete action How can I do that? Can anyone help me with this function?
Kite Hany's user avatar
  • 235
2 votes
2 answers
2k views

Redirect Form Action to Controller (404 error on form submit)

I'm new to Magento. Need to create an extension which will enable to add comments to products on 'product view' pages. I created a new tab next to "descriptions" and "reviews" and added the form, but ...
bestwebdevs's user avatar
2 votes
2 answers
2k views

Using CURL to call controller action

I am generating an excel report which takes around 10-25mins based on user selection. Page is served to admins only. When user presses export button after selecting filters, I am trying to call ...
F-Z's user avatar
  • 55
1 vote
6 answers
4k views

Edit Action column is not showing in admin grid in magento 2

Why the edit option is not displaying in the action column. Kindly help me. My Action.php code: <?php namespace AdminGrid\Grid\Ui\Component\Listing\Grid\Column; use Magento\Framework\View\...
Kowsigan Atsayam's user avatar
1 vote
2 answers
2k views

Custom action logging in Magento 2 EE

I'm trying to find out how to add custom event logging in the Magento 2 admin to log actions taken by our employees. One of the reasons we've upgraded to the Enterprise edition is the addition of ...
Merijn's user avatar
  • 152
1 vote
1 answer
2k views

Add or remove product to given websites using product_action model

The following example sets price and name of product only for given store ID: $product = Mage::getModel('catalog/product'); //Load product 100 from store 2 $product->setStoreId(2)->load(100); ...
Politechniczny's user avatar
1 vote
3 answers
836 views

Magento 2 - Custom Grid Action 404 error Add Action Throws 404 Error

i Develop Simple Crude Operation Module That Throws 404 etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
Jay Parmar's user avatar
1 vote
2 answers
2k views

Form Submission not loading correct url

UPDATED-3 I have added a new page to front end, as you can see Adding new page to Front end, by fixing some issues, it is working now. but the issue I am facing now is in my from <div id="...
Abdul Ghaffar's user avatar
1 vote
1 answer
824 views

how to return the user to the previous page when a span is clicked

When a user clicks a specific button i'd like it to return the user to the previous page visitied. Is this possible?
easymoden00b's user avatar
  • 1,277
1 vote
1 answer
1k views

Magento 2 - Add Product Edit link grid action but it shows in the Grid total row

I add the product edit link in grid action by using following code Path of my grid file: app\code\Vendor\Module\Block\Adminhtml\Abcreport\Grid.php $this->addColumn('action', array( ...
Magedev2301's user avatar
1 vote
2 answers
447 views

How to remove the action of a menu.xml item?

I have a menu.xml like this: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu....
fudu's user avatar
  • 1,288
1 vote
2 answers
2k views

How to give onclick event for admin grid action link

I have a custom admin grid for return items. For which I need to add a popup to add a comment for every action below I have written a js function for the modal popup. But I am unable to trigger ...
sushanth's user avatar
1 vote
3 answers
4k views

Magento 2. Grid Action column link open in new window

I've successfully created an admin grid using ui components. I've successfully added an actions column with a link. The link works but I want it to open in a new window or tab. excerpt from ...
vitoriodachef's user avatar
1 vote
1 answer
1k views

Mage2 - Custom Grid Action 404 error

I have create a custom admin grid for my blog module but "Add New Post" get a 404 page etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
Altravista's user avatar
1 vote
1 answer
1k views

Admin custom page form action not working

I have create custom page in admin. Here am trying to save the some data to database. I have doubt in form action this my code .phtml <form action="<?php echo Mage::helper("adminhtml")->...
Ramesh S's user avatar
  • 1,235
1 vote
2 answers
277 views

Magento getAction() not work on 1.7.0.2

Hello is there any alternative condition for below condition. I'm using Magento 1.7.0.2. $action = Mage::app()->getFrontController()->getAction(); if ($action->getFullActionName() == '...
Ketan Borada's user avatar
  • 2,613
1 vote
1 answer
651 views

Custom module, controller action trigger

I am developer, new to magento, and I just took over a project from another dev team so the code is totally strange to me. They built a custom module, and I have trouble figuring out when/where a ...
odin's user avatar
  • 11
1 vote
1 answer
248 views

sending information from one controller to another

I am hoping to link together some controller actions if a certain quote option is selected. More specifically, when a coupon code is activated and the user wishes to use their gift card I want to ...
easymoden00b's user avatar
  • 1,277
1 vote
3 answers
2k views

Multiple url name and field addcolumn action

I have this code: $grid->addColumn('action',array( 'header' => $this->__('Action'), 'type' => 'action', 'action' => array( ...
Gabriel G's user avatar
1 vote
2 answers
3k views

How to call a controller action inside other Controller in Magento 2.2?

I have a form with text fields and one image file . I want to upload the image and next save the form information in the database. I have two actions : Create and UploadImage. I want to call the ...
Andres's user avatar
  • 113
1 vote
2 answers
445 views

Unable to toHtml a block: Invalid parent block for this block

So, I switched the template of order_info to add some more information by adding a child block to it in adminhtml_sales_order_view. The order account information in the admin is updated correctly, and ...
laketuna's user avatar
  • 6,840
1 vote
2 answers
474 views

How to use controller actions with long names?

I've created a custom module. In controller file the function as bellows. /** * Load slider images */ public function loadImageAction() { $this->loadLayout(); ...
Sukeshini's user avatar
  • 9,955
1 vote
1 answer
26 views

are the two codes same?

I'm starting to learn Magento 2 and I read some instructions to create Controller. There are the index.php. on Magento 2 _ development cookbook and another on website. /** @var \Magento\Framework\View\...
Hoàng Thắng's user avatar
1 vote
1 answer
883 views

Magento how to change action url of contact page

I add contact form in CMS page using this code - <form class="form contact" action="<?= $block->escapeUrl($block->getFormAction()) ?>" id="contact-form" method="post" data-...
Gagan's user avatar
  • 557
1 vote
1 answer
69 views

On order page in action tab want to delete button

In the Sales>Order page on the right side, there is the drop-down option for Actions. In that actions tab, there is the delete option and I want to hide this option from that page. Anyone know how to ...
Neha Khedkar's user avatar
1 vote
0 answers
176 views

How to create custom button in the admin panel form?

I want to create custom button besides Update Quantity with an custom action where when you click on it, it makes the Quantity to refund column as zero on credit memo page. How can we create that? ...
Darshan Jethwa's user avatar
1 vote
0 answers
486 views

magento2 Mass Action to Custom Page in Admin

I have added a custom option to the magento2 admin order action-dropdown in view/adminhtml/ui_component/sales_order_grid.xml. Then I created a custom method Controller/Adminhtml/Order/MassDoSomething....
user3310748's user avatar
1 vote
1 answer
522 views

How to add more actions to a column in Magento grid?

In Magento 1.9 I add a column to Sales Grid using an observer. I want to show more actions instead only one action. With my code, in my column I see a select box, with the two actions. Instead I want ...
Vixent's user avatar
  • 349
1 vote
1 answer
246 views

Controller action not working with external callback

I have a custom payment module where I need a controller for callback to get notified about the payment, but the payment service only gives me the error that the response contains html. Also, in the ...
user1563232's user avatar
0 votes
1 answer
4k views

How to use ActionInterface insted of Deprecated Action class

I start learning magneto 2. I give it a try with Max Pronko's videos. Figure out some of the codes that are outdated, deprecated. Here is my controller. Any suggestion on how to use ActionInterface ...
Isuru Dilshan's user avatar
0 votes
1 answer
2k views

controller action name of module is displaying in frontend

I am trying to find controller action of module for below Observer code, so that i can see those action names in log file : called_action_names.log , its displaying those names in log files. issue : ...
Baby in Magento's user avatar