New answers tagged

1 vote
Accepted

Send Custom Data to Controller

I wrote a public module that you can find here: Simple ajax call with Magento Although this module is old, it shows what seems to be missing in your code. the code is more basic than your code as you ...
user avatar
-1 votes

Magento 2 How create front controller with a specific path?

You can create the Frontend Controller with the specific path by : Create this file: app/code///etc/frontend/routes.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3....
user avatar
2 votes
Accepted

Magento 2 How create front controller with a specific path?

You need to create custom router (matcher) for route to your action controller 1. Define your custom router app/code/Acme/StackExchange/etc/frontend/di.xml <?xml version="1.0"?> <...
user avatar
0 votes

My custom POST Controller return empty response

In general, HTTP responses of 500 will write an error to the Magento log if it is a Magento issue, and will not write to the Magento log if it is not a Magento issue. So first check the log: $ cd /...
user avatar
  • 1,156
0 votes

Constructor for Magento Controller

Kamesh Jungi's answer is correct for both Magento 1 and Magento 2, but it is vitally important to be careful to use the Magento single-underscore pseudo constructor: protected function _construct() // ...
user avatar
  • 1,156

Top 50 recent answers are included