zybxtv Posted April 7, 2012 Share Posted April 7, 2012 Dear everyone, can anyone can help me fix this problem? there are 3 pictures, first temp01.jpg is my nutritional product in "featured products" on the homepage; second temp02.jpg is my nutritional product in one selection of the "gategores"; the third temp03.jpg is when you click the product, the product detail page; for example, my product name is "CANADIAN DEEP SEA FISH OIL 1000 MG 200 SOFTGELS", how come this information can only fully display in the third picture, mean in the product detail page, but on the "featured products" and "gategores" both of them can not fully display, only display part of them, is any one can help me fix this problem, I want it can be display fully both in the "featured products" and "gategores", thanks everyone, this is really important for my web. thanks. Link to comment Share on other sites More sharing options...
Flaunt Posted April 8, 2012 Share Posted April 8, 2012 For 'Featured Products' go to your Theme folder > Modules > homefeatured. You need to open up and edit 'homefeatured.tpl' Around line 41 find this: <h5><a href="{$product.link}" title="{$product.name|truncate:50:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h5> Now, either remove '|truncate:50:' or change the number to a higher one. I'll have a look at categories for you when I get a few minutes spare. Link to comment Share on other sites More sharing options...
Flaunt Posted April 8, 2012 Share Posted April 8, 2012 I think for the category list you need to go to your Theme folder and open up 'product-list.tpl' Around line 42 find this: <h3><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3> And do exactly the same as I described in my previous post. Hope this helps Link to comment Share on other sites More sharing options...
zybxtv Posted April 9, 2012 Author Share Posted April 9, 2012 sorry, I don't know if I did something wrong, but both do not work, the homefeatured.tpl content like this: <h5><a href="{$product.link}" title="{$product.name|truncate:32:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'}</a></h5> the 'product-list.tpl' content like this: <h3>{if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if}<a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3> so I don't know how to do it, please help me, thanks. Link to comment Share on other sites More sharing options...
Flaunt Posted April 9, 2012 Share Posted April 9, 2012 Where it says '|truncate:35' change that number to a higher one, like 100 for example. Also, make sure you are editing the files from your theme folder (eg. your_theme > modules > homefeatured > homefeatured.tpl) Finally, if you still don't see any changes, check your back office Preferences > Performance and turn on 'Force Compile' then refresh your page again. Link to comment Share on other sites More sharing options...
zybxtv Posted April 9, 2012 Author Share Posted April 9, 2012 thank you very much! it did fixed. but sorry, I do get another problem: you can see the attach files below, in the "Featured Products" on the homepage, the "long" name of the product now can fully display , but it overlap on the "short description" of the product, how can do to give the long name of the product a little bit more space, to make the name and short description can not overlap, would you mind help me, thank you very much! Link to comment Share on other sites More sharing options...
Flaunt Posted April 9, 2012 Share Posted April 9, 2012 There's a couple of ways of fixing this. Can I have the URL to your site and I can decide which is the best one for you. Will only take me a few minutes Link to comment Share on other sites More sharing options...
zybxtv Posted April 9, 2012 Author Share Posted April 9, 2012 I am so lucky to meet you, I am building my website now, and do have some question , we can talk about that later, this is my web link: http://nutritiononsale.com/ Link to comment Share on other sites More sharing options...
Flaunt Posted April 9, 2012 Share Posted April 9, 2012 Go to your theme folder and open up global.css Find this on line 949: #center_column div.products_block div.product_desc { margin: 0 5px } And change to this: #center_column div.products_block div.product_desc { margin: 18px 5px } Link to comment Share on other sites More sharing options...
zybxtv Posted April 9, 2012 Author Share Posted April 9, 2012 thank you very much! it did work I change it to 40px, it can display a pretty long name, sorry, my I ask you another question? you can see the attach file below, the change from 0 to 40px make the products picture become to longer, is that possible we can change the "space between the short description and the small picture ( the picture at bottom of each product picture) of the product" become shorter? so we can make the whole product picture change to shorter to make the homepage looks better, I don't know if we can do it, please check it, thanks. Link to comment Share on other sites More sharing options...
Flaunt Posted April 9, 2012 Share Posted April 9, 2012 Yeah, sorry forgot about that. Go to the same bit of code as before: #center_column div.products_block div.product_desc { margin: 40px 5px } And change to this: #center_column div.products_block div.product_desc { margin: 40px 5px 0} Link to comment Share on other sites More sharing options...
zybxtv Posted April 9, 2012 Author Share Posted April 9, 2012 thank you very much ! it 's all done, this is so important for my web, I really appreciate you help! you have a great day!!! Link to comment Share on other sites More sharing options...
lettersets Posted April 26, 2012 Share Posted April 26, 2012 Hi! I also have an issue with the product names on the home featured page. I edited the truncate as shown above, but I was wondering if it's also possible to truncate the product name to a fixed number of lines (1 or 2) instead of a number of characters? Now some products have a product name of 1 line and others of 2 lines, causing the "View" buttons not to line up correctly. Link to comment Share on other sites More sharing options...
lettersets Posted May 20, 2012 Share Posted May 20, 2012 Bumping this up: Is it possible to: truncate the product name to a fixed number of lines (1 or 2) instead of a number of characters? Now some products have a product name of 1 line and others of 2 lines, causing the "View" buttons not to line up correctly. See example: Link to comment Share on other sites More sharing options...
srm200 Posted May 16, 2013 Share Posted May 16, 2013 Hello, I have used your advice but nothing happens when i increase the value. When i decrease the value it shows less characters. http://img191.imageshack.us/img191/1381/imagineproblema1.jpg I'm guessing it haves something to do with the box of the product... Can you help me please ? Thank you. Link to comment Share on other sites More sharing options...
martin.nv Posted January 12, 2014 Share Posted January 12, 2014 I was trying to display fully the product name and I deleted the 'truncate:50:' and it didn't helped me. Do someone have another advice? Www.applessories.cz Thank You for helping me Link to comment Share on other sites More sharing options...
vekia Posted January 12, 2014 Share Posted January 12, 2014 what file you changed? Link to comment Share on other sites More sharing options...
martin.nv Posted January 12, 2014 Share Posted January 12, 2014 Theme/default/module/homefeatured. I use defautt theme with some changings Link to comment Share on other sites More sharing options...
vekia Posted January 12, 2014 Share Posted January 12, 2014 oks, so you changed correct file. it's weird that your changes don't appear. can you please turn on force compile? maybe then it will work. also, can you show contents of your changed file? i can inspect it. Link to comment Share on other sites More sharing options...
martin.nv Posted January 14, 2014 Share Posted January 14, 2014 (edited) Solved with prestashop 1.6 Edited April 8, 2014 by applessories (see edit history) Link to comment Share on other sites More sharing options...
NVaporize Posted March 5, 2015 Share Posted March 5, 2015 I cannot find the truncate code on my homefeatured.tpl file. please help. I did manage to change it in productlist.tpl though. Im using prestashop 1.6 and the url of the website is miamipartysupply.com Ive tried several fivver friends who have also tried but failed. For the life of me i cannot get the full product name to come out on the featured products section of the homepage! Here is the whole page code for my homefeatured.tpl file! {* * 2007-2014 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2014 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {if isset($products) && $products} {include file="$tpl_dir./product-list.tpl" class='homefeatured tab-pane' id='homefeatured'} {else} <ul id="homefeatured" class="homefeatured tab-pane"> <li class="alert alert-info">{l s='No featured products at this time.' mod='homefeatured'}</li> </ul> {/if} 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