Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default columns and product placement

    I have installed Column Layout Grid for Product Listing and successfully now have 5 products per row (also putting 5 columns per row on product listing in the admin). The problem is if a search produces less than 5.. say 2.. then the table for the listing will be separated into 2 and centered on the screen - like this. The question is how do I always have 5 columns no matter how many results the search produces and how would make sure that they go into the most left hand columns available?

    _thanks for anything on this

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

    Default Re: columns and product placement

    The listing code tries to make neat layouts, so adjusts the item widths to fit the column if there are fewer than the specified number. You can disable this in /includes/modules/your_template/product_listing.php. Find this:
    PHP Code:
      // Used for Column Layout (Grid Layout) add on module
      
    $column 0;    
      if (
    PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
        if (
    $num_products_count PRODUCT_LISTING_COLUMNS_PER_ROW || PRODUCT_LISTING_COLUMNS_PER_ROW == ) {
          
    $col_width floor(100/$num_products_count) - 0.5;
        } else {
          
    $col_width floor(100/PRODUCT_LISTING_COLUMNS_PER_ROW) - 0.5;
        }
      }
      
    // Used for Column Layout (Grid Layout) add on module 
    and change to
    PHP Code:
      // Used for Column Layout (Grid Layout) add on module
      
    $column 0;    
      if (
    PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
        
    //if ($num_products_count < PRODUCT_LISTING_COLUMNS_PER_ROW || PRODUCT_LISTING_COLUMNS_PER_ROW == 0 ) {
          //$col_width = floor(100/$num_products_count) - 0.5;
        //} else {
          
    $col_width floor(100/PRODUCT_LISTING_COLUMNS_PER_ROW) - 0.5//force specified # of columns
        //}
      
    }
      
    // Used for Column Layout (Grid Layout) add on module 

  3. #3
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default Re: columns and product placement

    one of my favourite all time posts - thanks so much.. worked how I dreamt it.

  4. #4
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default Re: columns and product placement

    In retrospect.. > this doesn't work for Internet Explorer but seems to in the other main browsers. How could I get this working for IE as well?

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

    Default Re: columns and product placement

    Don'cha love IE...

    I really have no idea why it would behave that way. Maybe you have something in your stylesheet that is handled differently by the browsers. A link to an example that does what you describe might help in diagnosis, also what version(s) of IE it happens in.

  6. #6
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default Re: columns and product placement

    what version(s) of IE it happens in.
    All versions as far as I can tell ... this is the link

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

    Default Re: columns and product placement

    You have a classname that is not valid:
    Code:
    .399 {
    	float: left;
    	height: auto;
    	width: 100%;
    	display: inline;
    	border-bottom: thin solid #666;
    	margin: inherit;
    }
    though it does not appear to be used anywhere on that page.

    The problem may be this HTML error in view source:
    HTML Code:
    <!-- bo - bypassed_search --
    <div id="navMainSearch"> </div>
     
    
    <div class="centerColumn" id="advSearchResultsDefault">
    
    <!--<h1 id="advSearchResultsDefaultHeading"></h1> bo - omitted to remove advanced search heading from results page -->
    Line 87, Column 29: S separator in comment declaration
    <!-- bo - bypassed_search…
    This may happen if you have consecutive comments but did not close one of them properly. The proper syntax for comments is <!-- my comment -->.


    You have 17 HTML errors; fixing them in the order they appear in the validator may take care of your apparent problem.
    http://validator.w3.org/check?verbos...keyword%3Dtest

  8. #8
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default Re: columns and product placement

    .. Thanks

    You have 17 HTML errors; fixing them in the order they appear in the validator may take care of your apparent problem.
    http://validator.w3.org/check?verbos...keyword%3Dtest
    29th May 2009 10:17 PM
    From this link that you gave I only found 3 errors - the first 2 I have rectified and it still isn't right in IE. This final error (below) I cannot detect because I don't know in which file it is referring - I can't find any problem like this in the css. Any thoughts?

    94 Value Error : width attempt to find a semi-colon before the property name. add it

  9. #9
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default Re: columns and product placement

    That was a while ago and the issue was resolved - I've actually forgotten how...anyway..

    I approach you once again for a matter that seems like it should be easy to master but I haven't had that pleasure just yet..

    If you have read this thread you will know that I have the search results displayed in columns... each row is vertically aligned to the top but I cannot find how to alter it so that the results sit at the bottom of the row.

    If you know or have an incline into how to do this please... please let us all know..

    _many thanks

 

 

Similar Threads

  1. v150 More columns and rows on category/product display page.
    By rufusclc in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Aug 2013, 05:27 PM
  2. removing sidebox columns in category and product views
    By mxmerch in forum General Questions
    Replies: 0
    Last Post: 10 Mar 2010, 11:12 PM
  3. Featured product columns and rows
    By jeking in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 11 Apr 2008, 04:10 AM
  4. Adding columns in addition to product image and name in the product listing page
    By thunderbird2004 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 22 Mar 2008, 10:41 PM
  5. Product Listing Image Size and Columns Sizes
    By Outlawlb in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 13 Mar 2007, 03:39 AM

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