Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006
    Posts
    23
    Plugin Contributions
    0

    Default Truncate product names to 1 line

    Some of my product names are going onto 2 lines on the front page and this is throwing the dimentions of the boxes off so they look out of place. Does anyone know how to truncate these to use only 1 line?

    I am using a custom template and zen casrt 1.3.8a.

    Many thanks,

    Al

  2. #2
    Join Date
    Jun 2010
    Location
    Austria
    Posts
    115
    Plugin Contributions
    0

    Default Re: Truncate product names to 1 line

    You can modify the length via PHP:

    substr($s,0,$m)

    where $s is your title, 0 means from the start and $m should be the number of characters you wish to show.

    PHP function explained here: http://uk3.php.net/manual/en/function.substr.php

    ---

    Alternatively, you could use CSS to fix the height & width and set overflow to hidden which will then effectively hide the text although it will still show in the page source.

  3. #3
    Join Date
    Jan 2006
    Posts
    23
    Plugin Contributions
    0

    Default Re: Truncate product names to 1 line

    Thanks for that. Would you happen to know which file I would need to edit for this?

    Many thanks.

 

 

Similar Threads

  1. Truncate instead of wrap category names in sidebox
    By pharry in forum General Questions
    Replies: 3
    Last Post: 12 Jul 2009, 09:22 PM
  2. Truncate Product Name in Packing Slip
    By maineiac13 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 25 Jun 2009, 03:09 PM
  3. Can You Truncate Product Names?
    By pensive612 in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 8 Nov 2008, 04:52 PM
  4. Display Product Description - truncate issue
    By got2know in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 20 Apr 2007, 08:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg