Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2007
    Posts
    2
    Plugin Contributions
    0

    red flag HELP with Mod: "Column Layout Grid for Product Listing"

    I'm using this mod (http://www.zen-cart.com/index.php?ma...products_id=77), but the default 3 column layout sets a style width to 32.5%. I'd like to change that to a specific pixel width. I know it's going to a 3 column layout so I can "hard code" that information if necessary.

    Can anybody save me?

  2. #2
    Join Date
    Jan 2005
    Location
    NY
    Posts
    149
    Plugin Contributions
    0

    Default Re: HELP with Mod: "Column Layout Grid for Product Listing"

    You need to edit product_listing.php, which can be found in /includes/modules/.

    Make a copy and put it in /includes/modules/your_template.

    Now go to around line 237 and you should see this
    Code:
    $list_box_contents[$rows][$column] = array('params' => 'class="centerBoxContentsProducts centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
    Replace the $col_width variable with the size columns you want. Here is what the code would look like if you wanted 100px columnns.

    Code:
    $list_box_contents[$rows][$column] = array('params' => 'class="centerBoxContentsProducts centeredContent back"' . ' ' . 'style="width:100px;"',

  3. #3
    Join Date
    Nov 2007
    Posts
    19
    Plugin Contributions
    0

    Default Re: HELP with Mod: "Column Layout Grid for Product Listing"

    Another way to do it is to add some CSS to style the width of the element, just make sure to put !important there:

    whatever it is {
    width: 100px !important;
    }

  4. #4
    Join Date
    Nov 2007
    Posts
    33
    Plugin Contributions
    0

    Default Re: HELP with Mod: "Column Layout Grid for Product Listing"

    I have a slight similar question that I don't think is necessary to create a new thread. I'm trying to remove the space inbetween the title name, and the price. I think there's a space for another include, but I'm not sure which.

    What can I remove/replace to remove that simple space?

    http://www.thuyvancollection.com/ind...index&cPath=13

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

    Default Re: HELP with Mod: "Column Layout Grid for Product Listing"

    That space is the div for the description. You can edit out the code for that in product_listing.php:
    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_align '';
            if (isset(
    $_GET['manufacturers_id'])) {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
            } else {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
            }
            break; 
    Change to:
    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_align '';
            if (isset(
    $_GET['manufacturers_id'])) {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3>' ;
            } else {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3>';
            }
            break; 
    You could also do this in your stylesheet with

    .listingDescription {display: none;}
    Last edited by gjh42; 4 Mar 2008 at 01:38 AM.

  6. #6
    Join Date
    Nov 2007
    Posts
    33
    Plugin Contributions
    0

    Default Re: HELP with Mod: "Column Layout Grid for Product Listing"

    Quote Originally Posted by gjh42 View Post
    That space is the div for the description. You can edit out the code for that in product_listing.php:
    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_align '';
            if (isset(
    $_GET['manufacturers_id'])) {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
            } else {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
            }
            break; 
    Change to:
    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_align '';
            if (isset(
    $_GET['manufacturers_id'])) {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3>' ;
            } else {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3>';
            }
            break; 
    You could also do this in your stylesheet with

    .listingDescription {display: none;}
    I tried using both codes you listed, but neither seemed to have any effect. I also checked in both Safari and Firefox. Am I doing something wrong, or was the code in error?

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

    Default Re: HELP with Mod: "Column Layout Grid for Product Listing"

    At least in Firefox, the empty div is not taking any space, so deleting it will not have a visible effect.
    What will work is to hide the <br /> following that div:

    .listingDescription+br {display: none;}

    Unfortunately, IE6 does not understand the adjacent selector construction, so this will not work there.
    You will need to remove one or more <br /> tags and possibly some surrounding PHP quotes following the description and preceding the price in product_listing.php.

  8. #8
    Join Date
    Nov 2007
    Posts
    33
    Plugin Contributions
    0

    Default Re: HELP with Mod: "Column Layout Grid for Product Listing"

    Great that last code actually worked for all of the updated browsers to date (IE7, FF2, Safari). Thanks!

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

    Default Re: HELP with Mod: "Column Layout Grid for Product Listing"

    In this case, since the change is really just cosmetic, maybe you can be OK with having IE6 users get a slightly less than perfect display. I doubt they will even realize that anything is wrong.

 

 

Similar Threads

  1. Replies: 2
    Last Post: 23 Mar 2012, 03:28 PM
  2. Column Layout Grid for Product Listing mod
    By johnybravo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 29 Sep 2011, 03:42 PM
  3. Replies: 5
    Last Post: 17 Feb 2010, 05:13 PM
  4. Sort function for "Column Layout Grid for Product Listing"
    By SteveDuncan in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 30 Jan 2010, 10:46 PM
  5. 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

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