Skip to main content

Questions tagged [helper]

Denotes question regarding Magento Module Helper

Filter by
Sorted by
Tagged with
-1 votes
1 answer
71 views

Magento 1.9 Syntax error | Module conflict [closed]

I had a module conflict so decided to create a "temp" class and use it as a "extender". First check if module is enabled and if it is extend using the "temp" class, if it is not, extend the core class....
Greg's user avatar
  • 2,729
3 votes
1 answer
363 views

Can't access session into admin phtml file on Magento 2

I tried to set a session from a model file and access this on a phtml file like this and it's not working: namespace/vendor/Model/ProcessModel.php: protected $backendSession; public ...
Alin Lupoiu's user avatar
  • 2,672
0 votes
2 answers
12k views

Magento 2 - How to call Helper function via Block

system.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd"> &...
Slimshadddyyy's user avatar
0 votes
2 answers
2k views

Magento2 - Get image url in model/helper

I have a helper class Email under vendor/module/model/helper/Email.php I have to access a image in the module_path/view/frontend/web/images I can't use $this->getViewFileUrl('vendor_module::...
Frank Groot's user avatar
0 votes
1 answer
680 views

`$this->getViewFileUrl` adding en_us to a url

I'm trying to add an image from my theme in template like <img src="<?php echo $this->getViewFileUrl('Vendor_Theme::images/image.svg'); ?>" /> But this url adds en_us. How can I ...
Robot__4's user avatar
  • 119
1 vote
2 answers
1k views

Method returns null / If statement not working

UPDATED: Ok, I just found out my first if in my method isn't working. This one: if ($codigo == null) { # Stuff } else { #other stuff } But I also don't know whats wrong. PREVIOUS: I ...
Stordon's user avatar
  • 166
0 votes
2 answers
170 views

Helper Conflict after update of module

After recent update of a Amasty Shipping & Payment By Customer Groups plugin, it stopped working. After running a conflict check in n98-magerun, I got a conflict like this: Anyone could guide me ...
Greg's user avatar
  • 2,729
0 votes
3 answers
7k views

Magento 2: How to call helper function in Controller

How to call helper function in controller:- I have use below code:- class Index extends \Magento\Framework\App\Action\Action { protected $helperData; public function __construct( ...
Purushotam Sharma's user avatar
0 votes
3 answers
2k views

Create a helper in Magento 2

I am trying to create a helper that i can use from a few blocks i have extended however am getting errors. <?php namespace Vendor\Module\Helper; class Promotion extends \Magento\Framework\App\...
harri's user avatar
  • 5,485
0 votes
1 answer
450 views

Get Child Categories in catalog toolbar.phtml?

I'm trying to get a list of child categories within the toolbar.phtml but unsure how I can achieve this? I have tried to use the category helper but this stops the category pages from loading and ...
lky's user avatar
  • 797
2 votes
1 answer
493 views

Helper data not found

I've this error when I access to any pages of my website Fatal error: Class 'IBP_SocialLinks_Helper_Data' not found in /Applications/MAMP/htdocs/ibp/app/Mage.php on line 547 I searched on many ...
Kpone's user avatar
  • 371
1 vote
1 answer
50 views

How to Instantiate a Magento helper

Is a good practice to instantiate a Magento help in the class constructor? protected $helper public function __construct() { $this->helper=Mage::helper('helper_name'); }
apedic's user avatar
  • 923
0 votes
1 answer
166 views

IWD Store Locator.... Helper Error, No support? [closed]

I've ran into a helper error after installing the IWD store locator extension and after trying their support line for 24 hours and not receiving a response from my email I thought I'd ask the world! ...
AspiringProgrammer's user avatar
0 votes
1 answer
315 views

How can i send and collect data from external sources in magento

i'm pretty beginners in magento. i'm trying to building a test module myself .i need to know how can i send data from magento to external sources for verification(suppose system data) and collect ...
user2366074's user avatar
2 votes
1 answer
2k views

Strange behaviour of app/code/core/Mage/Core/functions.php file

I have Magento 1.9.3.1 CE installed and unaltered in my Uwamp localhost. I was just casually testing some functions from the app/code/core/Mage/Core/functions.php file, by calling those functions in ...
Vicky Dev's user avatar
  • 1,992
2 votes
2 answers
2k views

Magento 2: Helper not working

I am learning how to use dependency injections to get the classes I need. The following will work when creating a controller. ... use Magento\Framework\App\Action\Context; class Index extends \...
Typhado's user avatar
  • 702
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"?> <...
krybbio's user avatar
  • 1,258
0 votes
1 answer
52 views

My magento module is not working [duplicate]

Please help me guys to fix it : Fatal error: Class 'Mage_Parcelamento_Helper_Data' not found in C:\wamp64\www\magento\app\Mage.php on line 547 Error log Warning: include(Mage\Parcelamento\Helper\...
Guilherme Pereira's user avatar
0 votes
1 answer
4k views

Magento 2 : How to solve a message "Recoverable Error: Object of class"?

I've created a simple helper override, with just a constructor method using a var dump. When I try to access the contact page I see a message error like that below. I didn't implement anything just ...
Rafael Corrêa Gomes's user avatar
1 vote
0 answers
43 views

Helper not found and breaks the site

I came across a magento 1 issue where a helper cannot be found and it breaks the website. It happened once I installed my custom extension. I have this helper which is defined in config.xml: ...
user54494's user avatar
4 votes
2 answers
8k views

Loading Helper in Controller

I have a module and I am trying to get my module config data ( from system.xml ) within my module controller. It works when I get it in a template file but not when I try to access it in the controler ...
Barry Connolly's user avatar
3 votes
3 answers
5k views

How to Create Helper Data?

I recently find the custom message based on the total for free delivery Link. I create the module as said @Marius but, I am the new one to Magento so I am unable to create Hepler Data. I don't Have ...
Rajiv's user avatar
  • 179
1 vote
4 answers
440 views

After adding <crontab> in my config.xml

After adding <crontab></crontab> in mymodule's config.xml file I got error: Fatal error: Class 'Mage_Mymodule_Helper_Data' not found in **/app/Mage.php on line 547 in my config.xml ...
P_U's user avatar
  • 808
1 vote
2 answers
147 views

Unable to create user roles Class 'Mage_Notificationmanager_Helper_Data' not found

I have a weird problem when trying to create user roles. It gives me the following error: Fatal error: Class 'Mage_Notificationmanager_Helper_Data' not found in /public/app/Mage.php on line 547 I ...
user3478148's user avatar
0 votes
1 answer
104 views

Cretate helper and use within module

I am trying to create a module with a helper file where I declare functions I can use within my module I have the module working and I have a helper file at : Modzinc/Adminmonitor/Helper/Data.php &...
Barry Connolly's user avatar
1 vote
1 answer
127 views

How to get helper instance on Magento 2.1?

I tested all methods that I found that were reported here all about Magento 2.0, but seems like Magento 2.1 is different, how can I do that?
Rafael Corrêa Gomes's user avatar
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\...
PhilaPhan80's user avatar
0 votes
1 answer
1k views

How to get logo url using a store id in the backend?

I'm trying to get url of the front-end logo inside a custom helper method in the backend, but I get stuck on getting a file using theme model. All I have is: store id, theme id, theme model and a ...
Siarhey Uchukhlebau's user avatar
1 vote
1 answer
127 views

Helper exist but not exist?

Class 'Mage_Amber_Localdev_Helper_Data' not found in /var/www/localdev.site/robert/bsr/app/Mage.php on line 547 is there 100% but won't find it. $this->addColumn('image', array( ...
Rob D. A.'s user avatar
  • 867
2 votes
2 answers
1k views

how do I call function(Helper) from xml in magento

i see this post I want to do the same but with a condition. I want to call an helper function which return a boolean. And in my xml do like : <?xml version="1.0" encoding="UTF-8"?> <...
Kpone's user avatar
  • 371
1 vote
2 answers
1k views

Run a function before a specific page load

I need to run a function that changes a database table value before a specific page loads, this page would be: mysite/index.php/mymodule/account/list/. public function updateTable(){ $id = Mage::...
Rodrigo Domingues's user avatar
0 votes
1 answer
1k views

Magento isLoggedIn() always return false while customer is logged in

I am new in Magento. Using Magento 1.9.2 version i create test.php file in Magento root i which write the code include 'app/Mage.php'; Mage::app('default'); $customerName = Mage::helper('customer')-&...
Suave Umar's user avatar
0 votes
2 answers
372 views

Calling Third Party Extension Function in other Pages

I have a third party extension on Magento 1.9 which has the phtml file to display list of favorite brands for the logged in user. It the phtml file of this extension, it does the following to get the ...
Super Man's user avatar
1 vote
0 answers
56 views

Fatal error: Class 'Mage_Inchoo_Orders_Helper_Data in Magento 1.9?

I am using inchoo order extension in magento 1.9 and it's throwing this fatal error Fatal error: Class 'Mage_Inchoo_Orders_Helper_Data' not found in /opt/lampp/htdocs/vitadeals/app/Mage.php on line ...
Ramkishan Suthar's user avatar
2 votes
1 answer
747 views

Adding custom logic to phtml

Very often it is needed to add some custom logic to templates. For example it can be checking if customer is logged or some information about product - if it's already bought by current customer or if ...
Bartosz Kubicki's user avatar
19 votes
9 answers
56k 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')->...
Gaurav Agrawal's user avatar
3 votes
1 answer
1k views

Magento2.1 Helper; what's the difference between "extend" and "use" of AbstractHelper

In Magento 2 we have to create a lot of data for ourselves using helper-modules. In the Vendor/Example/Helper/Data.php I often see either of these two at the top of the file: use Magento\Framework\...
Asitis's user avatar
  • 1,247
2 votes
0 answers
297 views

Magento 2 image helper with category image url

I want to use helper for category image. Right now I,m getting category image like this : $image = $cat->getImageUrl(); But I want to keep frame to false so how can I do it with category images?...
Kaushal Suthar's user avatar
0 votes
2 answers
337 views

Magento 1.8.1.0 - Class 'Mage_Tag_Helper_Data' not found [closed]

This error comes up when logging into admin dashboard: Fatal error: Class 'Mage_Tag_Helper_Data' not found in /home/kartina/public_html/app/Mage.php on line 547 Line #547: $registryKey = '...
Helmuts's user avatar
3 votes
1 answer
582 views

How to use core helper in magento 2?

I am trying to get core helper in magento 2. In Magento 1, I was using - <?php $_coreHelper = $this->helper('core'); /* @var $_coreHelper Mage_Core_Helper_Data */ ?> Is there any way to use ...
Yudi's user avatar
  • 616
0 votes
1 answer
2k views

Call Block's method in Helper

I have Block class class Abc_AddressManager_Block_Address_Book extends Mage_Customer_Block_Address_Book { public function getAdditionalAddresses() { $addresses = $this->...
Abdul Ghaffar's user avatar
0 votes
2 answers
168 views

Why Magento can't load my Helper?

My Code is generated by magerun, normally it works. I'm confused. I have build an open GIT Repo for checking up my code: https://github.com/webzellentOpenSource/ti-theme Downside you will find the ...
upandfine's user avatar
1 vote
2 answers
38 views

Class Mage_Facebookilike_Helper_Data not found

When i click magento adminpenal's system>configuration The Error will caused..... Fatal error: Class 'Mage_Facebookilike_Helper_Data' not found in C:\xampp\htdocs\magento\app\Mage.php on line ...
Mehul's user avatar
  • 21
0 votes
2 answers
509 views

How get category ID of products on wishlist and compare pages

I want get category ID of products on wishlist and compare page (on wishlist and compare pages I add products of different categories). On the helper of my module I write: Mage::registry('...
Yurii Makoviychuk's user avatar
0 votes
2 answers
101 views

Creating helper object in the same class magento 2

How to create object in the constructor from the same class? <?php namespace Vendor\CatalogSearch\Helper; use Magento\Framework\App\Helper\AbstractHelper; class Data extends ...
Sushivam's user avatar
  • 2,639
3 votes
2 answers
660 views

Equivalent class for Mage_Core_Helper_Abstract in magento2

Helpers in Magento2, What is the equivalent class for the Magento 1 Mage_Core_Helper_Abstract class Vendor_Module_Helper_Data extends Mage_Core_Helper_Abstract{ ... }
Sushivam's user avatar
  • 2,639
5 votes
1 answer
1k views

Logged In or Not check works only in Customer pages not other pages Magento 2

User logged in or not checking not works in other pages such as Product, Category and other static pages but its works well on customer pages like Dashboard, Address book, Orders etc... Here is my ...
Riyas Muhammed's user avatar
0 votes
3 answers
273 views

How get new installed product attribute in magento (using helper) on category pages

I've installed new product attribute using my module script - mysql4-install-1.0.0.php: <?php $installer = $this; $installer->startSetup(); $setup = new ...
Yurii Makoviychuk's user avatar
0 votes
2 answers
661 views

Magento 2 - Logic in helper or block

We can put our logic inside the block. Why we still need a helper? What is the best practice of using a helper class?
TFS's user avatar
  • 4,339
8 votes
2 answers
430 views

Annoyed by tons of classes for DI in constructors of Magento 2 - is there a better way?

At this time I am annoyed of writing similar constructors en masse like the following within my modules. public function __construct( \Magento\Framework\Model\Context $context, \Magento\...
bukart's user avatar
  • 308