Skip to main content

I need Full Action Name in Ajax Controller Magento 2.

protected $request;
public function __construct(
    ...
    \Magento\Framework\App\Request\Http $request
) {
    
    $this->request = $request;
}

$action = $this->request->getFullActionName();

This always giving me my ajax controller full action name.

I need  ,suppose suppose if iI m on the product page this should give me "catalog_product_view"  .

If iI m on search this should display "catalogsearch_result_index".

Please help.

I need Full Action Name in Ajax Controller Magento 2.

protected $request;
public function __construct(
    ...
    \Magento\Framework\App\Request\Http $request
) {
    
    $this->request = $request;
}

$action = $this->request->getFullActionName();

This always giving me my ajax controller full action name.

I need  ,suppose if i m on product page this should give me "catalog_product_view"  .

If i m on search this should display "catalogsearch_result_index".

Please help.

I need Full Action Name in Ajax Controller Magento 2.

protected $request;
public function __construct(
    ...
    \Magento\Framework\App\Request\Http $request
) {
    
    $this->request = $request;
}

$action = $this->request->getFullActionName();

This always giving me my ajax controller full action name.

I need, suppose if I m on the product page this should give me "catalog_product_view".

If I m on search this should display "catalogsearch_result_index".

Please help.

Became Hot Network Question
edited body
Source Link
Deepak Rai
  • 1.2k
  • 3
  • 26
  • 48

I need Full Action Name in Ajax Controller magentoMagento 2.

protected $request;
public function __construct(
    ...
    \Magento\Framework\App\Request\Http $request
) {
    
    $this->request = $request;
}

$action = $this->request->getFullActionName();

This always giving me my ajax controller full action name.

I need ,suppose if i m on product page this should give me "catalog_product_view" .

If i m on search this should display "catalogsearch_result_index".

Please help.

I need Full Action Name in Ajax Controller magento 2.

protected $request;
public function __construct(
    ...
    \Magento\Framework\App\Request\Http $request
) {
    
    $this->request = $request;
}

$action = $this->request->getFullActionName();

This always giving me my ajax controller full action name.

I need ,suppose if i m on product page this should give me "catalog_product_view" .

If i m on search this should display "catalogsearch_result_index".

Please help.

I need Full Action Name in Ajax Controller Magento 2.

protected $request;
public function __construct(
    ...
    \Magento\Framework\App\Request\Http $request
) {
    
    $this->request = $request;
}

$action = $this->request->getFullActionName();

This always giving me my ajax controller full action name.

I need ,suppose if i m on product page this should give me "catalog_product_view" .

If i m on search this should display "catalogsearch_result_index".

Please help.

Source Link
Deepak Rai
  • 1.2k
  • 3
  • 26
  • 48

How to get Current Module and Full Action Name in ajax controller

I need Full Action Name in Ajax Controller magento 2.

protected $request;
public function __construct(
    ...
    \Magento\Framework\App\Request\Http $request
) {
    
    $this->request = $request;
}

$action = $this->request->getFullActionName();

This always giving me my ajax controller full action name.

I need ,suppose if i m on product page this should give me "catalog_product_view" .

If i m on search this should display "catalogsearch_result_index".

Please help.