Reply 229468 to: custom function alt attribute images

Avatar: Olga Barlow
Olga Barlow
Support staff
February 7, 2020 at 11:05

Hello,

Try to replace this line in your code
$attr['alt'] = $sku . ' | ' . $title . ' | ' . $brand;

by the following one

foreach( $brand as $brand_item ) {
		$attr['alt'] = $sku . ' | ' . $title . ' | ' . $brand_item->name;
}

Regards

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.