Add custom column and get custom renderer value in Magento grid

Magento
This post is helpful to add custom column and get custom renderer value in Magento grid admin. In /app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php file. [php] <?php protected function _prepareCollection() { $collection = Mage::getResourceModel($this->_getCollectionClass()); //$collection->getSelect()->join('sales_flat_order_address', 'main_table.entity_id = sales_flat_order_address.parent_id',array('postcode')); // Added my developer //$collection->getSelect()->joinLeft('sales_flat_order_payment', 'main_table.entity_id = sales_flat_order_payment.parent_id','method'); // Added my developer $collection->getSelect()->joinLeft('sales_flat_order_status_history', 'main_table.entity_id = sales_flat_order_status_history.entity_id','comment'); // Added my developer $this->setCollection($collection); return parent::_prepareCollection(); } ?> [/php] [php] <?php protected function _prepareColumns() { /**** start *****/ $this->addColumn('comment', array( 'header' => Mage::helper('sales')->__('comment'), 'index' => 'comment', 'filter' => false, 'sortable' => false, 'renderer' => 'Mage_Adminhtml_Block_sales_Order_Renderer_Red', )); /**** end ******/ } ?> [/php] Make directory called Renderer inside directory where your Grid.php is located and make file Red.php Make class Mage_Adminhtml_Block_Catalog_Product_Renderer_Red extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract [php] <?php class Mage_Adminhtml_Block_sales_Order_Renderer_Red extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $row) { $value = $row->getData($this->getColumn()->getIndex()); return '<span style="color:…
Read More

Attribute dropdown value display in magento products grid

Magento
This post useful to display custom attribute dropdown value in products grid in magento admin. [php] $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'supplier'); $options = array(); foreach( $attribute->getSource()->getAllOptions(true, true) as $option ) { $options[$option['value']] = $option['label']; } $this->addColumn('supplier', array( 'header'=> Mage::helper('catalog')->__('Supplier'), 'width' => '80px', 'index' => 'supplier', 'type' => 'options', 'options' => $options, )); [/php] [JWD-Magento-Development]
Read More

Top 6 Magento Extensions for E-commerce Website Design

Magento
  Magento apps are amongst today's most utilized ecommerce platforms. Aside from solving lots of web store problems, the  apps enable you to store more merchandise with prices and descriptions. Not to mention, there's still tons of many other  possibilities. Magento ecommerce platform also enables small to medium-sized enterprises to produce their web stores  quicker and easier because of the fact that Magento plug-inare completed and developed by skilled developers in the field of  e-commerce and are readily available via Magento Connect marketplace. With magento, you'll have a site that is more  enhanced and efficient. Your customers online will be satisfied once they visit a web-based store that offers them the best browsingand shopping  experience. One more thing to note, Magento modules and extensions are PHP platforms and MySQL database…
Read More

Create The Perfect Headline Through These Six Tips

SEO
As cliché as it might sound by now, headlines really do make or break your copy. It is the first thing that readers see when they are looking at your article and thus, failure to generate one also means failure to garner attention for the content. Needless to say, writing the perfect headline for your post is a must. The following are six tips on how to do just that. Read and apply them and you will surely come up the most memorable headlines in no time. 1. Follow the footsteps of great news writers First of all, do your research and go back to where it all began. Newspaper companies and publishing companies have long perfected the art of headline writing. Take cues from them and try to learn…
Read More

5 Good Reasons to build a career in Web Development

Others, Web Development
World is changing and so are the technologies. With everything becoming Internet centric, it is hard to imagine the future generation without the World Wide Web. Considering the ever-increasing popularity of Web Development, it won’t be wrong to say that Web Development industry will likely grow in the years ahead. Even an iPhone Apps Development Company is putting a huge efforts so as to leverage the world of web technology. If you too are confused about choosing Web Development as a career, then keep on reading because this blog will make you familiar with 5 solid reasons as to why you should choose it as your career. So, let me acquaint you with these 5 reasons that are logical and well related. Reason No.1- You can work independently Choosing a career…
Read More

Expanding Your Ecommerce Operation with the Magento Platform

Magento
  If you’re trying to establish and grow and ecommerce business in what is an incredibly competitive strata then you need all the help you can get. Once such tool which can really help you get the best of your idea and really put your hard work into action is the Magento ecommerce platform. Magento will take some of the workload which is associated with ecommerce off your hands, and empower you to focus on engaging your customers and growing your business. Furthermore, Magento offers tools which make it possible for you to control the content, functionality, look and feel of your online store, and a range of other support options, advice, services training and support as well. Magento is an eCommerce platform which is now used by approximately 5…
Read More

Must knows for dealing with the right iPhone App Development Company

Mobile Application
Today, iPhones are ruling the world of smartphones. Whether you’re a student, a housewife or a business professional, iPhone has a lot in store for you. With easy-to-use iPhone apps, it has become easier to perform multiple tasks simultaneously. There’s no denying of the fact that these iPhone apps have served as excellent tools for growing the clientele. You can easily find small and big enterprises choosing iPhone app development for building iPhone apps that can allow them to boost their customers’ strength. If you too are a merchant, thinking about hiring a reputed iPhone App Development Company for building flawless iPhone business apps, then you’ve reached the right place. In this blog, I’ll be discussing about the crucial things that you need to know before settling down for a…
Read More

Essential Tips to Optimize Your Joomla Website for Search Engines

Others
Are you thinking of launching a CMS based website? Then you'll be given three choices out of which you need to select one that best suits your need: Drupal, Joomla or WordPress. Out of the three Joomla is considered to be one of the preferred choices when it comes to building varied websites such as corporate sites, blogging sites, and websites – wherein secure login is mandatory. For the past few years, we’ve been observing a shift in the way SEO is being conducted. Simply put, the best SEO practices that we followed previously might now be ineffective, since new SEO tactics has come to the fore. Before understanding the tips to optimize your Joomla website for search engines, it is recommended that you must learn about the SEO practices…
Read More