Dirty Butter Posted November 20, 2011 Share Posted November 20, 2011 I'd like to show the full title of each item on the Latest Products. Right now it has an ellipsis. Since Google limits length to 70 characters the titles are not very long. I can't find where the name length and use of the ellipsis is controlled. Can anyone help? Quote Link to comment Share on other sites More sharing options...
CBGitty Posted February 4, 2012 Share Posted February 4, 2012 Hello, Bloody hard to find, but there is a line in classes/cubecart.class.php that arbitrarily truncates the title. In version 5.0.7 it is line 114, and it looks like this: $product['name'] = (strlen($product['name'])>42) ? substr($product['name'],0,38).'…' : $product['name']; I commented it out and suddenly I had the full titles. You may need to alter the stylesheet that controls the product box height if you have extremely long product titles, to ensure they will fit cleanly. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted February 4, 2012 Author Share Posted February 4, 2012 Hello, Bloody hard to find, but there is a line in classes/cubecart.class.php that arbitrarily truncates the title. In version 5.0.7 it is line 114, and it looks like this: $product['name'] = (strlen($product['name'])>42) ? substr($product['name'],0,38).'…' : $product['name']; I commented it out and suddenly I had the full titles. You may need to alter the stylesheet that controls the product box height if you have extremely long product titles, to ensure they will fit cleanly. Thanks, CBGitty! That helped a lot. I added a bit to the height in div.latest_product of common.css and an extra <br/> after the title in content.homepage.php, and it has the full title now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.