Ben224 Posted August 20, 2012 Share Posted August 20, 2012 Hi, V.5.1.1 I would like to allow for more characters to be displayed in the captions or titles under the images that are displayed as a latest product. At the moment the store only displays roughly 30 letters from the actual full title including the 3 periods... This is causing my titles/caption to not make very much sense. Can anybody point me to the code that governs the amount of characters shown so that I can make an adjustment? Many thanks in advance. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted August 20, 2012 Share Posted August 20, 2012 This is from my own notes from changes I've made to my skins. Maybe it will help you. Commented out line 114 of cubecart.class.php to remove hellip of title on latest items on homepage. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 20, 2012 Share Posted August 20, 2012 The truncation has moved in CC514 (at least in the Kurouto and Vanilla skins, probably all of them). This truncation is a display format decision and as such, it is the responsibility of the skin to determine how much, if any, truncation is to take place. In the file content.homepage.php in the templates folder of any skin, find: <p class="title"><a href="{$product.url}" title="{$product.name}">{$product.name|truncate:38:"…"}</a></p> Change the 38 to what your skin/desires dictate, or delete the |truncate:38:"…" altogether. Now, in the admin screen, Store Settings, Layout tab, "Length of Product Precis" records the character count that is given to the skin for the View Category (I assume) page. So, I would expect to see a similar setting in a near future version of CC5 for the Latest Products box. Quote Link to comment Share on other sites More sharing options...
Guest alex2234 Posted August 29, 2012 Share Posted August 29, 2012 I'm using the "Killer" skin with cubecart version 4[1].3.8. I have 25 Latest Products showing on my homepade. I'd like to add some more space to each line of the Latest Products listings so their not so close together. Anyone know how to do this? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted August 29, 2012 Share Posted August 29, 2012 I'm using the "Killer" skin with cubecart version 4[1].3.8. I have 25 Latest Products showing on my homepade. I'd like to add some more space to each line of the Latest Products listings so their not so close together. Anyone know how to do this? Maybe this will help from an old thread on adjusting title length on Latest Products. Be sure you pay attention to Bsmither's information in the current thread about how this code has moved in 5.1.4. 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...
volteq Posted September 29, 2022 Share Posted September 29, 2022 can you please help by providing the details on how to do this? You may need to alter the stylesheet that controls the product box height 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.