Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Featured Products placement issues

Featured Products placement issues

Locked

Views: 638

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
6 Nov 2009, 10:11 AM
#1
colweb avatar

colweb

New Zenner

Join Date:
Feb 2008
Posts:
5
Plugin Contributions:
0

Featured Products placement issues

Hi everyone,

I'm trying to get Featured Products doing what I need, I'm close, just no cigar yet!

On my client's site - http://www.babyfoo.co.uk - you can see we have Featured Products with only 1 product showing.

I'd like to get this centered properly so it looks good.

I have looked at the source and see this line -

<div class="centerBoxContentsFeatured centeredContent back" style="width:33%">

Using Google's Chrome you can "inspect element" and switch bits and pieces of the CSS on and off (brilliant feature) anyway, if I kill the "width:33%" and the "back" element (which makes the whole thing float:left") then it looks better (apart from the very top menu appearing in the centre).

does anyone have any pointers to sort this out properly? I don't want to run around changing code and making it worse, I am pretty weak at PHP and CSS but have done a bit of it in the past.

I've used the developer tools to look for the "33%" width part but cannot find it.

Any pointers are appreciated. Thanks.

Colin.

7 Nov 2009, 12:11 AM
#2
colweb avatar

colweb

New Zenner

Join Date:
Feb 2008
Posts:
5
Plugin Contributions:
0

Re: Featured Products placement issues

Think I've managed it, not sure its the most elegant solution.

I noticed in featured_products.php this bit of code -

  if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS == 0) {
    $col_width = floor(100/$num_products_count);
  } else {
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS);

Also a little later -

    $list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsFeatured centeredContent"' . ' ' . 'style="width:' . $col_width . '%;"',

So now I know where my 33% is coming from, perhaps a setting I've not found in the Admin interface or a setting hidden and the Featured Products module was intended as 5 column only.

For now I've changed the variable to ```
$col_width = 100;

7 Nov 2009, 10:55 AM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Featured Products placement issues

In Admin - Configuration - Index Listing there's an option called 'Featured Products Columns Per Row'. The default is 3.