magento - Adding Grid Serializer of a custom module into a custom product tab -
i new magento. have made custom module named "custom_press" using module creator , customized little bit. working fine.
following fields in form of module.
- press title
- press image
- press date
- press thumbnail
- status
i want show of data in grid serializer in custom product tab. press can selected grid serializer against product default magento functionality of upsell , cross-sells product's grid serializer.
you need add new tab tabs block 'namespace/module/block/adminhtml/form/edit/tabs.php':
$product_content = $this->getlayout()->createblock('module/adminhtml_form_edit_tab_product', 'adminform_products.grid')->tohtml(); $serialize_block = $this->getlayout()->createblock('adminhtml/widget_grid_serializer'); $serialize_block->initserializerblock('adminform_products.grid', 'getselectedproducts', 'products', 'selected_products'); $serialize_block->addcolumninputname('position'); $product_content .= $serialize_block->tohtml(); $this->addtab('associated_products', array( 'label' => mage::helper('module')->__('products'), 'title' => mage::helper('module')->__('products'), 'content' => $product_content ));
the serializer important feature allow define fields editable in grid, , define name parameter should see in save action of form.
for more details please have @ - http://turnkeye.com/blog/magento-admin-form/
Comments
Post a Comment