if works then mark as a solution.
And. for add utf8_enconde for special characters ??
Solved this error
Unable to serialize value. Error: Malformed UTF-8 characters, possibly incorrectly encoded
<?php /* @escapeNotVerified */ $name = $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> <?php echo $name = strlen($name ) > 75 ? mb_substr($name ,0,75,'UTF-8')."..." : $name ;?>
I have added this code but the product name is still only one 1 line.
I have run setup:di:compile, cache:clean, cache:flush, static-content:deploy, indexer:reindex and nothing changes.
Also, is it possible to have it go onto more than 2 lines?
EDIT: Nevermind, i realised this doesnt do the 2 line break, i fixed it by using:
<?php echo $name = wordwrap($name, 20, "<br />\n",false);?>
I'm trying to do this on Magento 2.3.5 but when inserting the code, it is throwing a zend exception error, any idea why?
I tried this one but in 2.4.5 it didn't produced any result. Any advice?