Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
54 views

when iam paasing arugment to helper from controller iam getting error magento 2.3

Iam Getting the below error Recoverable Error: Object of class Magento\Framework\App\ObjectManager could not be converted to string in /var/www/html/development/amt/app/code/vendor/...
Sabareesh's user avatar
  • 358
1 vote
2 answers
177 views

Get product views in Controller

If anyone could help me. My curent value that I get is '0' in my controller: foreach($productCollection as $product) { $_helper_views =$this->helper_views->getProductCount($...
BartZalas's user avatar
  • 1,777
0 votes
1 answer
766 views

Cannot call my custom Helper Class. Magento 2

I'm trying to call my custom Helper class in Controller but when I call the function of my helper in Controller it gives me Fatal error: Uncaught Error: Call to undefined method Magento\Backend\Helper\...
Asad Khan's user avatar
  • 1,486
1 vote
2 answers
785 views

Magento2 - accessing helper in controller

I have helper class that has constructor that takes following parameters: Context, Cart, Session, CollectionFactory. It derives from \Magento\Framework\App\Helper\AbstractHelper. I would like to use ...
Mister Paszczakowski's user avatar
0 votes
1 answer
808 views

How to call controller action from helper?

Is it possible to call my controller action from a helper? I have a controller action in app\code\local\Fekete\Newsletter2Go\controllers\IndexController.php public function apiAction() { echo "...
Black's user avatar
  • 3,431
1 vote
3 answers
2k views

How to call helper class in controller magento 2?

I have a helper class with parameter as shown below. I need this function to work on a specific controller. But returns this error. My helper Code below <?php namespace Rk\Wallet\Helper; class ...
Ramesh KR's user avatar
  • 886
0 votes
1 answer
2k views

How can I get the products list block using getLayout()->getBlock()?

How can I get the block containing all the products using getLayout()->getBlock()? (or with another method, as long as I get the block). And also - is there a list with all the options I can ...
Ronen Ness's user avatar
2 votes
1 answer
667 views

why magento use complicated method?

<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate"> and <form action="<?php echo $this->getUrl('customer/account/createpost'); ?>" ...
Vaibhav Ahalpara's user avatar
0 votes
1 answer
3k views

Access input field values from form template in helper/controller classes

In a Magento checkout template there is a html tag for payment form: <ul class="form-list" id="payment_form_testmethod" style="display:none;"> <li> <input class="checkbox" ...
Qwerty's user avatar
  • 101