Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Show custom category attribute in Frontend Magento

Posted on 2013-01-16
7
Medium Priority
?
1,158 Views
Last Modified: 2016-03-02
I've added an attribute text field in Magento category admin page.

I'm trying to echo the value fromtend using this code:

<?php echo $_category->getMyAttribute() ?>

Open in new window


but its not visible. Is there a better way of doing this? I've checked the database under
EAV_attribute table and can see that it has been update and the text field is showing in the backend.
0
Comment
Question by:rafique12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 38782453
0
 

Author Comment

by:rafique12
ID: 38782669
Thankyou, its is... sort of. I need to show category attribute instead of product attribute.
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 38782846
what is the type of the custom attribute?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:rafique12
ID: 38783016
Its a text field. I've called it nav_description as I want to show a short description under category navigation links on the frontpage.

<?php echo $_category->getNavDescription() ?>

Open in new window

0
 

Author Comment

by:rafique12
ID: 38792737
There must be someone that knows how to do this?

I've tried almost every method but none allow me to display the value of a custom category attribute on the front end.

I've created a module made sure the EAV attribute has been updated with my new attribute. it is also showing in the backend but nothing in the front?!?!?!
0
 

Accepted Solution

by:
rafique12 earned 0 total points
ID: 38839427
This solved my issue:

Mage::helper('catalog/output')->categoryAttribute(...)
0
 

Author Closing Comment

by:rafique12
ID: 38854276
Had to look around but found it in the end. Thanks for the help anyway!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question