I'm new to Magento and PHP in general. I made a simple extension with a custom report based on the Products/Ordered report that shows a few extra fields and does some simple calculations based on certain product attributes.

I wanted to add a form field to filter the result in addition to the already present date range filter (In my case filter by the artist product attribute as a select)

I couldn't figure out how to add the field in the frontend nor how to properly access the value in the controller and pass it down to the Grid classes (I've seen an example reading the value from the $_SESSION global(?) that doesn't look like the proper way to do this though)

EDIT: didn't really work on this anymore till now, I tried adding a custom form block to the report following this guide: http://codegento.com/2011/03/creating-custom-magento-reports/ (lower half... complex report)

All I got is an empty admin page though... and var_dump in the Controller returns bool(false) for both blocks. So I guess they are not found?

Totally unsure if I got the layout file and declaration of these files right: The module name is Customreport the action for the report is called commissionAction, the Controller is defined in controllers/Report/CustomController.php and has the according name.

Here is the layout file declaration in etc/config.xml:


and this is the content of the customreport.xml in app/design/adminhtml/default/default/layout:

        <update handle="report_customreport">
                <reference name="content">
                            <block type="customreport/adminhtml_report_commission" template="report/grid/container.phtml" name="customreport.report.grid.container">
                                            <block type="adminhtml/report_filter_form" name="grid.filter.form">
                                                        <action method="setFieldVisibility">

unsure about the first node... adminhtml_report_controller_action is correct, no?

same for the <update handle=-value from the example and the source I guess it's report_modulename but can't really tell.

Any ideas where I went wrong? Is there an easier way to add another form field? Are all the changes in the example necessary (e.g. the changes to the collection... I actually don't want to touch this one since, it already does what I want)

closed as off-topic by benmarks Feb 15 '15 at 16:28

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced OR seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – benmarks
If this question can be reworded to fit the rules in the help center, please edit the question.

  • If you could post some of the code that you've got so far we may be able to help. – nachito Dec 14 '13 at 1:57
  • @nachito Which classes/configs would be relevant? The From/To & Period form fields were included by default, but I have no clue how to customize this, so there is no code that relates to this feature. – user4323 Dec 14 '13 at 9:04
  • <update /> is always a self-closing node. – benmarks Feb 15 '15 at 16:27
  • Without an update re custom "commission" code this cannot be solved. Closing. – benmarks Feb 15 '15 at 16:28