Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Column Divider Lite

    NEW CONTRIB!

    Title: Column Divider Lite
    version: 0.1
    Author: QHome
    Date: 6/7/2007


    //-------------------------
    What does this contrib do:
    //-------------------------

    This is a spin-off of the divider line I used in the Designer Monthly Boxes. Instead of limiting the divider to only the monthly specials, new products, and featured products, this contrib will make a divider for ALL pages that use the tpl_columnar_display.

    It is quite simple to use. Just add the included tpl_columnar_display.php file to your template folder and it will override the default zen-cart one without changing any core files.

    This will give divider lines for the following modules/pages:

    - New Products on the main page
    - Special Products on the main page
    - Featured Products on the main page
    - Special Products on the Specials... link
    - Additional images on the product page
    - Customers Also Purchased on the product page
    - Cross Sell on the product page (note that Cross Sell is a separate contrib that would need to be installed separately.)


    Note: If you are already using the Designer Monthly Boxes (DMB) contrib, these can both work together. Keep in mind that the other features of DMB are to allow custom positioning of the image and text within the box. This contrib only calculates the width and adds lines using the default image and text positioning. These 2 contribs both use the same stylesheet_dotline.css file and delim_v.gif image so no worries about overwriting.

    //===============================================================
    Last edited by qhome; 9 Apr 2008 at 03:36 AM.

  2. #2
    Join Date
    May 2005
    Location
    England
    Posts
    626
    Plugin Contributions
    0

    Default Re: Column Divider Lite

    Hello Qhome,

    I love this mod. it looks great. Will send you some Kudos when it comes to my next donation round.

    Sincerely,

    Russ

  3. #3
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: Column Divider Lite

    Glad you like it! Looks good on your site :)

  4. #4
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Column Divider Lite

    Hey there...

    I'm having an issue with this mod, where there isn't enough padding between the columns, so the divider isn't showing.

    Now, I noticed in your designer monthly boxes contribution, you create a table around each product, and the table has cellpadding and cellspacing and such, which allows the vertical line to show through.

    However, if you simply install the column divider lite without designer monthly boxes (unless I've screwed something up), this doesn't happen, therefore the vertical lines aren't showing up. So, for a New Products with two products listed, each product div is occupying 50%, so there is no room for the vertical line.

    I got around this by adding these lines to tpl_columnar_display.php:

    Code:
    $col_width = str_replace("50", "49", $col_width);
    $col_width = str_replace("33", "32", $col_width);
    The horizontal line doesn't show either, I fixed that by adding
    Code:
    padding:1px 0;
    to .hDotLine.

  5. #5
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: Column Divider Lite

    Quote Originally Posted by jettrue View Post
    Hey there...

    I'm having an issue with this mod, where there isn't enough padding between the columns, so the divider isn't showing.

    Now, I noticed in your designer monthly boxes contribution, you create a table around each product, and the table has cellpadding and cellspacing and such, which allows the vertical line to show through.

    However, if you simply install the column divider lite without designer monthly boxes (unless I've screwed something up), this doesn't happen, therefore the vertical lines aren't showing up. So, for a New Products with two products listed, each product div is occupying 50%, so there is no room for the vertical line.

    I got around this by adding these lines to tpl_columnar_display.php:

    Code:
    $col_width = str_replace("50", "49", $col_width);
    $col_width = str_replace("33", "32", $col_width);
    The horizontal line doesn't show either, I fixed that by adding
    Code:
    padding:1px 0;
    to .hDotLine.
    Yea, its more of a browser specific thing, but technically you are correct. I did have people running into the padding thing with horizontal lines as well. Your method will work for people with 2 or 3 columns but it can get hairy when adding more.

    I will see what else can be done but your method is probably practical if I add the replace for up to 6 columns.


    Thanks

  6. #6
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Column Divider Lite

    Quote Originally Posted by qhome View Post
    Yea, its more of a browser specific thing, but technically you are correct. I did have people running into the padding thing with horizontal lines as well. Your method will work for people with 2 or 3 columns but it can get hairy when adding more.

    I will see what else can be done but your method is probably practical if I add the replace for up to 6 columns.


    Thanks
    I saw the issue on Firefox and IE6. Didn't check IE7.

    The other thing to do, is to make a change in the module files for the all the different product listings. For example, in modules/new_products.php, you can change:

    Code:
        $col_width = floor(100/$num_products_count);
      } else {
        $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS);
      }
    to

    Code:
        $col_width = floor(100/$num_products_count) -.5;
      } else {
        $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS)-.5;
      }
    So that 50% becomes 49.5%, 33% becomes 32.5%, etc. I actually normally do the above on all zen cart installs, as I like to be able to add some padding between the columns. But I'm designing a new template, and want to change as few files as possible.

    I found that adding left and right padding to .vDotLine works in Firefox, but not in IE, and it seems that either the option in this post, or the one above, is the best for cross browser issues.

  7. #7
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: Column Divider Lite

    Quote Originally Posted by jettrue View Post
    I saw the issue on Firefox and IE6. Didn't check IE7.

    The other thing to do, is to make a change in the module files for the all the different product listings. For example, in modules/new_products.php, you can change:

    Code:
        $col_width = floor(100/$num_products_count);
      } else {
        $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS);
      }
    to

    Code:
        $col_width = floor(100/$num_products_count) -.5;
      } else {
        $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS)-.5;
      }
    So that 50% becomes 49.5%, 33% becomes 32.5%, etc. I actually normally do the above on all zen cart installs, as I like to be able to add some padding between the columns. But I'm designing a new template, and want to change as few files as possible.

    I found that adding left and right padding to .vDotLine works in Firefox, but not in IE, and it seems that either the option in this post, or the one above, is the best for cross browser issues.
    Isn't there some sort of height: 1px hack for IE or something. I can't stay current with all the hacks

  8. #8
    Join Date
    Feb 2007
    Location
    Burleson. Texas
    Posts
    194
    Plugin Contributions
    0

    Default Re: Column Divider Lite

    I was wondering if I might be doing something wrong or is it not meant to include the category view? It works fairly fine on the new products, etc., just not centered, but when I view a category (I use the column option to display my products), the dividers are not there. I do notice that there is no cell padding, even when I do a display by row, the images are crunched together. To make sure it wasn't the IH, I am importing some of the images from my live site.

  9. #9
    Join Date
    Feb 2007
    Location
    Burleson. Texas
    Posts
    194
    Plugin Contributions
    0

    Default Re: Column Divider Lite

    Quote Originally Posted by awhfy99 View Post
    I was wondering if I might be doing something wrong or is it not meant to include the category view? It works fairly fine on the new products, etc., just not centered, but when I view a category (I use the column option to display my products), the dividers are not there. I do notice that there is no cell padding, even when I do a display by row, the images are crunched together. To make sure it wasn't the IH, I am importing some of the images from my live site.

    I did find a resolution for the padding and line separation of products when the row option is selected. I added

    .productListing-data {
    padding: 0.5em;
    border-bottom: 4px solid #000000;
    }

    in the stylesheet.css, but this does nothing when the column option is applied.

  10. #10
    Join Date
    Aug 2007
    Posts
    64
    Plugin Contributions
    0

    Default Re: Column Divider Lite

    Quote Originally Posted by jettrue View Post
    Hey there...

    I'm having an issue with this mod, where there isn't enough padding between the columns, so the divider isn't showing.

    Now, I noticed in your designer monthly boxes contribution, you create a table around each product, and the table has cellpadding and cellspacing and such, which allows the vertical line to show through.

    However, if you simply install the column divider lite without designer monthly boxes (unless I've screwed something up), this doesn't happen, therefore the vertical lines aren't showing up. So, for a New Products with two products listed, each product div is occupying 50%, so there is no room for the vertical line.

    I got around this by adding these lines to tpl_columnar_display.php:

    Code:
    $col_width = str_replace("50", "49", $col_width);
    $col_width = str_replace("33", "32", $col_width);
    The horizontal line doesn't show either, I fixed that by adding
    Code:
    padding:1px 0;
    to .hDotLine.
    Where exactly in the code did you add these lines?

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Column Divider Pro (CDP) Contrib - Official Thread
    By qhome in forum All Other Contributions/Addons
    Replies: 275
    Last Post: 3 Nov 2013, 07:44 AM
  2. column divider line off centered
    By petergy in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 Mar 2013, 03:43 PM
  3. Content issue post install of column divider pro
    By matchlock in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 23 Jul 2011, 11:12 AM
  4. Front Page Question- Alyssa Rounded & Column divider
    By nolsowski in forum Addon Templates
    Replies: 9
    Last Post: 20 Apr 2011, 09:09 PM
  5. Column Divider Pro Alignment off on products
    By DigitalGuard in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 14 Jul 2008, 12:23 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