Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2006
    Posts
    30
    Plugin Contributions
    0

    Default line spacing in product listing

    i'm trying to adjust the line spacing between the product listing as it appears on a category page.

    in the shop, there's a category "prints", and shop-->prints shows the array of individual prints in that category. i'm using product listing in columns, 3 per row. you can see the page here.

    i just want the product image, name, price, and more info button (i've replaced the text defined with an image), one per row. i only want a single line break between each. below the last element (the more info button) i want a nice 2-3 space gap separating it from the lower product row.

    so: image/name/price/"more info"/(2-3 breaks)

    i've being trying to edit includes/modules/product_listing.php to create this effect. i found a break tag at the end of the "case: PRODUCT_LIST_PRICE" line and took that out. i also added a break tag to the end of the line defining the "more info" button.

    but i can't figure out how to get the space out from between the product name and the price! i've got this pattern:
    image/name/(break)/price/"more info"/(2-3 breaks)

    the relevant block of code is:
    Code:
    $product_contents = array(); // Used For Column Layout (Grid Layout) Add on module
    
        for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
          $lc_align = '';
    
          switch ($column_list[$col]) {
            case 'PRODUCT_LIST_MODEL':
              $lc_align = '';
              $lc_text = $listing->fields['products_model'];
              break;
            case 'PRODUCT_LIST_NAME':
              $lc_align = '';
              if (isset($_GET['manufacturers_id'])) {
                $lc_text = '<h4 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h4><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 = '<h4 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h4><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;
            case 'PRODUCT_LIST_MANUFACTURER':
              $lc_align = '';
              $lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>';
              break;
            case 'PRODUCT_LIST_PRICE':
              $lc_price = zen_get_products_display_price($listing->fields['products_id']);
              $lc_align = 'right';
              $lc_text =  $lc_price;
    the lines "break;" seem to separate the cases defined. taking them out has no effect on spacing. i never use the manufacturers option, so i tried taking that out -- no effect.

    any ideas?

  2. #2
    Join Date
    May 2004
    Location
    Hong Kong
    Posts
    1,291
    Plugin Contributions
    1

    Default Re: line spacing in product listing

    The topic below may has the info. you want.
    adjust spacing on Column Layout Grid - HELP!

    .
    A New Starter again

  3. #3
    Join Date
    Sep 2006
    Posts
    30
    Plugin Contributions
    0

    Default Re: line spacing in product listing

    thanks for the quick reply.

    the code you offered on the other thread...
    Code:
    .centerBoxContentsProducts .itemTitle {
    margin-bottom: -1em;
    }
    ...worked perfectly.

    i added the new class at the end of the /*list box contents*/ in stylesheet.css

    thanks for your help!

  4. #4
    Join Date
    May 2004
    Location
    Hong Kong
    Posts
    1,291
    Plugin Contributions
    1

    Default Re: line spacing in product listing

    Glad to hear you had the problem sorted.
    A New Starter again

 

 

Similar Threads

  1. Product Category line spacing
    By lrfowler in forum General Questions
    Replies: 0
    Last Post: 24 Feb 2012, 06:19 AM
  2. Spacing between Product Listing
    By BFnation in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 8 Sep 2011, 09:17 PM
  3. Line spacing and font size issue on product listing page
    By limelites in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 29 Jul 2009, 07:51 AM
  4. Product listing spacing
    By bigdrunk in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Apr 2009, 10:20 AM
  5. Product listing - spacing
    By Laney in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 1 Nov 2006, 02:48 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR