0

On catalog page, I want to display custom attribute (code=inhoud2) near each product. I have tried to fetch it in different ways, it works with other attributes with plain text fields but for attributes by which a value has to be chosen in the backend from a Dropbox it will return a number instead of the chosen option.

Can anyone help me with this? (Option "Used in Product Listing" and show on front end is set to Yes for this attribute).

methods I have used so far in the list.phtml are:

returns nothing

<?php echo $_helper->productAttribute($_product, $_product->getInhoud2(), 'inhoud2') ?>

returns numeric value

<?php echo $_product->getData('inhoud2'); ?>

returns numeric value

<?php echo $_product->getData('inhoud2'); ?> 

1 Answer 1

-1

Ok, found it

<?php echo $_product->getAttributeText('inhoud2') ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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