Forums / Addon Templates / Column Layout Grid for Product Listing

Column Layout Grid for Product Listing

Views: 82,345

Results 101 to 120 of 285
1 Jul 2010, 3:31 AM
#101
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

Column Layout Grid for Product Listing

Heh, figured this one out myself, as well.

Default setting in Admin->Configuration->Product Listing: Layout Style is ROWS... change it to columns. Duh

:oops:

Thanks anyway! Hope this helps another "Newbie" in the future.

Kids Team Spirt

3 Jul 2010, 11:16 PM
#102
laurenjj avatar

laurenjj

New Zenner

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

Re: Column Layout Grid for Product Listing

So I'm using 1.3.9d...anyone else installed the mod with this version? There are some differences in code and I'm wondering if the changes affect the mod at all or if I can simply replace both files. (the tpl_modules_product_listing.php and the product_listing.php files)?

4 Jul 2010, 4:45 AM
#103
pixelarcher avatar

pixelarcher

New Zenner

Join Date:
Aug 2008
Posts:
14
Plugin Contributions:
0

Re: Column Layout Grid for Product Listing

^Ditto

I'm also using 1.3.9d and also wanted to know if anyone has used this mod with this version... successes? failures?

5 Jul 2010, 8:46 PM
#104
vidual avatar

vidual

New Zenner

Join Date:
Jul 2010
Posts:
1
Plugin Contributions:
0

Re: Column Layout Grid for Product Listing

I'm using 1.3.9d and just installed the mod. At first there was only one column and it never changed no matter what I set it to under admin. After a few hours of trying to fix it, I finally got it to work by taking out the tpl_modules_product_listing.php that came with the mod and putting my old one back in.

Edit- By my old one I mean the one that came in the default template when I downloaded it last week. :)

5 Jul 2010, 8:50 PM
#105
gjh42 avatar

gjh42

Black Belt

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

Re: Column Layout Grid for Product Listing

The originals of the files in the mod have not been changed since v1.3.8, so there should be no problem with the mod. Check the 138 mods tested on 139 thread for confirmation.

8 Jul 2010, 9:49 AM
#107
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,018
Plugin Contributions:
2

Re: Column Layout Grid for Product Listing

I have it working in 139d via the Single Listing Template mod, which IIRC was updated around 139b.

12 Jul 2010, 9:13 PM
#108
pixelarcher avatar

pixelarcher

New Zenner

Join Date:
Aug 2008
Posts:
14
Plugin Contributions:
0

Re: Column Layout Grid for Product Listing

vidual:

I'm using 1.3.9d and just installed the mod. At first there was only one column and it never changed no matter what I set it to under admin. After a few hours of trying to fix it, I finally got it to work by taking out the tpl_modules_product_listing.php that came with the mod and putting my old one back in.

Edit- By my old one I mean the one that came in the default template when I downloaded it last week. :)

this worked for me.

14 Jul 2010, 10:56 AM
#109
thornhillguy avatar

thornhillguy

New Zenner

Join Date:
Sep 2009
Posts:
35
Plugin Contributions:
0

Re: Column Layout Grid for Product Listing

I had tried this mod but do not see how to use it just for the products_all page.

I do not want to change the layout for any other pages except for the products_all page where I want the product categories to be displayed three across.

Thanks

14 Jul 2010, 11:15 AM
#110
develop_amp_promote avatar

develop_amp_promote

New Zenner

Join Date:
Apr 2010
Location:
Lincolnshire, UK
Posts:
21
Plugin Contributions:
0

Re: Column Layout Grid for Product Listing

HI All,

I have added this add on to my site, I have a 4 column display, but some of my brands only have 2 products... When you look at these, they are out of alignment... How can I fix this.

Please help

14 Jul 2010, 7:52 PM
#111
gjh42 avatar

gjh42

Black Belt

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

Re: Column Layout Grid for Product Listing

thornhillguy - The Column Grid mod only applies to the product listing page, not the all products, featured, etc.

Develop&Promote - There is code in product_listing.php that sets the width of products based on the per-row setting, or the total number if less than that. You could disable the alternative calculation to have say 2 products aligned to the left. Search the forum to find where this has been discussed before; I will be back later if you still need help.

15 Jul 2010, 10:18 AM
#112
develop_amp_promote avatar

develop_amp_promote

New Zenner

Join Date:
Apr 2010
Location:
Lincolnshire, UK
Posts:
21
Plugin Contributions:
0

Re: Column Layout Grid for Product Listing

hi gjh42,

Thankyou for taking the time to help me out. I am still having issues with this problem. I am not great at PHP...I just know the basics...

I will carry on tinkering with it. Hopefully I will sort it. I am sure other people have had the same issue. I cant be the only one. I have searched so much, but not much info.

I wish my site was live so i could post the link.

Basic problem is that the 2 products are out of alignment. The images are pushed to the right. I hate that zen cart's width are percentages.

I look forward to your reply

15 Jul 2010, 10:42 AM
#113
develop_amp_promote avatar

develop_amp_promote

New Zenner

Join Date:
Apr 2010
Location:
Lincolnshire, UK
Posts:
21
Plugin Contributions:
0

Re: Column Layout Grid for Product Listing

15 Jul 2010, 1:13 PM
#114
develop_amp_promote avatar

develop_amp_promote

New Zenner

Join Date:
Apr 2010
Location:
Lincolnshire, UK
Posts:
21
Plugin Contributions:
0

Re: Column Layout Grid for Product Listing

Hey...just letting you know that ive fixed it.

line 238 from includes/modules/(template)/product_listing.php

    // Following code will be executed only if Column Layout (Grid Layout) option is chosen
    if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
      $lc_text = implode('<br />', $product_contents);
      $list_box_contents[$rows][$column] = array('params' => 'class="centerBoxContentsProducts centeredContent back"' . ' ' . 'style="width: 200px' . $col_width . '%;"',
                                                 'text'  => $lc_text);
      $column ++;
      if ($column >= PRODUCT_LISTING_COLUMNS_PER_ROW) {
        $column = 0;
        $rows ++;

I gave the box a width of 200px.

' . 'style="width: 200px' . $col_width . '%;"',

Then changed css to suit.

Thanks for everyones help

15 Jul 2010, 4:16 PM
#115
gjh42 avatar

gjh42

Black Belt

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

Re: Column Layout Grid for Product Listing

You have left the $col_width and % in there, which ought to cause an error and probably have the inline styling ignored. Did you put a 200px width in the stylesheet?

A better way to alter this would be around line 100 in the Column Grid product_listing.php: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 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;
//}
}
// Used for Column Layout (Grid Layout) add on module

$col_width = floor(100/PRODUCT_LISTING_COLUMNS_PER_ROW) - 0.5;
will automatically make all products width according to the per-row setting, so if you were to change it to 3 per row you would not need to re-edit the code.
17 Jul 2010, 3:42 PM
#116
phanmale avatar

phanmale

New Zenner

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

Re: Column Layout Grid for Product Listing

Hi,

I just installed this mod to a 1.3.9c cart, with 3 columns and it looked like what I was trying to achieve (I will need to play with the spacing, but I have columns instead of rows).

However, if there is an excess of a multiple of 3, the products are right aligned and not left? Ive tried it on the classic template and it appears to be correct so Im assuming its my templates stylesheet. Could someone guide me to how to get the correct alignment please?

Example: http://nemesisgifts.co.uk/index.php?main_page=index&cPath=5_11_42_137&sort=20a&page=4

Thankyou

18 Jul 2010, 3:19 AM
#117
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: Column Layout Grid for Product Listing

I don't see a clear answer if this mod works with 1.3.9 so I will toss my two cents in the pot.

I installed this on a fresh 1.3.9d install and it seems to work fine and as expected

I did not test with php 5.3 (5.2.9)

18 Jul 2010, 10:06 AM
#118
kenichi avatar

kenichi

Zen Follower

Join Date:
Oct 2008
Posts:
252
Plugin Contributions:
0

Re: Column Layout Grid for Product Listing

For Product Listing, is there a way to line up the title, desc, price, and more info (add to cart button)?

The only post I found suggested using a fixed image height with width at 0, but even then some products have very horizontal width pics and it looks even worse. :no:

At the very least I would like to be able to align my price and More Info button.

Thanks :smile:

23 Jul 2010, 11:34 PM
#119
dessau77 avatar

dessau77

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Re: Column Layout Grid for Product Listing

hey everyone I too would like to know how to set up my products listings in GRID.
im using zencart 1.39d and this is how my products look like right now http://hlcstore.com/index.php?main_page=index&cPath=1

i was in ADMIN and Product listing but never found that option

wat shoul i do? i cant scan all 12 pages in this thread. can somebody help me? :oops:

http://www.hlcstore.com - high level clothing

23 Jul 2010, 11:42 PM
#120
dropbop avatar

dropbop

Zen Follower

Join Date:
Apr 2008
Location:
Athlone, Ireland
Posts:
177
Plugin Contributions:
1

Re: Column Layout Grid for Product Listing

Did you copy the files to your template folders?

Try double checking that you changed the names of the YOUR_TEMPLATE folders to the actual name of your template folders (includes/templates/yourtemplate). Its probably the most common mistake.

Another thing you could check is that you installed the SQL statement correctly, if at all.

If none of those are the problem, you may need to ask your website designer about it, they may have used some custom code that could be stopping it from working properly.

Hope that helps,

DB