Nikki22 0 Posted January 23, 2012 Hello all: I'm new here, and in the processing of setting up my PrestaShop for launch next month. Love the software, but I have a number of questions I'll be seeking help with over the next couple of weeks. For reference, I have extensive experience working with WordPress code, so I can handle fairly advanced issues and modifications. However, I don't consider myself a coder and I especially don't understand the ins and outs of how PrestaShop works. The Question: I would like to stop the truncation of item titles in the product list. (For example, when a users clicks on a category.) I have read on this forum that to do this, I just need to modify product_list.tpl in coremanager. However, I cannot find coremanager--has it been removed from the current version? I tried to go to: modules/coremanager/modules as direction, but it doesn't seem to exist. I did edit the product_list.tpl file in the theme directory, but it didn't affect any change on the item names. They were still truncated. Any help or advice on this is appreciated. - Nikki Share this post Link to post Share on other sites
Mike Kranzler 490 Posted January 23, 2012 Hi Nikki, First of all, welcome to PrestaShop! As for your issue, can you post a screenshot of a spot on your site having this issue? Is it just the character limit or something beyond that? -Mike Share this post Link to post Share on other sites
Nikki22 0 Posted January 23, 2012 Hi Nikki, First of all, welcome to PrestaShop! As for your issue, can you post a screenshot of a spot on your site having this issue? Is it just the character limit or something beyond that? -Mike Hey Mike, thanks for the quick reply. I have attached a screenshot as requested. You'll see what I mean on the second item in the list, "Angel of Flight Alabaster." Whereas the other items with shorter titles feature the full name (including "Innistrad X/YZ), the case of "Angel of Flight," the title truncates because it exceeds the character limit. I did try modifying the character limit in the theme's product_list.tpl file, but it didn't make any change. Share this post Link to post Share on other sites
Mike Kranzler 490 Posted January 23, 2012 Hi Nikki, In your theme's product-list.tpl file, locate the following line (should be around line 42 in v1.4.6.2) {$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'} and increase the truncate value from 35 to whatever you would like it to be. Once you do so, please be sure to go to your Back Office under Preferences > Performance and turn on Force Compile turn off Caching to ensure that you are seeing the latest version of your updates. Please let me know if this works for you. -Mike 1 Share this post Link to post Share on other sites
Nikki22 0 Posted January 23, 2012 That fixed it. Thanks! I didn't understand about needing to Force Compile. I appreciate the help! I'm sure you'll be hearing more from me.... ;-) Share this post Link to post Share on other sites
Mike Kranzler 490 Posted January 23, 2012 Great, I'm glad I could help! What Force Compile does is require the site to load from scratch each time rather than drawing from your browser cache. It's not recommended for a live environment because it will noticeably slow down your site, but when it comes to debugging or making changes, it's a huge time-saver. I'll go ahead and mark this thread as solved for you, and once again, welcome to PrestaShop! -Mike Share this post Link to post Share on other sites
lgk49 0 Posted April 22, 2012 Hi,Mike,It works. thanks. Share this post Link to post Share on other sites
josal 0 Posted November 16, 2012 Hi, and do you know how to do the same but regarding the subcategory names? I've looked for something similar than truncate:... in the source code, concretely in /modules/productscategory/productscategory.tpl, but it doesn't change anything (with recompilation). {$categoryProduct.name|truncate:15:'...'|escape:'htmlall':'UTF-8'} Thanks in advance!! Share this post Link to post Share on other sites
ienabellamy 2 Posted February 18, 2014 and do you know how to do the same but regarding the subcategory names? I've looked for something similar than truncate:... in the source code, concretely in /modules/productscategory/productscategory.tpl, but it doesn't change anything (with recompilation). {$categoryProduct.name|truncate:15:'...'|escape:'htmlall':'UTF-8'} Thanks in advance!! UP ! this is super interesting thing ! i tried also to check category.tpl : title="{$subcategory.name|escape:'htmlall':'UTF-8'}" >{$subcategory.name|escape:'htmlall':'UTF-8'}</a> but here no truncate appear..why ? i tried also to modify /modules/productscategory/productscategory.tpl ({$categoryProduct.name|truncate:15:'...'|escape:'htmlall':'UTF-8'}) but with no success ! (after deleting cache/ compile/ of course) needing help !! Share this post Link to post Share on other sites
vipier 0 Posted November 8, 2016 Great, I'm glad I could help! What Force Compile does is require the site to load from scratch each time rather than drawing from your browser cache. It's not recommended for a live environment because it will noticeably slow down your site, but when it comes to debugging or making changes, it's a huge time-saver. I'll go ahead and mark this thread as solved for you, and once again, welcome to PrestaShop! -Mike Hello Mike, I know this is an old post, but I was wondering if you know if there's a way to have different truncate values for mobile? thanks!! Share this post Link to post Share on other sites
isabelaober 11 Posted October 11, 2019 I just found a way to NEVER truncate by just removing part of the code, changing part of the code of our friend Infor-All. 1. Go to /public_html/themes/YourTheme/templates/catalog/_partials/miniatures/product.tpl 2. Change <div class="product-description"> {block name='product_name'} {if $page.page_name == 'index'} <h3 class="h3 product-title" itemprop="name"><a href="{$product.canonical_url}">{$product.name|truncate:30:'...'}</a></h3> {else} <h2 class="h3 product-title" itemprop="name"><a href="{$product.canonical_url}">{$product.name|truncate:30:'...'}</a></h2> {/if} {/block} To: <div class="product-description"> {block name='product_name'} {if $product.name|count_characters > 35} {if $page.page_name == 'index'} <h3 class="h3 product-title" style="margin-top: -0.1rem;" itemprop="name"> <a href="{$product.url}">{$product.name}</a> </h3> {else} <h2 class="h3 product-title" style="margin-top: -0.1rem;" itemprop="name"> <a href="{$product.url}">{$product.name}</a> </h2> {/if} {else} {if $page.page_name == 'index'} <h3 class="h3 product-title" itemprop="name"> <a href="{$product.url}">{$product.name}</a> </h3> {else} <h2 class="h3 product-title" itemprop="name"> <a href="{$product.url}">{$product.name}</a> </h2> {/if} {/if} {/block} Basically I just removed the truncate, changing "{$product.name|truncate:30:'...'}" to "{$product.name}" Then Recompile your files (Advanced Parameters - Performance - Smarty Change "never recompile" to"recompile files", clear cache, change back to never recompile I use Prestashop 1.7.0 Share this post Link to post Share on other sites