Magento

eCommerce Software for Online Growth

Magento Forum

From setting up your store to managing your products, pages and promotions to generating detailed reports, the Magento User Guide empowers the user to utilize the platform for all of its vast capacity.
Available in eBook and Print formats – Download Now!!!
   
How do I SHOW ATTRIBUTES ON HOME PAGE
 
MorseFeuer
Jr. Member
 
Total Posts:  7
Joined:  2008-08-20
 

hi everybody,

i’m using this code:

{{block type="catalog/product_list" category_id="xxx" template="catalog/product/list.phtml"}}

to display products on my home page. the problem is that the are no attributes shown with it. (3 column cms layout)

any ideas ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  479
Joined:  2008-07-11
New Haven, CT
 

If you look at the block code from this, it retrieves it’s product collection from a layer

$layer Mage::getSingleton('catalog/layer');
//...
 
$this->_productCollection $layer->getProductCollection();

You might try overriding this block and adding your attributes.

$this->_productCollection $layer->getProductCollection()->addAttributeToSelect('myAttribute');

If no attributes are being shown at all (and you aren’t trying to get custom attributes) you might try simply editing the .phtml template file and add the attributes like normal.

echo $_product->getSomeAttribute(); // getDescription etc

 Signature 

@ My Magento Blog

- Handy tutorials on programming and designing Magento. A continual work in progress!
- Now with a new design, new hosting and a new domain! Check it out!

 
Magento Community Magento Community
Magento Community
Magento Community
 
MorseFeuer
Jr. Member
 
Total Posts:  7
Joined:  2008-08-20
 

hi nikefido,

thank you for your kind replies.
to be honest i don’t understand these codes to much and i can only guess what they are there for.
i was wondering if it’s not to much to ask
(since there is no way to bypass the home page by trying to use the default URL section in the admin)
if you could write a handy and easy to understand tutorial on this topic?

thanks morsefeuer

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2010 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
177726 users|1160 users currently online|277232 forum posts