Results 1 to 10 of 327

Threaded View

  1. #20
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default Re: Using one single listing template

    I made the following change to the product_listing.php MODULE FILE

    includes/modules/YOUR_TEMPLATE/product_listing.php

    ORIGINAL CODE:
    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;
        } 
    MY CHANGES
    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) - 1;
        } else {
          
    $col_width floor(100/PRODUCT_LISTING_COLUMNS_PER_ROW) - 1;
        } 
    See how I changed it to SUBTRACT a whole number ( 1 full percent) rather than a fraction (0.5) which is a "half a percent".

    And as niccol says... don't add margins AND borders AND padding.

    You can gently "tweak" the CSS to nudge the display a bit, but by changing the FRACTION (0.5) to a WHOLE NUMBER (1) it works for me.

    (You might be able to make that integer GREATER if you want extra space for padding and borders. Try "2" or "3" as well...)
    Last edited by schoolboy; 31 Jul 2012 at 05:07 PM.
    20 years a Zencart User

 

 

Similar Threads

  1. Single Listing Template
    By AnglersCorner in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 24 Mar 2015, 01:55 PM
  2. single listing template addon - grid layout for products
    By noyloza in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 14 Nov 2012, 03:45 PM
  3. Column Grid / Single Listing Template Alternative
    By niccol in forum All Other Contributions/Addons
    Replies: 74
    Last Post: 9 Jul 2012, 01:25 PM
  4. Single Listing Template problem
    By gqq0404 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 15 Nov 2010, 08:57 PM
  5. Transfer of one single category from one Zen database to another
    By MeltDown in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 14 Oct 2008, 07:07 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