Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.29 KB | None | 0 0
  1. <?php
  2. class Buildnext_Producteditrequest_Block_Adminhtml_Producteditrequest_Grid
  3. extends Mage_Adminhtml_Block_Widget_Grid
  4. {
  5. public function __construct()
  6. {
  7. parent::__construct();
  8. $this->setId('producteditrequestGrid');
  9. // This is the primary key of the database
  10. $this->setDefaultSort('pdt_edit_id');
  11. $this->setDefaultDir('ASC');
  12. $this->setSaveParametersInSession(true);
  13. }
  14.  
  15. protected function _prepareCollection()
  16. {
  17. $collection = Mage::getModel('producteditrequest/producteditrequest')
  18. ->getCollection()-> addCustomerNameToSelect();
  19.  
  20.  
  21. //echo $collection->getSelect();
  22. $this->setCollection($collection);
  23. return parent::_prepareCollection();
  24. }
  25.  
  26. protected function _prepareColumns()
  27. {
  28. $this->addColumn('pdt_edit_id', array(
  29. 'header' => Mage::helper('producteditrequest')->__('ID'),
  30. 'align' =>'right',
  31. 'width' => '50px',
  32. 'index' => 'pdt_edit_id',
  33. ));
  34.  
  35. $this->addColumn('product_code', array(
  36. 'header' => Mage::helper('producteditrequest')->__('Product Code'),
  37. 'align' =>'right',
  38. 'width' => '50px',
  39. 'index' => 'product_code',
  40. ));
  41.  
  42. $this->addColumn('fullname', array(
  43. 'header' => Mage::helper('producteditrequest')->__('Seller'),
  44. 'align' =>'left',
  45. 'index' => 'seller_id',
  46. 'format' => '$fullname'
  47. ));
  48.  
  49. $this->addColumn('action',
  50. array(
  51. 'header' => Mage::helper('producteditrequest')->__('Action'),
  52. 'width' => '50px',
  53. 'type' => 'action',
  54. 'getter' => 'getId',
  55. 'actions' => array(
  56. array(
  57. 'caption' => Mage::helper('producteditrequest')->__('View'),
  58. 'url' => array(
  59. 'base'=>'*/*/edit',
  60. ),
  61. 'field' => 'pdt_edit_id'
  62. )
  63. ),
  64. 'filter' => false,
  65. 'sortable' => false,
  66. 'index' => 'pdt_edit_id',
  67. ));
  68.  
  69. return parent::_prepareColumns();
  70. }
  71.  
  72. public function getRowUrl($row)
  73. {
  74. return $this->getUrl('*/*/edit', array('id' => $row->getId()));
  75. }
  76. }
  77.  
  78. Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
  79.  
  80. #0 [internal function]: mageCoreErrorHandler(2, 'simplexml_load_...', '/opt/lampp/htdo...', 450, Array)
  81. #1 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Core/Model/Layout/Update.php(450): simplexml_load_string('/**n * Buildnex...', 'Mage_Core_Model...')
  82. #2 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Core/Model/Layout/Update.php(275): Mage_Core_Model_Layout_Update->getFileLayoutUpdatesXml('frontend', 'buildnext', 'brick', '1')
  83. #3 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Core/Model/Layout/Update.php(347): Mage_Core_Model_Layout_Update->fetchFileLayoutUpdates()
  84. #4 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Core/Model/Layout/Update.php(246): Mage_Core_Model_Layout_Update->fetchPackageLayoutUpdates('default')
  85. #5 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Core/Model/Layout/Update.php(224): Mage_Core_Model_Layout_Update->merge('default')
  86. #6 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(306): Mage_Core_Model_Layout_Update->load()
  87. #7 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Cms/Helper/Page.php(109): Mage_Core_Controller_Varien_Action->loadLayoutUpdates()
  88. #8 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'no-route')
  89. #9 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Cms/controllers/IndexController.php(75): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'no-route')
  90. #10 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->noRouteAction()
  91. #11 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('noRoute')
  92. #12 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
  93. #13 /opt/lampp/htdocs/buildnext/marketplace/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
  94. #14 /opt/lampp/htdocs/buildnext/marketplace/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
  95. #15 /opt/lampp/htdocs/buildnext/marketplace/magento/index.php(87): Mage::run('', 'store')
  96. #16 {main}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement