2

How I can get the value of multi select attribute. I tried with below code but all return null

$pro->getCustomAttribute('offer')
$pro->getAttributes('offer');
$pro->getAttributeText('offer')
  • 1
    where you want to fetch ? – inrsaurabh Jan 7 '18 at 14:18
  • @SaurabhRanjan on list.phtml – gh darvishani Jan 8 '18 at 5:10
3
$pro->getAttributeText(‘offer’)

is the correct method to call. However, you need to make sure that the attribute is joined to your collection.

$collection->addAttributeToSelect(‘offer’)
|improve this answer|||||

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