0

I have created an multiple select attribute, visible on the frondend, it is generated with a comma as a seperator, does anyone know how to remove this comma between the shown values?

Thanks

1
  • Can you post a screenshot? Where exactly do you see the comma?
    – Amasty
    Aug 16, 2014 at 13:56

1 Answer 1

1

What you can do is create a frontend model for this attribute. Frontend models help manipulate the display of attributes in the fronend of Magento. Your code can simply take the value and then manipulate it into the format that you want to show it.

If you look at the model Mage_Eav_Model_Entity_Attribute_Frontend_Datetime as an example you can see the following things you need for your model:

  1. That it must extend Mage_Eav_Model_Entity_Attribute_Frontend_Abstract,
  2. That is needs a function getValue which will take the object that your are dealing with and then return the value formatted how you want it,

You will need to update your attribute so that it uses this model ideally via a setup script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.