How to Manage the Backend Functionality of Your Magento Store?

Helper contains the necessary functions for you; you can call in a helper from anywhere. An example of helper is as below

$helper = Mage::helper('monhelper');

The call can be related to

$helper = Mage::helper('monhelper/data');

Let's create a helper file

You will need to declare the helper in the config file in your Magento core. Configure your code in the <global> after the </blocks> field


Next, you will need to create the file app/code/local/STTL/Test/Helper/data.php which will contain the function bytwo($ nbr). A number will be used as an argument here. The return value in the output will be the number multiplied by two.Helper will extend the core class MageCoreHelper_Abstract

class STTL_Test_Helper_Data extends Mage_Core_Helper_Abstract{
   public function bytwo($nbr){
        return $nbr*2;

Go to in/app/code/local/STTL/Test/Block/monblock.php and change the function here with the help of the code below

class STTL_Test_Block_Monblock extends Mage_Core_Block_Template
      public function methodblock()
            $helper = Mage::helper('test');
            return '2*2 = '.$helper->bytwo(2);

Let's Add a New Field

Let's say you want to create a plugin that will store information about payment card in the system>configuration.

Let's add a sidebar <<Cards> section with a <<cards>> group and a config tab to help store your card numbers

Let's begin by creating a structure for the project

<?xml version="1.0"?>
            <!-- no dependencies -->
                                    <ecard_section translate="title">
                                        <title>My Section </title>

Create etc/system.xml and declare the menu here.

<?xml version="1.0" ?>
        <ecard_tab translate="label">
        <ecard_section translate="label">
                <ecard_group translate="label">
                    <comment>Card Configuration</comment>
                        <ecard_field translate="label comment">
                            <label>Card Number</label>
                            <comment>a text to help</comment>

With this xml, you can add a tab to System>Configuration and then retrieve the information from the fields


You can test what you have created by creating a controller in controllers/IndexController.php

class STTL_Ecard_IndexController extends Mage_Core_Controller_Front_Action
     * To test Ecards functions...
    public function indexAction()
        echo  Mage::getStoreConfig('ecard_section/ecard_group/ecard_field');


Creating a field or a helper will add functionality and new features to your store. You can even customize your store with the help of these fields. Hire Magento eCommerce developers to help you create custom fields or helper.

Deepa Ranganathan
  • magento backend functionality
  • magento store
By Deepa Ranganathan On 17 Jul, 15  Viewed: 167

Other blogs you may like

How to Programmatically Create a Dropdown Login for your Magento Store?

If you want to improve the interface of your Magento store, then you must include the dropdown login form. This would help create an interactive base for your consumers, and offer convenience too! Let’s see how you can include the form programmatically. Go to... By Deepa Ranganathan   On 07 Jul 2015  Viewed: 1,263

3 Ways to Track Shoppers Checking-in From Different Devices

Smart devices are just increasing and improving with time. The digital era has definitely introduced many devices that will offer convenience and ease out your problems. With multiple platforms available for logging into your favourite store, it becomes difficult for you as a store owner or a... By Deepa Ranganathan   On 18 Jun 2015  Viewed: 211