Magento Forum

   
Category/Sub Category based Static blocks on right nav…
 
Paramz
Member
 
Total Posts:  39
Joined:  2008-11-10
 

Hi,
I want to have a static block for each category/sub category that gets displayed on the right nav of that category/sub category page.
Basically, what I’m trying to accomplish is to have a static block that provides information about that category/sub category on the right nav.
Can someone provide some info on how I can do this?
Thanks a lot.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paramz
Member
 
Total Posts:  39
Joined:  2008-11-10
 

So while trying to figure this out I got to know about the Attribute Manager extension through which I can assign Category level attributes. Great! So I thought I can create static blocks for each category and assign their ids as the value of a category level attribute. I also got a post that mentions how to use the id and generate the static block :
http://www.magentocommerce.com/boards/viewthread/23026/

<?php
$fabric=$_product->getAttributeText('fabric_info');
echo $this->getLayout()->createBlock('cms/block')->setBlockId($fabric)->toHtml();
?>

Now where I’m struggling is to retrieve the value of the Category attribute as something like
$_category->getAttributeText(’attrib_name’); is returning a Fatal Exception.

Can someone please share how to actually get the value of the Category attribute?
I’m on Mage 1.1.8
Also, is the right way to achieve this functionality or is there a simpler way.
Thanks a lot.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paramz
Member
 
Total Posts:  39
Joined:  2008-11-10
 

Anybody know this one?
Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paramz
Member
 
Total Posts:  39
Joined:  2008-11-10
 

Anyone at all? Pleeeaseee?  tongue laugh

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paramz
Member
 
Total Posts:  39
Joined:  2008-11-10
 

Could really use some help here. Still struggling with this.
Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kara Heinrichs
Guru
 
Avatar
Total Posts:  482
Joined:  2008-01-17
aa, mi, us
 

I haven’t done this, but have been looking into adding it too.

Don’t know if this’ll help, but getAttributeText (<?php echo $_product->getAttributeText('your_attribute')?>) works for drop down attributes at the product level.  If this is a text field attribute, try getData instead (<?php echo $_product->getData('your_attribute')?>).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paramz
Member
 
Total Posts:  39
Joined:  2008-11-10
 

Thanks for the note Kara.

$_category->getData(’attrib_name’) also produces the same fatal exception.
Fatal error: Call to a member function getData() on a non-object

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kara Heinrichs
Guru
 
Avatar
Total Posts:  482
Joined:  2008-01-17
aa, mi, us
 

Darn.  I’ve got nuthin.

I’m about a month out from trying this in earnest myself.  If you do manage to figure it out, can you post back to this thread?  I’ll do the same.  Luck!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paramz
Member
 
Total Posts:  39
Joined:  2008-11-10
 

There is some info on this on another post :
http://www.magentocommerce.com/boards/viewthread/32542/

Someone had responded to my same query. Although I dont get the fatal exception now, I’m unable to retrieve the value of the attribute.
Will definitely post if I find something.

Cheers

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top