Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2008
    Posts
    5
    Plugin Contributions
    0

    Default Featured Products placement issues

    Hi everyone,

    I'm trying to get Featured Products doing what I need, I'm close, just no cigar yet!

    On my client's site - http://www.babyfoo.co.uk - you can see we have Featured Products with only 1 product showing.

    I'd like to get this centered properly so it looks good.

    I have looked at the source and see this line -

    Code:
    <div class="centerBoxContentsFeatured centeredContent back" style="width:33%">
    Using Google's Chrome you can "inspect element" and switch bits and pieces of the CSS on and off (brilliant feature) anyway, if I kill the "width:33%" and the "back" element (which makes the whole thing float:left") then it looks better (apart from the very top menu appearing in the centre).

    does anyone have any pointers to sort this out properly? I don't want to run around changing code and making it worse, I am pretty weak at PHP and CSS but have done a bit of it in the past.

    I've used the developer tools to look for the "33%" width part but cannot find it.

    Any pointers are appreciated. Thanks.

    Colin.
    Administrator for - http://www.babyfoo.co.uk

  2. #2
    Join Date
    Feb 2008
    Posts
    5
    Plugin Contributions
    0

    Default Re: Featured Products placement issues

    Think I've managed it, not sure its the most elegant solution.

    I noticed in featured_products.php this bit of code -

    Code:
      if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS == 0) {
        $col_width = floor(100/$num_products_count);
      } else {
        $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS);
    Also a little later -

    Code:
        $list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsFeatured centeredContent"' . ' ' . 'style="width:' . $col_width . '%;"',
    So now I know where my 33% is coming from, perhaps a setting I've not found in the Admin interface or a setting hidden and the Featured Products module was intended as 5 column only.

    For now I've changed the variable to
    Code:
    $col_width = 100;
    which works for me just now, if anyone knows better please let me know. Thanks. :)
    Administrator for - http://www.babyfoo.co.uk

  3. #3
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Featured Products placement issues

    In Admin - Configuration - Index Listing there's an option called 'Featured Products Columns Per Row'. The default is 3.

 

 

Similar Threads

  1. Featured Products - styling issues
    By snaple in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Dec 2009, 12:15 AM
  2. Some issues regarding featured products
    By transilv in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 Apr 2008, 06:21 AM
  3. Featured Products Issues
    By kabbink in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 9 Apr 2008, 12:12 AM
  4. Featured Products - Heading Color Issues
    By Stiggy in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Nov 2007, 09:58 AM
  5. Featured Products/All Products - having layout issues!
    By jessiebags in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 May 2007, 10: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