Getting options stored in a custom attribute select.

Permalink
When working with custom attributes, what is the correct way to get the value stored in a 'select' attribute?

ob7dev
 
ob7dev replied on at Permalink Reply
ob7dev
Maybe I should have tried this before asking, but my answer will differ from any thing I've read on this.

I easily retrieved the attributes using the same method you would any other custom attribute, then I looped through them with a foreach command:

<? $attributes = $c->getAttribute('custom_select_attributes') ?>
<? foreach ($attributes as $attribute): ?>
<li><?=$attribute?></li>
<? endforeach; ?>


Hopefully thats helpful to someone else doing the same thing for the first time. If anyone has other ways of doing this, feel free to post on how you do it instead.

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.