Results 1 to 10 of 19

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Column Layout Grid v1.3.8 Problem with first row

    I was having an issue with the Column Layout Grid add-on in that it would always drop the last object under the row. No matter how many columns I tell ZenCart I want, it does this. If I say 4 columns, then the first three columns show, and the object in the 4th shows up in a second row (and empty space where the 4th column should be). I see other people had this problem in the past.

    I read here http://www.zen-cart.com/showthread.p...isting-1-3-0-2 where Dr. Byte suggested:
    "making two small edits to the customized product_listing.php module used in the grid-layout mod: Basically, just subtracting 0.5% from the width of each cell, causing FF to render more consistently."

    Since my version of Column Layout Grid already was subtracting 0.5%, I changed it back to 1%. That fixed it for all of the rows except for the very first row. It looks differently than the other rows as well. In the first row, the product images and links are all centered. In the other rows, they are right-justified. In the first row, the product name is in bold and underlined. In the other rows, the product names look different. So there must be some specific code for just the first row.

    How do I change the first row to match the other rows?

  2. #2
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Re: Column Layout Grid v1.3.8 Problem with first row

    I have been viewing the source code and I think it has something to do with the first row as being listed as a table heading instead of table data. It does this when it displays search results as well. How do make it uniform?

  3. #3
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: Column Layout Grid v1.3.8 Problem with first row

    Quote Originally Posted by AvaAdorn View Post
    I have been viewing the source code and I think it has something to do with the first row as being listed as a table heading instead of table data. It does this when it displays search results as well. How do make it uniform?
    Any helpers will need a link to the problem page please.

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Column Layout Grid v1.3.8 Problem with first row

    Try this. it MIGHT work

    Edit the following MODULE file:

    includes/modules/YOUR-TEMPLATE/product_listing.php

    FIND
    PHP Code:
      $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;
        } 
    CHANGE TO
    PHP Code:
      $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) - 1;
        } else {
          
    $col_width floor(100/PRODUCT_LISTING_COLUMNS_PER_ROW) - 1;
        } 
    You may ALSO need to remove excessive PADDING, MARGIN or BORDER widths in any stylesheet declarations that affect those elements.
    20 years a Zencart User

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Column Layout Grid v1.3.8 Problem with first row

    Better upgrade too... Your site is a hack waiting to happen.
    20 years a Zencart User

  6. #6
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Re: Column Layout Grid v1.3.8 Problem with first row

    Thanks for the advice, schoolboy. I made that change from 0.5 to 1 before posting my question and it did work for all rows but the very first row. The problem is that the first row of products takes on the properties of what used to be the header row when my products were listed in rows instead of columns. If I remove the header row, it removes the first row of products in my case. How can I change the properties of the header row to match the other rows?

    For reference, you can see what I'm talking about here: http://www.avaadorn.com/dresses-c-3.html

    It is the same for any of my product listings/category pages.

 

 

Similar Threads

  1. Problem with Column Grid Layout in 1.3.5 - Please Help!
    By reddog73 in forum Templates, Stylesheets, Page Layout
    Replies: 26
    Last Post: 1 Sep 2010, 06:30 PM
  2. Problem with Column Layout Grid for Product Listing
    By maeve100 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 17 Aug 2009, 04:02 PM
  3. Problem with column layout grid
    By erezw in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 14 Nov 2008, 10:35 PM
  4. Column grid layout and problem with IE7
    By Don_Makaveli in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Nov 2008, 08:12 PM
  5. Column Layout Grid for Product Listing - Need Row Header
    By kwright in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 16 Oct 2008, 09:36 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