Magento Developer Certification Preparation Study Group

Session Six

Andreas Mautz || @mautz_et_tong

webvisum GmbH

Was?

Adminhtml

Wer?

  • Andreas Mautz
  • programmiert seit 16 Jahren
  • macht magento seit 2008
  • beschäftigt sich mit Deployment-Prozessen, Entwicklungsinfrastrukturen und Wissensmanagement seit 2011
  • Vorbereitung Zertifizierung
  • Lehren und Lernen Stoff zusammenzufassen

Location

brandung

PIZZA!

Ablauf

Was machen wir denn heute Schönes?

  • Hausaufgaben besprechen
  • Adminhtml
  • neue Aufgaben
  • Pizza
  • Catalog
  • neue Aufgaben II
  • Sonstiges

ODER

Ablauf

  • Adminhtml
  • neue Aufgaben
  • Catalog
  • neue Aufgaben II
  • Sonstiges
  • Pizza
  • Hausaufgaben besprechen

Hausaufgaben aus Session 5

Use a setup script to add a catalog/product select attribute using the Magento eav/entity_attribute_source_table. Also add some options

Add a customer/customer multiselect attribute using a customer source and backend model. Make it possible to unset all options for that attribute on customers using the Admin interface.

Add a catalog/product select attribute with a custom source model that is indexed by the flat table indexer, and that also works in the layered navigation.

Use a backend model to set the associated page and store_id entity properties.

Create an uninstall script (which would need to be run manually) from the comments module that leaves Magento in a state as if the module had never been installed.

Hausaufgaben aus Session 6

Use a setup script to add a catalog/product select attribute using the Magento eav/entity_attribute_source_table. Also add some options

Add a customer/customer multiselect attribute using a customer source and backend model. Make it possible to unset all options for that attribute on customers using the Admin interface.

Add a catalog/product select attribute with a custom source model that is indexed by the flat table indexer, and that also works in the layered navigation.

Use a backend model to set the associated page and store_id entity properties.

Create an uninstall script (which would need to be run manually) from the comments module that leaves Magento in a state as if the module had never been installed.

Adminhtml | Overview

  • Common structure / architecture
  • Grids
  • Forms
  • System-Konfiguration
  • Access Control Lists (ACL)
  • Permissions
  • Extensions im Backend

Adminhtml | Common structure / architecture

  • Admin only: admin, adminhtml
  • Areas
  • ACL

Adminhtml | Common structure / architecture

Cache Type Description Associated Tags
Configuration System(config.xml, local.xml) and modules configuration files(config.xml) CONFIG
Layouts Layout building instructions LAYOUT_GENERAL_CACHE_TAG
Blocks HTML output Page blocks HTML BLOCK_HTML
Translations Translation files TRANSLATE
Collections Data Collection data files COLLECTION_DATA
EAV types and attributes Entity types declaration cache EAV
Web Services Configuration Web Services definition files (api.xml) CONFIG_API
Web Services Configuration Web Services definition files (api2.xml) CONFIG_API2

Adminhtml | Forms

  • Form container:
    extended from the class Mage_Adminhtml_Block_Widget_Form_Container with the default template: widget/form/container.phtml. The Form container includes form’s components such as header, content, footer and javascript.
  • Form content
    extended from the class Mage_Adminhtml_Block_Widget_Form with the default template: widget/form.phtml. The Form content includes form’s elements such as fieldset, text… (the list of form’s elements in the folder lib/Varien/Data/Form/Element).
  • Form tabs:
    extended from class Mage_Adminhtml_Block_Widget_Tabs with the default template: widget/tabs.phtml. Form tabs are used to divide a long form to multiple tabs. It uses Javascript to add the content for the form.

Adminhtml | Grids

  • Grid container:
    extended from the class Mage_Adminhtml_Block_Widget_Grid_Container with the default template widget/grid/container.phtml. The grid container contains the grid’s header (title and buttons) and the grid’s content
  • Grid content:
    extended from the class Mage_Adminhtml_Block_Widget_Grid and its default template is widget/grid.phtml. The grid content includes a data grid, paging grid, filter data and massaction for grid. An important method of grid is addColumn.
  • Massaction:
    based on Mage_Adminhtml_Block_Widget_Grid_Massaction with the default template: widget/grid/massaction.phtml. Massaction is used to operate a list of data in a grid.
  • Serializer:
    works with grid data (by javascript) and transforms it to serial.

Adminhtml | System Configuration

  • basic terms, elements, and structure of system configuration XML
  • Describe system configuration scopes
h2>Adminhtml | Access Control Lists (ACL)
  • Structure
  • Modulanmeldung

Adminhtml | Permissions

  • Guppe -> Knoten

Adminhtml | Extensions

  • Aktivierung
  • Konfigurierung
  • Channels

neue Hausaufgaben!

für Session 7:

Create an adminhtml integration for the flat table comments entity that supports all CRUD operations.

Create the same for the EAV version, utilizing the semi-automatic adminhtml form field generation through the adminhtml/widget_form block.

Create a system configuration option with a new system.xml section that enables/disables the adminhtml option to create new comments.

On the product edit page, create a new tab containing a grid of all comments associated with this products detall page. Make records removable directly from the grid as a mass action. For this you may want to add a product_id attribute to the comment entities.

In the comments grids, use a renderer to ensure that the backend display is XSS safe.

In the main comments grid, display the entity type associated with the comments page. Create a custom column renderer and filter for the column display and filter.

Create a custom system configuration control that allows you to render your own template.

Create a custom 24-hour and minute time picker control for the comments entity using a custom form element type.

Sonstiges

Quellen && nützliche Links

Magento

Danke!