Forums / Templates, Stylesheets, Page Layout / columns and product placement

columns and product placement

Locked

Views: 1,846

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
17 May 2009, 10:17 PM
#1
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

columns and product placement

I have installed Column Layout Grid for Product Listing and successfully now have 5 products per row (also putting 5 columns per row on product listing in the admin). The problem is if a search produces less than 5.. say 2.. then the table for the listing will be separated into 2 and centered on the screen - like this. The question is how do I always have 5 columns no matter how many results the search produces and how would make sure that they go into the most left hand columns available?

_thanks for anything on this

18 May 2009, 2:25 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: columns and product placement

The listing code tries to make neat layouts, so adjusts the item widths to fit the column if there are fewer than the specified number. You can disable this in /includes/modules/your_template/product_listing.php. Find this:php // 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 == 0 ) { $col_width = floor(100/$num_products_count) - 0.5; } else { $col_width = floor(100/PRODUCT_LISTING_COLUMNS_PER_ROW) - 0.5; } } // Used for Column Layout (Grid Layout) add on module and change to```php
// 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 == 0 ) {
//$col_width = floor(100/$num_products_count) - 0.5;
//} else {
$col_width = floor(100/PRODUCT_LISTING_COLUMNS_PER_ROW) - 0.5; //force specified # of columns
//}
}
// Used for Column Layout (Grid Layout) add on module

18 May 2009, 7:30 PM
#3
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: columns and product placement

one of my favourite all time posts - thanks so much.. worked how I dreamt it.

28 May 2009, 6:47 PM
#4
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: columns and product placement

In retrospect.. > this doesn't work for Internet Explorer but seems to in the other main browsers. How could I get this working for IE as well?

29 May 2009, 4:09 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: columns and product placement

Don'cha love IE...

I really have no idea why it would behave that way. Maybe you have something in your stylesheet that is handled differently by the browsers. A link to an example that does what you describe might help in diagnosis, also what version(s) of IE it happens in.

29 May 2009, 9:17 PM
#6
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: columns and product placement

what version(s) of IE it happens in.

All versions as far as I can tell ... this is the link

30 May 2009, 7:32 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: columns and product placement

You have a classname that is not valid:```
.399 {
float: left;
height: auto;
width: 100%;
display: inline;
border-bottom: thin solid #666;
margin: inherit;
}


The problem may be this HTML error in view source:```html
<!-- bo - bypassed_search --
<div id="navMainSearch"> </div>
 

<div class="centerColumn" id="advSearchResultsDefault">

<!--<h1 id="advSearchResultsDefaultHeading"></h1> bo - omitted to remove advanced search heading from results page -->

Line 87, Column 29: S separator in comment declaration

<!-- bo - bypassed_search… This may happen if you have consecutive comments but did not close one of them properly. The proper syntax for comments is <!-- my comment -->.

You have 17 HTML errors; fixing them in the order they appear in the validator may take care of your apparent problem.
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.istocklondon.com%2Findex.php%3Fmain_page%3Dadvanced_search_result%26search_in_description%3D1%26keyword%3Dtest

31 May 2009, 12:29 PM
#8
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: columns and product placement

.. Thanks

You have 17 HTML errors; fixing them in the order they appear in the validator may take care of your apparent problem.
http://validator.w3.org/check?verbos...keyword%3Dtest
29th May 2009 10:17 PM

From this link that you gave I only found 3 errors - the first 2 I have rectified and it still isn't right in IE. This final error (below) I cannot detect because I don't know in which file it is referring - I can't find any problem like this in the css. Any thoughts?

94 Value Error : width attempt to find a semi-colon before the property name. add it

19 Jul 2009, 6:03 PM
#9
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: columns and product placement

That was a while ago and the issue was resolved - I've actually forgotten how...anyway..

I approach you once again for a matter that seems like it should be easy to master but I haven't had that pleasure just yet..

If you have read this thread you will know that I have the search results displayed in columns... each row is vertically aligned to the top but I cannot find how to alter it so that the results sit at the bottom of the row.

If you know or have an incline into how to do this please... please let us all know..

_many thanks