onebrowncow Posted June 22, 2015 Share Posted June 22, 2015 I wanted a longer description which appears underneath the product title in the catalogue list view.In templates/content.category.php I found this around line 94 which appears to be the line which gives us the short description under the title in list view{$product.description_short|strip_tags:true}but I can't find where the value is specified to give the character length for the $product.description_short so instead I've changed the line of code to this: {$product.description|truncate:125:"…"|strip_tags:true}this does work but I wanted a] to be sure I've not done something that breaks coding elsewhere, which it doesn't seem to have done, and b] is there somewhere obvious I've missed where I can change or add a value to specify the .description_short length? Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 22, 2015 Share Posted June 22, 2015 In a recent version of CC6 (CC605, I believe), a dedicated short description was added to the product details. In my version of the suggested change, HTML tags were not stripped off so that bulletted lists and other stylings could be used. The Foundation skin panel will grow to accommodate the short description.Now, if you are using a skin where the panel will not grow (which is a limitation of the skin), then stripping the tags and truncating the length is appropriate -- as a display decision of the skin, not as a general limitation in admin settings that would affect any and every skin you choose to use. Quote Link to comment Share on other sites More sharing options...
onebrowncow Posted June 22, 2015 Author Share Posted June 22, 2015 OK that all makes sense and clearly in a custom skin the code modification will work but if we were looking at the default skin shipped with CC6 surely there must be a value declared somewhere either in Foundation or within CC6 which sets the precis length of the following piece of code$product.description_short Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 22, 2015 Share Posted June 22, 2015 In CubeCart versions prior to CC605, the short description was derived from the long (or rather, only) description of the product. In admin, Store Settings, Layout tab, there is "Length of Product precis". This value is used to truncate the length of the displayed description.A new feature in CC605, there is a test made. If there exists an actual 'short description', as entered on the Edit Product screen, then use it. If there isn't a short description, then derive one from the regular description.The truncation happens in the Catalogue class, productAssign() function. Which means, this happens for all skins. Quote Link to comment Share on other sites More sharing options...
onebrowncow Posted June 22, 2015 Author Share Posted June 22, 2015 OK understand. Thanks.Now how do I mark thread as resolved? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 22, 2015 Share Posted June 22, 2015 I'm the "Official Marker of Resolved" lol. 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.