Okay here you go.
I decorated XLite/Model/Product (though there might be a better class, I just went straight to the source)
Added this method:
Code:
/**
* Get truncated name
*
* @return string
*/
public function getTruncatedName()
{
$name = $this->getSoftTranslation()->getName();
return substr($name, 0, 10);
}
And then refernced it in a template like this:
Code:
{product.getTruncatedName()}
There might be a more flexible truncation function in PHP, but substr() is the only one I am familiar with.
Quick search just turned this up:
http://stackoverflow.com/questions/9219795/truncating-text-in-php
So maybe substr is the best way. If you need more control look at the second option there with a pretty little truncate function.