Forums / All Other Contributions/Addons / Column Layout grid Mod

Column Layout grid Mod

Locked

Views: 6,878

Results 21 to 40 of 43
This thread is locked. New replies are disabled.
19 Jan 2009, 8:13 PM
#21
gjh42 avatar

gjh42

Black Belt

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

Column Layout grid Mod

The version in styling product listing pages with column layout grid, post 6, is wrong. I deleted it from my saved attachments, but it still seems to be active. The version in post 26 is the latest, and should work in columns mode.

19 Jan 2009, 8:22 PM
#22
gjh42 avatar

gjh42

Black Belt

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

Re: Column Layout grid Mod

Just checked, and I had deleted the very first version in post 3 of that thread, but not the second (buggy) version in post 6. It looks like 131 people downloaded that bad copy :oops: while only 29 found the right copy in post 23.

19 Jan 2009, 8:47 PM
#23
semfusion avatar

semfusion

New Zenner

Join Date:
Jan 2009
Posts:
31
Plugin Contributions:
0

Re: Column Layout grid Mod

Hi Again. I have just uploaded quite a few products and notice that one of the products on a 4 column layout is dropping down. Take a look here; http://mirrors4home.co.uk/index.php?main_page=index&cPath=1

This is set up as a 4 column layout. If I change it to 5 columns I get 4 columns and one drops down. Any ideas?

19 Jan 2009, 8:58 PM
#24
gjh42 avatar

gjh42

Black Belt

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

Re: Column Layout grid Mod

That problem is generally due to too much border/margin/padding on the product boxes.
In /includes/modules/your_template/category_row.php, find this```php
if ($num_categories > 0) {
if ($num_categories < MAX_DISPLAY_CATEGORIES_PER_ROW || MAX_DISPLAY_CATEGORIES_PER_ROW == 0) {
$col_width = floor(100/$num_categories);
} else {
$col_width = floor(100/MAX_DISPLAY_CATEGORIES_PER_ROW);
}

19 Jan 2009, 9:07 PM
#25
semfusion avatar

semfusion

New Zenner

Join Date:
Jan 2009
Posts:
31
Plugin Contributions:
0

Re: Column Layout grid Mod

I tried it. Nothing happened. The weird thing is if I change the columns to 3 instead of 4 I get 2 columns and one drops down and the width of the product boxes expands. See here http://mirrors4home.co.uk/index.php?main_page=index&cPath=11

19 Jan 2009, 9:19 PM
#26
gjh42 avatar

gjh42

Black Belt

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

Re: Column Layout grid Mod

Did you try different numbers? Change 100 to 90, to be sure it will be effective. Then adjust to fit properly.

The boxes calculate their width based on how many are specified per row.

19 Jan 2009, 9:27 PM
#27
semfusion avatar

semfusion

New Zenner

Join Date:
Jan 2009
Posts:
31
Plugin Contributions:
0

Re: Column Layout grid Mod

I tried different numbers from 98 to 40 but nothing changes. When I change these numbers do i change them bothe or just one of them and what other file should i be adjusting to make them fit. CSS?, PHP ?

19 Jan 2009, 9:37 PM
#28
dave2006 avatar

dave2006

New Zenner

Join Date:
Apr 2006
Location:
CA, USA
Posts:
15
Plugin Contributions:
0

Re: Column Layout grid Mod

gjh42:

The version in styling product listing pages with column layout grid, post 6, is wrong. I deleted it from my saved attachments, but it still seems to be active. The version in post 26 is the latest, and should work in columns mode.

Hi,
THanks for the post can you please post the link to right one right here as well. Thanks a bunch.

Dave Junior

19 Jan 2009, 10:09 PM
#29
semfusion avatar

semfusion

New Zenner

Join Date:
Jan 2009
Posts:
31
Plugin Contributions:
0

Re: Column Layout grid Mod

OK i sused it guys.

I edited the "product_info file" with the following;
product_listing.php:

if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
if ($num_products_count < PRODUCT_LISTING_COLUMNS_PER_ROW || PRODUCT_LISTING_COLUMNS_PER_ROW == 0 ) {
$col_width = floor(90/$num_products_count);
} else {
$col_width = floor(90/PRODUCT_LISTING_COLUMNS_PER_ROW);

This works fine if you have 4 or more products in a category (or more than the specified columns in "Admin > Product Listings" but if you have 3 or less columns (or less than the specified columns on "product Layout", the product boxes expand to fit the width of the DIV.

Is there a way of fixing the width of the product boxes?

19 Jan 2009, 11:00 PM
#30
dave2006 avatar

dave2006

New Zenner

Join Date:
Apr 2006
Location:
CA, USA
Posts:
15
Plugin Contributions:
0

Re: Column Layout grid Mod

Dave2006:

Hi,
THanks for the post can you please post the link to right one right here as well. Thanks a bunch.

Dave Junior

Hi Glen,

Yes, it was fault I used the older version that you have 0_9 and after i got the right version now it works like charms!!! thank you for you great help!!!

Dave jr.

--------------- I'll be zenner like you!!! -----------------

20 Jan 2009, 7:17 AM
#31
gjh42 avatar

gjh42

Black Belt

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

Re: Column Layout grid Mod

Glad it's working for you now. I'm also glad your question prompted me to check and remove the bad file.

SEMFUSION -
If you want the products to use the 3/4-column layout even if there are fewer products than that, comment out this line

$col_width = floor(90/$num_products_count);

to get this```php
if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
if ($num_products_count < PRODUCT_LISTING_COLUMNS_PER_ROW || PRODUCT_LISTING_COLUMNS_PER_ROW == 0 ) {
//$col_width = floor(90/$num_products_count);
} else {
$col_width = floor(90/PRODUCT_LISTING_COLUMNS_PER_ROW);

5 Mar 2009, 5:23 AM
#32
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Column Layout grid Mod

Masters,

The Column Layout grid Mod allows us to chose the amount of columns to display from the Admin.
Is there a way to set the amount of rows ?

**Example : **
i have 12 products per sub-cat. I selected 4 columns. That gives me then 3 rows.
Problem is : my Zen Cart shows only 2 rows and add a "next page" button.

Click here to access my page

How can i get everything on 1 page (therefore increase to at least 3 rows)

Thanks,

Damien

5 Mar 2009, 2:28 PM
#34
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Column Layout grid Mod

It is that easy !??! :blush:

Thank you for your help.

5 Mar 2009, 4:48 PM
#35
monkeyjr47906 avatar

monkeyjr47906

New Zenner

Join Date:
Nov 2007
Posts:
72
Plugin Contributions:
0

Re: Column Layout grid Mod

I'm using 1.3.7, is there a way that I can have the grid layout only appear in certain categories of products and not others?

6 Mar 2009, 6:24 AM
#36
gjh42 avatar

gjh42

Black Belt

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

Re: Column Layout grid Mod

Product_listing.php uses a test for a constant being equal to "rows" or "columns" to decide which bits of code to execute; you could add a test for the value of $_GET['cPath'] in those spots to affect the choice.

3 Sep 2010, 7:32 PM
#37
sonat avatar

sonat

New Zenner

Join Date:
Sep 2010
Posts:
8
Plugin Contributions:
0

Re: Column Layout grid Mod

i am using v1.3.9d

i wish to display my products in a grid/clumn format instead of rows.

i downloaded unzipped the add on i for v1.3.8 and followed the instructions best way i can...

it did not work,

when i go to admin.. there is no product listing found under configuration...

further more when i go to my root file and followed the instuctions to the appropriate sub folder i did nto see the files that i needed to replace... is it possible for version 1.39d that i need te replace other folders?

thanks in advance

9 Sep 2010, 6:11 AM
#38
demiurgia avatar

demiurgia

New Zenner

Join Date:
Jul 2007
Posts:
88
Plugin Contributions:
0

Re: Column Layout grid Mod

Firts thank you for the mod. It worked perfectly for me in v1.3.8
I have one question re the layout. If you look at this page as an example under the product imge there is a huge gap to 'more info'. Would anyone know how I can make that smaller ???
Thanks:smile:

9 Sep 2010, 11:18 PM
#39
gjh42 avatar

gjh42

Black Belt

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

Re: Column Layout grid Mod

Add to your stylesheet

.listingDescription+br, .listingDescription+br+br, .listingDescription+br+br+br {display: none;}

You can also edit the <br /> instances in product_listing.php.

12 Sep 2010, 10:57 AM
#40
demiurgia avatar

demiurgia

New Zenner

Join Date:
Jul 2007
Posts:
88
Plugin Contributions:
0

Re: Column Layout grid Mod

gjh42:

Add to your stylesheet

.listingDescription+br, .listingDescription+br+br, .listingDescription+br+br+br {display: none;}

You can also edit the <br /> instances in product_listing.php.

Thanks so much Glen That worked perfectly. :smile: