Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9078131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:32:37+00:00 2026-06-16T19:32:37+00:00

I want to write a module with a custom entity. In the backend it

  • 0

I want to write a module with a custom entity. In the backend it shall look like the backend from products (tabs on the left, forms on the right).

I tried many variants and inspected/copied many things from the core to understand it… well I don’t.

Knows anyone a tutorial or the neccessary key points to realize this?

Many thanks

Edit: well, it’s not the problem to create own entities, this is well known.
I need help to create the backend, so that the result looks like the tabbed form when editting products

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T19:32:39+00:00Added an answer on June 16, 2026 at 7:32 pm

    For adding multiple tabs in admin first go through the http://codemagento.com/2011/02/grids-and-forms-in-the-admin-panel/ provided by mpaepper.

    after that create below class

    Super_Awesome_Block_Adminhtml_Example_Edit_Tabs
    Super_Awesome_Block_Adminhtml_Example_Edit_Tabs_Form
    Super_Awesome_Block_Adminhtml_Example_Edit_Tabs_SecondTab
    

    and modify the
    Super_Awesome_Block_Adminhtml_Example_Edit_Form to

    class Super_Awesome_Block_Adminhtml_Example_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
    {
        protected function _prepareForm()
        {
            $form = new Varien_Data_Form(array(
                    'id' => 'edit_form',
                    'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
                    'method' => 'post',
                    'enctype' => 'multipart/form-data',
            ));
    
            $form->setUseContainer(true);
    
            $this->setForm($form);
    
            return parent::_prepareForm();
        }
    }
    

    Add below code

    class Super_Awesome_Block_Adminhtml_Example_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
    
        public function __construct() {
            parent::__construct();
            $this->setId('awesome_tabs');
            $this->setDestElementId('edit_form');
            $this->setTitle(Mage::helper('awesome')->__('Your Title Here'));
        }
    
        protected function _beforeToHtml() {
            $this->addTab('form_section', array(
                'label' => Mage::helper('awesome')->__('Details'),
                'title' => Mage::helper('awesome')->__('Details'),
                'content' => $this->getLayout()->createBlock('awesome/adminhtml_awesome_edit_tab_form')->toHtml(),
            ));
    
    
            $this->addTab('secondtab_section', array(
                'label'     => Mage::helper('awesome')->__('SecondTab'),
                'title' => Mage::helper('awesome')->__('SecondTab'),
                'content'   => $this->getLayout()->createBlock('awesome/adminhtml_awesome_edit_tab_secondtab')->toHtml(),
            ));
    
            return parent::_beforeToHtml();
        }
    
    }
    

    …

    class Super_Awesome_Block_Adminhtml_Example_Edit_Tabs_Form extends Mage_Adminhtml_Block_Widget_Form
    {
      protected function _prepareForm()
      {
          $form = new Varien_Data_Form();
          $this->setForm($form);
          $fieldset = $form->addFieldset('awesome_form', array('legend'=>Mage::helper('awesome')->__('Header text here')));
    
          $fieldset = $form->addFieldset('example_form', array(
                 'legend' =>Mage::helper('awesome')->__('Example Information')
            ));
    
            $fieldset->addField('name', 'text', array(
                 'label'     => Mage::helper('awesome')->__('Name'),
                 'class'     => 'required-entry',
                 'required'  => true,
                 'name'      => 'name',
                 'note'     => Mage::helper('awesome')->__('The name of the example.'),
            ));
    
            $fieldset->addField('description', 'text', array(
                 'label'     => Mage::helper('awesome')->__('Description'),
                 'class'     => 'required-entry',
                 'required'  => true,
                 'name'      => 'description',
            ));
    
            $fieldset->addField('other', 'text', array(
                 'label'     => Mage::helper('awesome')->__('Other'),
                 'class'     => 'required-entry',
                 'required'  => true,
                 'name'      => 'other',
            ));
    
            if (Mage::getSingleton('adminhtml/session')->getExampleData())
            {
                $data = Mage::getSingleton('adminhtml/session')->getExamplelData();
                Mage::getSingleton('adminhtml/session')->getExampleData(null);
            }
            elseif (Mage::registry('example_data'))
            {
                $data = Mage::registry('example_data')->getData();
            }
            else
            {
                $data = array();
            }
    
          return parent::_prepareForm();
      }
    }
    

    ….

    class Super_Awesome_Block_Adminhtml_Example_Edit_Tabs_SecondTab extends Mage_Adminhtml_Block_Widget_Grid {
    
        public function __construct() {
            parent::__construct();
            $this->setId('awesomeGrid');
            $this->setDefaultSort('awesome_secondtab_id');
            $this->setDefaultDir('DESC');
            $this->setSaveParametersInSession(true);
            $this->setFilterVisibility(false);
            $this->setPagerVisibility(false);
        }
    
        protected function _prepareCollection() {
            $id     = $this->getRequest()->getParam('id');
            $collection = Mage::getModel('awesome/secondtab')->getCollection()->addFilter('awesome_id', $id);
            $this->setCollection($collection);
            return parent::_prepareCollection();
        }
    
        protected function _prepareColumns() {
    
    
            $this->addColumn('created_time', array(
                'header' => Mage::helper('awesome')->__('Date'),
                'index' => 'created_time',
                'type' => 'datetime',
                'align' => 'left',
                'sortable' => false,
            ));
    
            $this->addColumn('type', array(
                'header' => Mage::helper('awesome')->__('Type'),
                'align' => 'left',
                'index' => 'type',
                'sortable' => false,
            ));
    
            $this->addColumn('amount', array(
                'header' => Mage::helper('awesome')->__('Amount'),
                'align' => 'left',
                'index' => 'amount',
                'type'  => 'currency',
                'currency' => 'amount',
                'sortable' => false,
            ));
    
            $this->addColumn('balance', array(
                'header' => Mage::helper('awesome')->__('Balance'),
                'align' => 'left',
                'index' => 'balance',
                'type'  => 'currency',
                'currency' => 'balance',
                'sortable' => false,
            ));
    
            $this->addColumn('order_number', array(
                'header' => Mage::helper('awesome')->__('Order Number'),
                'align' => 'left',
                'index' => 'order_number',
                'sortable' => false,
            ));
    
            return parent::_prepareColumns();
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write a custom module that adjusts which columns are visible when
I write custom Drupal module. Want show field_myear in contents. With the following: <div
I created module for admin specific operations. I don't want to write the same
I write 2 GWT module and compile it. I want locate ***.nocache.js files into
I want write a simple query which will fetch data from a table (which
I want to write a module which re-exports some module it had imported qualified.
I want to write my own Secure module library for web but i not
I want to write a drupal module that serves static files, but I want
I'm using Python's built-in unittest module and I want to write a few tests
I want to write a module that connects to a remote Service. The module

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.