Results 1 to 4 of 4
  1. #1
    Join Date
    May 2011
    Posts
    20
    Plugin Contributions
    0

    help question How to modify the Product Details List on the Product Details Page to look tabular?

    Hi guys,
    A total noob here but have progressed very well thanks to this great forum.

    I am trying to customise the Product Details List on the Product Details page (tpl_product_info_display.php). That is, the <UL> containing model, weight, etc... I have already removed the bullets via adding a custom tag in the stylesheet with list-style-type: none, and that's fine.

    Basically I want to make this list appear column-like, so that the model ($products_model), weight ($products_weight) etc are all say right justified at some small distance from the colon :

    So, instead of (the 'z' and '1' not vertically aligned)

    Model: zencart139
    Weight: 1 kg

    I would like (the 'z' and '1' vertically aligned)

    Model: zencart139
    Weight: 1 kg

    Any ideas ?

    Many thanks,

    adam

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to modify the Product Details List on the Product Details Page to look tabula

    There is no distinction possible in the stock output, but you can easily modify the code to allow it.
    In /includes/templates/your_template/templates/tpl_product_info_display.php, find this line
    PHP Code:
      <?php echo (($flag_show_product_info_model == and $products_model !='') ? '<li>' TEXT_PRODUCT_MODEL $products_model '</li>' '') . "\n"?>
    and add
    <span class="detailItem">
    and
    . '</span>'
    as shown:
    PHP Code:
      <?php echo (($flag_show_product_info_model == and $products_model !='') ? '<li><span class="detailItem">' TEXT_PRODUCT_MODEL '</span>' $products_model '</li>' '') . "\n"?>
    Repeat this for other details you want to affect, then add to your stylesheet

    .detailItem {display: inline-block; width: 8em;}

    Adjust to taste.
    Last edited by gjh42; 20 Jul 2011 at 04:54 PM.

  3. #3
    Join Date
    May 2011
    Posts
    20
    Plugin Contributions
    0

    Default Re: How to modify the Product Details List on the Product Details Page to look tabula

    Thanks for that, excellent.

    Just curious about this list, for example in the line you posted where you added the span class... I tried to remove the <li> tags (and the <ul> tags to see if I could remove the bullet points by removing the actual list, instead of removing the bullets via the stylesheet (which works fine). When I remove the <li>'s and <ul>'s it breaks the page. Not sure if its me not understanding the resultant syntax (likely!!).

    Anyway, thanks again.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to modify the Product Details List on the Product Details Page to look tabula

    The list is useful for more than just the bullets - it sets the organization of the elements. You could replace it with a div or something else, but it really is a list no matter how you want to style it.

 

 

Similar Threads

  1. how to get details button for product details
    By tparvaiz in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 17 Aug 2011, 03:18 PM
  2. how to display product details in tabular form?
    By murali466 in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 24 Jul 2009, 06:48 AM
  3. Adding additional Product Details to the Product Info Page??
    By Adrian88 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 9 Jan 2009, 09:38 AM
  4. Which file is the one that holds the single product details page.
    By qm360 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Mar 2008, 07:31 PM
  5. Move product details list to the right.
    By gonewild in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Nov 2006, 10:32 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR