Skip to main content
deleted 3 characters in body
Source Link
seanbreeden
  • 2.8k
  • 18
  • 24

You may be missing two things to get your Grid to show up.

Add this file:

app/code/community/VivasIndustries/SmsNotification/Block/Adminhtml/Sales/Status.php

<?php
class VivasIndustries_SmsNotification_Block_Adminhtml_Sales_Status extends     Mage_Adminhtml_Block_Widget_Grid_Container
{

public function __construct()
{

    $this->_controller = 'adminhtml_sales_status';
    $this->_blockGroup = 'smsnotification';
    $this->_headerText = Mage::helper('smsnotification')->__('SMS Notifications');
    parent::__construct();
}


protected function _prepareLayout()
{
   $this->setChild( 'grid',
       $this->getLayout()->createBlock( $this->_blockGroup.'/' . $this->_controller . '_grid',
       $this->_controller . '.grid')->setSaveParametersInSession(true) );
   return parent::_prepareLayout();
}

}

And this file:

app/design/adminhtml/default/default/layout/smsnotification.xml

<layout>
    <adminhtml_smsnotification_index>
        <reference name="content">
            <block type="smsnotification/adminhtml_smsnotification"adminhtml_sales_status" name="smsnotification" />
        </reference>
    </adminhtml_smsnotification_index>
</layout>

In your etc/config.xml, add this in the <adminhtml> tag:

  <layout>
        <updates>
            <smsnotification>
                <file>smsnotification.xml</file>
            </smsnotification>
        </updates>
    </layout>

You may be missing two things to get your Grid to show up.

Add this file:

app/code/community/VivasIndustries/SmsNotification/Block/Adminhtml/Sales/Status.php

<?php
class VivasIndustries_SmsNotification_Block_Adminhtml_Sales_Status extends     Mage_Adminhtml_Block_Widget_Grid_Container
{

public function __construct()
{

    $this->_controller = 'adminhtml_sales_status';
    $this->_blockGroup = 'smsnotification';
    $this->_headerText = Mage::helper('smsnotification')->__('SMS Notifications');
    parent::__construct();
}


protected function _prepareLayout()
{
   $this->setChild( 'grid',
       $this->getLayout()->createBlock( $this->_blockGroup.'/' . $this->_controller . '_grid',
       $this->_controller . '.grid')->setSaveParametersInSession(true) );
   return parent::_prepareLayout();
}

}

And this file:

app/design/adminhtml/default/default/layout/smsnotification.xml

<layout>
    <adminhtml_smsnotification_index>
        <reference name="content">
            <block type="smsnotification/adminhtml_smsnotification" name="smsnotification" />
        </reference>
    </adminhtml_smsnotification_index>
</layout>

You may be missing two things to get your Grid to show up.

Add this file:

app/code/community/VivasIndustries/SmsNotification/Block/Adminhtml/Sales/Status.php

<?php
class VivasIndustries_SmsNotification_Block_Adminhtml_Sales_Status extends     Mage_Adminhtml_Block_Widget_Grid_Container
{

public function __construct()
{

    $this->_controller = 'adminhtml_sales_status';
    $this->_blockGroup = 'smsnotification';
    $this->_headerText = Mage::helper('smsnotification')->__('SMS Notifications');
    parent::__construct();
}


protected function _prepareLayout()
{
   $this->setChild( 'grid',
       $this->getLayout()->createBlock( $this->_blockGroup.'/' . $this->_controller . '_grid',
       $this->_controller . '.grid')->setSaveParametersInSession(true) );
   return parent::_prepareLayout();
}

}

And this file:

app/design/adminhtml/default/default/layout/smsnotification.xml

<layout>
    <adminhtml_smsnotification_index>
        <reference name="content">
            <block type="smsnotification/adminhtml_sales_status" name="smsnotification" />
        </reference>
    </adminhtml_smsnotification_index>
</layout>

In your etc/config.xml, add this in the <adminhtml> tag:

  <layout>
        <updates>
            <smsnotification>
                <file>smsnotification.xml</file>
            </smsnotification>
        </updates>
    </layout>
added 871 characters in body
Source Link
seanbreeden
  • 2.8k
  • 18
  • 24

I haven't tried installing all of your code locallyYou may be missing two things to really dig into it but one thing that stands out is your _prepareCollection() inget your gridGrid to show up.

Replace your _prepareCollection() withAdd this file:

app/code/community/VivasIndustries/SmsNotification/Block/Adminhtml/Sales/Status.php

protected<?php
class VivasIndustries_SmsNotification_Block_Adminhtml_Sales_Status extends     Mage_Adminhtml_Block_Widget_Grid_Container
{

public function _prepareCollection__construct()
{ 

    $collection$this->_controller = 'adminhtml_sales_status';
    $this->_blockGroup = 'smsnotification';
    $this->_headerText = Mage::getModelhelper('smsnotification/smsnotification''smsnotification')->getCollection>__('SMS Notifications');
    parent::__construct();
}


protected function _prepareLayout()
{
   $this->setCollection>setChild($collection 'grid',
       $this->getLayout();->createBlock( $this->_blockGroup.'/' . $this->_controller . '_grid',
       $this->_controller . '.grid')->setSaveParametersInSession(true) );
   return parent::_prepareCollection_prepareLayout();
}

}

And this file:

app/design/adminhtml/default/default/layout/smsnotification.xml

<layout>
    <adminhtml_smsnotification_index>
        <reference name="content">
            <block type="smsnotification/adminhtml_smsnotification" name="smsnotification" />
        </reference>
    </adminhtml_smsnotification_index>
</layout>

I haven't tried installing all of your code locally to really dig into it but one thing that stands out is your _prepareCollection() in your grid.

Replace your _prepareCollection() with this:

protected function _prepareCollection()
{
    $collection = Mage::getModel('smsnotification/smsnotification')->getCollection();
    $this->setCollection($collection);
    return parent::_prepareCollection();
}

You may be missing two things to get your Grid to show up.

Add this file:

app/code/community/VivasIndustries/SmsNotification/Block/Adminhtml/Sales/Status.php

<?php
class VivasIndustries_SmsNotification_Block_Adminhtml_Sales_Status extends     Mage_Adminhtml_Block_Widget_Grid_Container
{

public function __construct()
{ 

    $this->_controller = 'adminhtml_sales_status';
    $this->_blockGroup = 'smsnotification';
    $this->_headerText = Mage::helper('smsnotification')->__('SMS Notifications');
    parent::__construct();
}


protected function _prepareLayout()
{
   $this->setChild( 'grid',
       $this->getLayout()->createBlock( $this->_blockGroup.'/' . $this->_controller . '_grid',
       $this->_controller . '.grid')->setSaveParametersInSession(true) );
   return parent::_prepareLayout();
}

}

And this file:

app/design/adminhtml/default/default/layout/smsnotification.xml

<layout>
    <adminhtml_smsnotification_index>
        <reference name="content">
            <block type="smsnotification/adminhtml_smsnotification" name="smsnotification" />
        </reference>
    </adminhtml_smsnotification_index>
</layout>
added 205 characters in body
Source Link
seanbreeden
  • 2.8k
  • 18
  • 24

If thisI haven't tried installing all of your code locally to really dig into it but one thing that stands out is what you haveyour _prepareCollection() in your grid.

Replace your _prepareCollection() with this:

/app/code/community/VivasIndustries/SmsNotification/Block/Adminhtml/Sales/Statusprotected function _prepareCollection()
{
    $collection = Mage::getModel('smsnotification/Grid.phpsmsnotification')->getCollection();
    $this->setCollection($collection);
    return parent::_prepareCollection();
}
  

If this is what you have in:

/app/code/community/VivasIndustries/SmsNotification/Block/Adminhtml/Sales/Status/Grid.php:
 

I haven't tried installing all of your code locally to really dig into it but one thing that stands out is your _prepareCollection() in your grid.

Replace your _prepareCollection() with this:

protected function _prepareCollection()
{
    $collection = Mage::getModel('smsnotification/smsnotification')->getCollection();
    $this->setCollection($collection);
    return parent::_prepareCollection();
}
 
Post Undeleted by seanbreeden
Post Deleted by seanbreeden
Source Link
seanbreeden
  • 2.8k
  • 18
  • 24
Loading