سؤال

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