Questions tagged [helper]
Denotes question regarding Magento Module Helper
27 questions
16
votes
3
answers
28k
views
Magento : Fatal error: Class 'Mage_Giftcards_Helper_Data' not found in …/app/Mage.php on line 546
I have installed one module extension which throws an fatal error
"Fatal error: Class 'Mage_Giftcards_Helper_Data' not found in ..../app/Mage.php on line 546" in admin.
I have reffered this link ...
27
votes
5
answers
29k
views
Instantiating Helpers in Magento 2
The latest builds of Magento 2 have done away with the Mage class. This mean we've lost the Mage::helper method.
Is there a replacement technique (helper factory?) for instantiating helpers in ...
24
votes
2
answers
32k
views
Creating a custom helper class in module
I've made a new module called test_helper and I want to create a helper class in this module so that I can add custom functions to be called all over my site.
I can't however seem to find any ...
22
votes
6
answers
18k
views
What is helper in Magento?
What is helper in Magento?
In what cases should one use and not use helpers?
3
votes
2
answers
11k
views
Issue with getting product image
Consider the example code found in my own block file:
public function getImages()
{
$images = array();
$products = Mage::getModel('catalog/product')
->getCollection()
->...
10
votes
1
answer
25k
views
How to add a custom helper in my module?
How to create new Helper or override/rewrite Core Helper in Magento 2 module?
I tried adding dependency into my module.xml of Custom Module, but it doesn't load Helper class at all.
Below is my ...
19
votes
9
answers
57k
views
How to call helper method in .phtml file
Trying to develop something in magento 2. But, I didn't find how to call a Helper method in template(.phtml) file.
I want a replacement of below code:
$this->helper('modulename/helpername')->...
10
votes
3
answers
5k
views
Magento 2: proper use of helpers
I'm starting to see more and more people declaring helpers classes in order to be able to use the following in the template files:
$this->helper('Path/To/Helper/Class')->customMethod();
This ...
6
votes
2
answers
3k
views
Multiple Helpers in module
I know that if I add a helper to my module I need to declare it in config.xml using:
<helpers>
<module>
<class>Namespace_Module_Helper</class>
</module>
&...
4
votes
1
answer
619
views
Best way to set up helper declarations using same tag in different modules
My application (CE Magento 1.9) has two extensions, a custom theme and checkout module, that is using the same xml tag which I believe is causing the following error when visiting the site:
Fatal ...
0
votes
2
answers
3k
views
Extend multiple classes from single helper
I have installed two third-party modules and one local module. I want to rewrite/ extend the Helper/Data.php of both third-party modules. Currently, I'm trying to do this from my local module's Helper/...
0
votes
1
answer
1k
views
How I can get string truncate method in Magento 2 like Magento 1?
In Magento 1 I use:
Mage::helper('core/string')->truncate($string, $length, '...', $remainder)
How I can use a native method to truncate strings in Magento 2?
10
votes
5
answers
12k
views
SodiumChachaIetf::decrypt() must be of the type string, boolean
I did migration Magento 1 to Magento 2.3.0 all is good but when I create customer form both of side (front and admin) I got the error related to decrypt even I can not edit the customer when I click ...
9
votes
4
answers
8k
views
Helper vs Model? Which should I use?
I am working with the Instagram API in magento. I am giving coupons to my instagram followers if they follow our store on Instagram.
I am making the API calls to instagram in PHP using curl. ...
6
votes
2
answers
2k
views
Magento 2 - What does the AbstractHelper do, and is it required?
All of the tutorials I'm looking at pretty much say the same thing. To add a helper, just add the following code:
<?php
namespace YourName\YourModule\Helper;
class ClassName extends \Magento\...
3
votes
2
answers
4k
views
Override Extension Helper
I'm trying to override a part of an helper of Help Desk MX extension.
So I created a module with the following file:
app/etc/modules/company.xml
<?xml version="1.0" encoding="utf-8"?>
<...
3
votes
2
answers
16k
views
Referencing a helper class
I am trying to write a helper class for my module. The helper class will provide two methods with various functionality. Can I put this helper class beside the other helper class in my .../Helper/Data....
2
votes
2
answers
5k
views
Use a helper in a layout
I want to call a helper in the main layout of my website.
I added this within the part of the layout :
<action method="addLink" translate="label title">
<label>About us</label&...
1
vote
1
answer
200
views
How to instantiate an helper class from my custom module in a test program in the directory at the same level as the root of Magento?
With the code below, I'm trying to instantiate an helper class from my custom module.
// Sanitize the $_GET[] value
// Create an object of the order loaded with the $order_id passed as query string.
$...
1
vote
3
answers
3k
views
Magento 2 - Accessing a helper without using constructor injection
Is there a clean way to initiate and access a custom helper without using the constructor? Currently I instantiate the custom helper using the constructor of the model as shown here as the accepted ...
1
vote
4
answers
5k
views
Fatal error: Class 'Mage_Rms_Helper_Data' not found in C:\wamp\www\app\Mage.php on line 546
I realize there are questions just like this one, but none of the answers apply to me so far.
I am building a custom module that works, except the helper class won't load. I'm calling it with Mage::...
1
vote
1
answer
540
views
List.phtml load external file with php does not work (missing helpers)
Inside our list view I want to load an external php file.
The file is displayed, but when loading the php code, the page break down.
When I place the php code inside the catalog/product/list.php it ...
1
vote
2
answers
1k
views
How to use 'catalog/image' helper class features and Magento cache for non product images?
I know image helper class in catalog module serves good features for image related options like aspectratio, resize, frame etc.. .
My Question is i have images like customer profile image and store ...
0
votes
0
answers
86
views
How to write google business review API in custom module and call into phtml file
What is the best approach to write google business review API in custom module and call inside the custom phtml file,
Eg Code:
<?php
$accountId = 'your_account_id';
$locationId = 'your_location_id'...
0
votes
3
answers
569
views
Extend Mage_Sales_Helper_Data doesn't work
I would like to add a function in Mage_Sales_Helper_Data without editing or copy of the original file. So I try to extend it, but this code doesn't work
I have created a config.xml in this folder app\...
0
votes
2
answers
2k
views
Uncaught Error: Call to a member function getId() on null in [closed]
I have some problem about this error, who can tell me why? Thank you!!
Fatal error: Uncaught Error: Call to a member function getId() on null in
0
votes
2
answers
1k
views
Class not found error while extending core helper
I am trying to extend the core helper class But found the below error..
Fatal error: Class 'Mage_Kishore_Kp_Helper_Data' not found
Below are the path of my files..
1. app/etc/modules/Kishore_Kp....