New answers tagged controllers
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 ...
-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....
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"?>
<...
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 /...
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() // ...
Top 50 recent answers are included
Related Tags
controllers × 969magento2 × 393
magento-1.9 × 178
module × 102
overrides × 86
blocks × 73
ajax × 73
magento-1 × 45
layout × 41
admin × 40
magento-2.1 × 37
magento-1.8 × 36
adminhtml × 35
redirect × 35
php × 33
admin-controller × 31
product × 29
routing × 29
magento-1.7 × 28
template × 28
forms × 28
event-observer × 27
magento2.3 × 26
url × 26
model × 25