문제

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')
도움이 되었습니까?

해결책

$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’)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top