Emilll Posted September 9, 2015 Share Posted September 9, 2015 Hi I have a bought theme which removes some of the product name text when it gets to long. (See attached picture). Where can I change this so the text gets longer? www.hamburgerpress.se Link to comment Share on other sites More sharing options...
myselfidem Posted September 9, 2015 Share Posted September 9, 2015 (edited) Hello, You can look inside your custom theme and check or change the values about : truncate: XX:'...'|escape:'html':'UTF-8' Inside product-list.tpl {$product.name|truncate:45:'...'|escape:'html':'UTF-8'} Friendly Edited September 9, 2015 by myselfidem (see edit history) Link to comment Share on other sites More sharing options...
Emilll Posted September 9, 2015 Author Share Posted September 9, 2015 Does not work :/ I tried changed all the truncate numbers in produt-list.tpl and product.tpl but nothing happends. Can something from modules etc overwrite this truncate? Link to comment Share on other sites More sharing options...
myselfidem Posted September 9, 2015 Share Posted September 9, 2015 Remember to clear the cache to see effect and you can also delete the file : .\cache\class_index.php Link to comment Share on other sites More sharing options...
Emilll Posted September 10, 2015 Author Share Posted September 10, 2015 Yes i did, but I can see now that it works in the sub-pages but not on front page (new products / featured products), do I need to change the truncate elsewhere then? Link to comment Share on other sites More sharing options...
Emilll Posted September 11, 2015 Author Share Posted September 11, 2015 Hmm, i tried to change the truncate in homefeatured.tpl in my theme map. But still doesnt work. Have tried to delete the cache file and tried to clear cache in prestashop.. :/ What could be wrong? Link to comment Share on other sites More sharing options...
Emilll Posted September 16, 2015 Author Share Posted September 16, 2015 Changed the truncate in homefeatured to the below... <h5><a href="{$product.link}" title="{$product.name|truncate:100:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:100:'...'|escape:'htmlall':'UTF-8'}</a></h5> See attached picture below. I cannot see what im doing wrong? http://s18.postimg.org/wce3fyfy1/Capture.png Link to comment Share on other sites More sharing options...
myselfidem Posted September 16, 2015 Share Posted September 16, 2015 (edited) It seems you have made a duplicate module : homefeatured Check if you can make some modification inside : homefeaturednew.tpl file ! Edited September 16, 2015 by myselfidem (see edit history) Link to comment Share on other sites More sharing options...
Emilll Posted September 16, 2015 Author Share Posted September 16, 2015 (edited) Awesome, that worked great didnt notice I had that one and dont know why. Though, new products doesnt seem affected by this one, do you know which one is? Edit: Tried to edit the blocknewproduct, but the only truncate i find was this one <dd class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">{$newproduct.description_short|strip_tags:'UTF-8'|truncate:100:'...'} and it was already on 75 so nothing i could to there, could i add something to this page or? Edited September 16, 2015 by Emilll (see edit history) Link to comment Share on other sites More sharing options...
myselfidem Posted September 17, 2015 Share Posted September 17, 2015 It seems we haven't the same homefeatured.tpl file : Yours : <h5><a href="{$product.link}" title="{$product.name|truncate:100:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:100:'...'|escape:'htmlall':'UTF-8'}</a></h5> Try to change this line with this one : <h5 class="s_title_block"><a href="{$product.link|escape:'html'}" title="{$product.name|truncate:50:'...'|escape:'html':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'html':'UTF-8'}</a></h5> Link to comment Share on other sites More sharing options...
Emilll Posted September 17, 2015 Author Share Posted September 17, 2015 Yeah well, the homefeatured are working, and i changed to yours, its working aswell, but now i have the same problem with new products block... http://koksredskap.com/ see the 8 products below "nya produkter" (new products) .. And by the way, big thanks for helping me out, Link to comment Share on other sites More sharing options...
myselfidem Posted September 18, 2015 Share Posted September 18, 2015 The trouble is about the tpl file matching the duplicate homefeatured module ! Check the matching tpl file. See attached image. It's not about new products block but about an duplicate homefeatured module. Link to comment Share on other sites More sharing options...
Emilll Posted September 18, 2015 Author Share Posted September 18, 2015 Haha im actually totally lost right now. Ok so I have 2 diffrent homefeatured one "homefeatured" and one "homefeaturednew". I only have a homefeaturednew.tpl file in the modules map, not in the theme/modules map, but when I changed the truncate in the module map homefeaturednew.tpl the truncate changed on all featured products but not the "new products". I changed to your code in all the homefeatured.tpl files and all homefeaturednew.tpl file but its not working. So in which .tpl file should i change and what should i change, because as I see it I need to change the truncate on <h2>? not <h5> as you have suggested above. But offcourse i might be wrong because I obviously suck at this haha.. I tried to change <h2> aswell now with the above changes and well, nothing is working. I also tried to delete the homefeaturednew but then all products disepeard.. Ohh my god this is frustrating... Link to comment Share on other sites More sharing options...
myselfidem Posted September 18, 2015 Share Posted September 18, 2015 About homefeatured duplicate module you can find some help here : https://www.prestashop.com/forums/topic/238176-module-random-homefeatured/ https://www.prestashop.com/forums/topic/198074-duplicate-homefeatured-module-no-products/ http://www.addons-modules.com/prestashop-tips/2011/01/prestashop-tips-how-to-duplicate-an-existing-module/ Good luck Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now