Results 1 to 5 of 5

Thread: How set the max size of product name and center it in my template?

  1. #1
    celeroncillo
    Guest


    Default How set the max size of product name and center it in my template?

    Hi, I want fit the product name to Two lines of caracters.

    Example:

    product (it see in two lines. the first this description and the second in blank)

    another product that the size is too long to see in two lines but example this line (it see in two lines, from the first word to the end of size)

    Is possible it?

    That I want is make a "perfect" line products. See attach.
    Attached Images Attached Images

  2. #2
    osCMax Development Team

    How set the max size of product name and center it in my template?

    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,517
    Total Contributions For

    pgmarshall     $ 35.00
    Rep Power
    77


    Default Re: How set the max size of product name and center it in my template?

    It might be better to simply style the text part of the description to be a fixed height capable of holding two lines of text that way it will look like a blank line where required.

    Regards.
    pgmarshall
    _______________________________

  3. #3
    celeroncillo
    Guest


    Default Re: How set the max size of product name and center it in my template?

    Hi, thanks, How I can change the height of this table?, I change some in the css of my template and I can't find the result.
    Regards.

  4. #4
    osCMax Development Team

    How set the max size of product name and center it in my template?

    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,517
    Total Contributions For

    pgmarshall     $ 35.00
    Rep Power
    77


    Default Re: How set the max size of product name and center it in my template?

    catalog/includes/modules/product_listing.php

    Find:
    PHP Code:
    // end extra product fields            
    $lc_align '';            
    if (isset(
    $_GET['manufacturers_id'])) {              
    $lc_text '<a href="' tep_href_link(FILENAME_PRODUCT_INFO'manufacturers_id=' $_GET['manufacturers_id'] . '&products_id=' $listing[$x]['products_id']) . '">' $listing[$x]['products_name'] . (($gridlist == 'list') ? $short ''/*begin epf*/ $extra /*end epf*/ '</a>';            } else {              
    $lc_text '&nbsp;<a href="' tep_href_link(FILENAME_PRODUCT_INFO, ($cPath 'cPath=' $cPath '&' '') . 'products_id=' $listing[$x]['products_id']) . '">' $listing[$x]['products_name'] . (($gridlist == 'list') ? $short ''/*begin epf*/ $extra /*end epf*/ '</a>&nbsp;';            }            
    break; 

    and change to:
    PHP Code:
    // end extra product fields            
    $lc_align '';            
    if (isset(
    $_GET['manufacturers_id'])) {              
    $lc_text '<div class="product_text"><a href="' tep_href_link(FILENAME_PRODUCT_INFO'manufacturers_id=' $_GET['manufacturers_id'] . '&products_id=' $listing[$x]['products_id']) . '">' $listing[$x]['products_name'] . (($gridlist == 'list') ? $short ''/*begin epf*/ $extra /*end epf*/ '</a></div>';            } else {              
    $lc_text '&nbsp;<div class="product_text"><a href="' tep_href_link(FILENAME_PRODUCT_INFO, ($cPath 'cPath=' $cPath '&' '') . 'products_id=' $listing[$x]['products_id']) . '">' $listing[$x]['products_name'] . (($gridlist == 'list') ? $short ''/*begin epf*/ $extra /*end epf*/ '</a></div>&nbsp;';            }            
    break; 
    Then style the
    "product_text" div in your stylesheet - try height: 20px;

    Not tested so backup before you change!

    Regards.
    pgmarshall
    _______________________________

  5. #5
    celeroncillo
    Guest


    Default Re: How set the max size of product name and center it in my template?

    Hi pgmarshall, I test it today at my website, but if I set 20px height or less in my stylesheet, the prize show over the description, ¿is possible limit the Description to the box?
    And this solution don´t show at index page, I try change the size in my stylesheet, but don´t show the result that I want.
    Thanks.

Similar Threads

  1. How to center template - etc
    By malfa in forum Templating, CSS, Design
    Replies: 2
    Last Post: 01-22-2014, 05:28 PM
  2. Contents of center column not showing in PGM template
    By k9essentials in forum Installation/Setup
    Replies: 2
    Last Post: 09-30-2011, 03:55 PM
  3. how to center dynamic mopics in product info page
    By MrE03 in forum osCmax v2 Customization/Mods
    Replies: 7
    Last Post: 11-11-2009, 01:48 PM
  4. where How to change the size for the template
    By ming in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 06-01-2009, 08:32 AM
  5. Main body text size/size of search box/adding img to footer
    By thecandypam in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 07-10-2004, 10:58 AM

Bookmarks

Posting Permissions

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