community store: how to display custom product attributes?

Permalink
A question about the community store package from github (https://github.com/concrete5-community-store/community_store/)

I have created some custom product attributes in store>products>attributes, but i can't find out how to display those on a product page.

I made a custom block template by copying the default template from blocks/community_product/view.php. My custom template works, but i would like to display some of the custom product attributes. What could do i have to add to my template to achieve this?

buurvrouw
 
mesuva replied on at Permalink Best Answer Reply
mesuva
There's an answer on the github issue, but for completeness, attributes should be able to be fetched in something like a product block template using:
$attributevalue = $product->getAttribute('att_handle');
echo '<p>'. $attributevalue . '</p>';

So it's very similar to how you'd fetch an attribute from a page.
buurvrouw replied on at Permalink Reply
buurvrouw
Hi mesuva,

I just saw the answer on github, and it works perfectly. Thanks for looking into this!