Results 1 to 4 of 4
  1. #1
    Join Date
    May 2008
    Posts
    10
    Plugin Contributions
    0

    Default adjusting column width in main page new/featured products

    In the 'featured products' table on my home page, I made a few changes -- switched to left float, and added a tiny bit of padding between items. As a result, in a three column display, only two columns show. On a two column display, just one. The rightmost column items get bumped off. I think the problem is that the column widths are set to 33%. I can't figure out where or how to change them to about 28-30%. If this isn't clear, check out my store at surpiegirl.com/zencart. Thanks!!

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: adjusting column width in main page new/featured products

    For Featured and others that you may or may not require you will have to edit one or more files: I have indicated a -1 but you may change to -2
    This dynamically changes the width calculated minus the value you insert to allow for your padding

    As always - make changes to a copy placed in an override folder named for your template

    Go to …includes/modules/featured_products.php

    Code:
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS);
    to

    Code:
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS)-1;
    Go to …includes/modules/specials_index

    Then find..
    Code:
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS);
    Change to …

    Code:
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS) - 1;

    Go to …includes/modules/category_row.php

    Code:
    $col_width = floor(100/$num_categories);
    to

    Code:
    $col_width = floor(100/$num_categories)-1;
    Zen-Venom Get Bitten

  3. #3
    Join Date
    May 2008
    Posts
    10
    Plugin Contributions
    0

    Default Re: adjusting column width in main page new/featured products

    Beautiful!! I don't even need to add padding now. Changing the column width makes all the difference. Thank you!

  4. #4
    Join Date
    Feb 2007
    Location
    London UK
    Posts
    14
    Plugin Contributions
    0

    Default Re: adjusting column width in main page new/featured products

    This fixed my problem and I was able to use a value of -0.1. for minimal disruption to the spacing of my page.

    Thanks!

 

 

Similar Threads

  1. v151 Arrangement of Featured Products, Monthly Specials, and New Products on Main Page
    By kelly60 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 25 Nov 2014, 10:27 PM
  2. Adjusting the main column width
    By Tealer in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 15 Dec 2011, 04:32 PM
  3. Column Grid for Featured Products on Main Page
    By jtlswan in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 May 2010, 12:32 PM
  4. Column Width New Products in Empty Cart Page
    By limelites in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 25 Mar 2009, 06:43 PM
  5. Replies: 1
    Last Post: 27 Nov 2008, 12:05 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