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

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

Do E-commerce the Magento way!

Magento
E-commerce is the order of the day in the world of virtual marketing and selling. It is a great way to enhance your business and tap the teeming online market. And while the market is swamped with e-commerce applications, it is critical to choose and select the best ecommerce partner for your business. Magento, an open source ecommerce software is increasingly becoming the more preferred solution for online merchandising. Your brand’s success depends on how well do you implement your ecommerce and target an untapped audience. Magento is highly resilient, has a rich and extremely user friendly interface and provides the best solution to numerous e-commerce problems that occur in the online business. Know how Magento works to deliver some of the world’s best ecommerce brands - here is Magento101.…
Read More

Add Custom Menu Sales Order Magento

Magento
Here I want show you how to add custom menu for order filter in admin. sometime client want to custom menu with some filter orders. Here I show you get only processing orders with custom menu with this custom module. Follow this steps and create module or files. app\etc\modules\Jwd_Orderstosend.xml [sourcecode language="plain"] <?xml version="1.0"?> <config> <modules> <Jwd_Orderstosend> <active>true</active> <codePool>local</codePool> </Jwd_Orderstosend> </modules> </config> [/sourcecode] app\code\local\Jwd\Orderstosend\Block\Adminhtml\Order\Items.php [php] <?php class Jwd_Orderstosend_Block_Adminhtml_Order_Items extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_blockGroup = 'jwd_orderstosend'; $this->_controller = 'adminhtml_order_items'; $this->_headerText = Mage::helper('adminhtml')->__('Orders to send'); parent::__construct(); $this->_removeButton('add'); } } ?> [/php] app\code\local\Jwd\Orderstosend\Block\Adminhtml\Order\Items\Grid.php [php] <?php class Jwd_Orderstosend_Block_Adminhtml_Order_Items_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setId('order_items'); $this->setUseAjax(false); $this->setDefaultSort('created_at'); $this->setDefaultDir('DESC'); $this->setSaveParametersInSession(true); } /** * Retrieve collection class * * @return string */ protected function _getCollectionClass() { return 'sales/order_grid_collection'; } protected function _prepareCollection()…
Read More

How Subscription Service Enhances Your Ecommerce Site ROI?

Magento
Websites today are the gateway to cash inflow and if you haven’t optimized them properly then you might miss out the best opportunity to grab the attention of your online customers. In fact, only a few ecommerce sites have the ability to convince the customers and help them climb greater heights. In order to optimize your site to sync with your customer expectations, it is crucial to add up varieties of elements to the website. Of the different elements to be tried up on the site, a major element that can produce incredible impact on customer minds and can even convince them to become potential buyers is the subscription service models. Find below a few top benefits associated with the subscription services which in turn can improve the ROI of…
Read More

Improve Selling Rate With an Effective eCommerce Website

Magento
Encouraging customers to buy your product can be one of the biggest challenges you will ever face when starting a business. We always tend to get in touch to our buyers in order to serve them better. Establishing a website where your products are showcased is one of the best resorts in spreading the fact that you have a business. Yes, it’s a part of building your first eCommerce website is being hesitant. But always remember that it only takes few time, effort and money to acquire one of this. Every eCommerce site has its own unique needs, so there is no such things a general outline for a business site. There are certain factors to consider when stabilizing a perfect eCommerce website.  First is being aware on what you…
Read More