I'm wondering if there's an easy way to create comment help text for custom product attributes (or really for any product attributes – even some core attributes could use some helper text to make it a bit more clear what they do).
What I mean by comment help text is for example what you get when you use <comment>
in system.xml
.
So, for example, let's say you wanted to add a comment under Meta Title in the Meta Information tab of a product edit page to say "This is what will show up in the browser title bar".
I just noticed that Meta Description as an example already has some comment help text ("Maximum 255 chars") underneath it, but from a quick glance I'm not seeing where that would be defined under the Attribute details under Catalog > Manage Attributes > meta_description
I haven't done much digging yet into the core code to hunt for this yet, so my apologies if this is a really stupid question!
Best Answer
Ha...this is a good one.
The field in the db that determines the text under the attribute field is
note
from theeav_attribute
table.I never noticed that you can't change that from the UI.
I've created a lot of attributes that have a 'comment' below the fields but never change one.
To add that you need to specify this in the install script:
To change it for one attribute you can add this in an install/upgrade script.
I can't believe that I've missed this in all the million versions I've used so far.
[EDIT]
See the definition of the
meta_description
attribute inMage_Catalog_Model_Resource_Setup::installEntities()
.