Add attribute to Grid or List view
This came up twice in one day so it is worth adding here. Often the information that Magento provides in the grid view is not enough for a specific product type. In this case we add two attributes to the grid.
2 scenarios
1)
On our new site http://dx3webs.com we needed to make it clear when prices were Monthly or Annually or One off. All our Magento hosting options are monthly while the likes of SSL certs are annual. So we created a new attribute called “billingcycle” which is either set to
Per Month, Per Year or   (the latter for products that are simply one off payments)
If is then simply a case of calling the following code in your list.phtml file
<?php echo $_product->getAttributeText('billingcycle') ?>
2) 
In the second case the client wanted to show in the grid view all the available options for the attribute “frame_colour”
Available in
<div class="array">
<?php
echo $_product->getResource()->getAttribute('frame_colour')->getFrontend()->getValue($_product)
?>
</div>
Share this:
This entry was posted by admin on July 5, 2011 at 9:25 pm, and is filed under Magento. Follow any responses to this post through RSS 2.0.You can leave a response or trackback from your own site.
- Notes on Magento benchmarking..
- Magetno fix : Cant add products to admin create order
- Magento fix : Invalid method Mage_Wishlist_Model_Item::canConfigure(Array
- Create a multi-store setup in Magento
- Magento fix: Fatal error: Method Varien_Object::__tostring() cannot take arguments in /magento/lib/Varien/Object.php
- Magento fix : Local file doesn’t exist
- Magento tip: after upgrade prices on product page simple product are gone……
- Magento tip : add Google Checkout button to side bar shopping cart
- Magento Tip: Add simple product url to grouped product items
- Magento tip: problems with Linnworks connecting to Magento api
