Forums / Templates, Stylesheets, Page Layout / styling product listing pages with column layout grid

styling product listing pages with column layout grid

Views: 50,719

Results 161 to 180 of 220
12 Jul 2011, 8:41 PM
#161
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

styling product listing pages with column layout grid

I believe at the moment the grid is in the form...
A B C
D E F
G H I

but the post above was asking for (or so I interpreted it)...
A D G
B E H
C F I

I can imagine code that would take the number of columns and the number of products to be displayed, parse them into an array, rotate the array, and spit out the results this way. But I can't write that code.

Rob

Breakfast: the most important donut of the day.

12 Jul 2011, 8:54 PM
#162
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

rstevenson:

I believe at the moment the grid is in the form...
A B C
D E F
G H I

but the post above was asking for (or so I interpreted it)...
A D G
B E H
C F I

I can imagine code that would take the number of columns and the number of products to be displayed, parse them into an array, rotate the array, and spit out the results this way. But I can't write that code.

Rob

aha, that was too simple for my pea brain to fathom...thanks for telling me...lol

since I have mine arranged to show the newest first it works fine as is for me...

12 Jul 2011, 10:53 PM
#163
stampsville avatar

stampsville

Zen Follower

Join Date:
Jul 2004
Posts:
123
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

Hi,
Yes,

A D G
B E H
C F I

is the way I am trying to get it. It is primarily for a text list of items with a selector, no images or buy now buttons. Have about 1500 items that are currently on a price sheet and would like to basically duplicate that.

Thanks
Grant

23 Aug 2011, 4:10 AM
#164
makehveli avatar

makehveli

New Zenner

Join Date:
Mar 2011
Posts:
33
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

First off, thank you to gjh42.
This mod works beautifully.

http://beautyglowshop.com/hair_care/combination_sets
^THE LOOK I WOULD LIKE TO ACHIEVE CONSISTENTLY

however, when their are only a few products and the row is not completely filled out a huge gap appears in the center between products
http://beautyglowshop.com/hair_care/combination_sets?sort=20a&page=2

and when their is a single product it just looks wacky
http://beautyglowshop.com/hair_care/combination_sets?sort=20a&filter_id=142&alpha_filter_id=0

In need of a CSS guru far smarter than I.

23 Aug 2011, 4:46 AM
#165
makehveli avatar

makehveli

New Zenner

Join Date:
Mar 2011
Posts:
33
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

btw I'm using all_business template... but heavily modified.

23 Aug 2011, 5:36 AM
#166
makehveli avatar

makehveli

New Zenner

Join Date:
Mar 2011
Posts:
33
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

never mind, got it.
for anyone who gets the same problem
specify widths with px not %

5 Sep 2011, 8:54 PM
#167
hbonner avatar

hbonner

New Zenner

Join Date:
May 2011
Posts:
3
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

Is the file attached to post #50 still the most current version of the flexible product listing add on?

5 Sep 2011, 11:35 PM
#168
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

hbonner:

Is the file attached to post #50 still the most current version of the flexible product listing add on?

not remembering the changes he may have done but as far as I know it is the latest but is still written for 1.3.8 zen cart...I do have it installed in my 1.3.9h cart which was upgraded from that same version and it works so it may not hurt.

wonder why he never updated the mod page...hmmm

If you are using 1.3.9h then it would probably be a good bet to merge or compare and manually add the code he provides to a copy of the actual store files vs overwriting them.

5 Sep 2011, 11:43 PM
#169
hbonner avatar

hbonner

New Zenner

Join Date:
May 2011
Posts:
3
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

DarkAngel:

not remembering the changes he may have done but as far as I know it is the latest but is still written for 1.3.8 zen cart...I do have it installed in my 1.3.9h cart which was upgraded from that same version and it works so it may not hurt.

wonder why he never updated the mod page...hmmm

If you are using 1.3.9h then it would probably be a good bet to merge or compare and manually add the code he provides to a copy of the actual store files vs overwriting them.
Thanks for your quick response.

I'm using 1.3.9h and I have a test site I can try merging it into before using it on the real thing. Just wanted to make sure I wasn't using the wrong source.

6 Sep 2011, 12:25 PM
#170
gjh42 avatar

gjh42

Black Belt

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

Re: styling product listing pages with column layout grid

I never actually submitted the mod to Free Addons, so post 50 is still the latest version. There was a minor change to product_listing.php (on 2010-07-29) after the version I used, but it was a purely cosmetic/housekeeping change that would not affect its function.

23 Oct 2011, 9:13 AM
#171
dwbjd avatar

dwbjd

New Zenner

Join Date:
Oct 2011
Posts:
1
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

1.3.9a with column grid layout

On my product listing page - is there a way to anchor the 'buy now' button to the bottom of the centerBox (which I have defined in stylesheet to fixed height)? so that the "buy now" buttons amongst the columns in a row are horizontally aligned with one another, the way the item names are at the top of centerBox.

This same question has been asked twice in this thread...any help would be greatly appreciated...

thank you

31 Oct 2011, 7:15 AM
#172
gjh42 avatar

gjh42

Black Belt

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

Re: styling product listing pages with column layout grid

You can either give the items above the buy now button fixed heights, or position the buy now button absolutely with the container positioned relatively. The best solution may depend on your particular circumstances. I could advise better if I can see your site live.

12 Dec 2011, 3:11 PM
#173
cookiepus avatar

cookiepus

Zen Follower

Join Date:
Jan 2010
Posts:
131
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

Where can i download the latest version of this mod?
i found a version from 2009, is there another?

Thanks
Cookie

12 Dec 2011, 3:12 PM
#174
cookiepus avatar

cookiepus

Zen Follower

Join Date:
Jan 2010
Posts:
131
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

Sorry - question had been answered already :blush:

20 Nov 2012, 7:36 PM
#175
idc1 avatar

idc1

Zen Follower

Join Date:
Jul 2011
Posts:
139
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

Maybe someone in this thread will know the solution. I am using the column grid 1.3.8 plugin on ZC1.39.

Goal: Get the quantity discount that is shown in product_info.php to show on product_listing.php

So Far: I have applied some code that AJEH put out. The following was inserted in the included/modules/custom/product_listing.php

  case 'PRODUCT_LIST_PRICE':

//trying ajeh code

// $lc_align = 'right';
$lc_price = $products_discount_type = zen_products_lookup($listing->fields['products_id'], $what_field = 'products_discount_type');
if ($products_discount_type != 0) {
$rows++;
$products_id_current = (int)$listing->fields['products_id'];
$quantityDiscounts = array();
$products_discount_type_from = zen_products_lookup($listing->fields['products_id'], $what_field = 'products_discount_type_from');
require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCTS_QUANTITY_DISCOUNTS));
require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php');
}
else
{ $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';

	  $lc_align = 'right';
      $lc_text =   $lc_price;}

//ending ajeh code

Results: I seem to get the correct data on the page but it is listed at the top of the page and not attached to each item.

http://www DOT skippypages DOT COM/index.php?main_page=index&cPath=1055

Any thoughts?

Thanks

ZC 1.5.5
Add ons: - Column/Grid 1.3.8 - Dual pricing 1.7 - ImageHandler3

20 Nov 2012, 9:40 PM
#176
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

idc1:

Maybe someone in this thread will know the solution. I am using the column grid 1.3.8 plugin on ZC1.39.

Goal: Get the quantity discount that is shown in product_info.php to show on product_listing.php

So Far: I have applied some code that AJEH put out. The following was inserted in the included/modules/custom/product_listing.php

  case 'PRODUCT_LIST_PRICE':

//trying ajeh code

// $lc_align = 'right';
$lc_price = $products_discount_type = zen_products_lookup($listing->fields['products_id'], $what_field = 'products_discount_type');
if ($products_discount_type != 0) {
$rows++;
$products_id_current = (int)$listing->fields['products_id'];
$quantityDiscounts = array();
$products_discount_type_from = zen_products_lookup($listing->fields['products_id'], $what_field = 'products_discount_type_from');
require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCTS_QUANTITY_DISCOUNTS));
require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php');
}
else
{ $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';

         $lc_align = 'right';
      $lc_text =   $lc_price;}

//ending ajeh code

Results: I seem to get the correct data on the page but it is listed at the top of the page and not attached to each item.

http://www DOT skippypages DOT COM/index.php?main_page=index&cPath=1055

Any thoughts?

Thanks

I am guessing here cause most of my editing is hit and miss...I miss then apply in a different spot till I get it to hit...lol

I think you may have put the coding in the area under : case 'PRODUCT_LIST_PRICE'

Have you tried putting the code down further in the file around where it says (about line: 103):

case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
$lc_align = 'right';
$lc_text = $lc_price;

To me that is the area that matches your code too. unless you did put it there and not higher up in the file.

20 Nov 2012, 11:47 PM
#177
gjh42 avatar

gjh42

Black Belt

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

Re: styling product listing pages with column layout grid

Requiring tpl_modules_products_quantity_discounts.php is most likely going to output the results immediately. You would need to make a version of that file that accumulates the results into a string variable which can be put into $lc_price/$lc_text for later output.

And yes, you would need to put the code in the second set of cases where individual products are built, not the first set where headings are built. You are doing that right, or else there would only be one set (or none) of quantity discounts generated.

26 Nov 2012, 2:26 PM
#178
idc1 avatar

idc1

Zen Follower

Join Date:
Jul 2011
Posts:
139
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

DarkAngel and gjh42, I hope you two had a wonderful Thanksgiving and thanks for the input.

@DarkAngel, I too am a hit and miss kind of hacker :) I feel like I have tried every possible option (all misses)!
@ gjh42 :shocking:

gjh42:

Requiring tpl_modules_products_quantity_discounts.php is most likely going to output the results immediately. You would need to make a version of that file that accumulates the results into a string variable which can be put into $lc_price/$lc_text for later output.
I will give my best attempt at this before coming back for some hand holding.

ZC 1.5.5
Add ons: - Column/Grid 1.3.8 - Dual pricing 1.7 - ImageHandler3

27 Nov 2012, 4:57 PM
#179
gjh42 avatar

gjh42

Black Belt

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

Re: styling product listing pages with column layout grid

I have reworked the file to accumulate output in a variable named $qdt and renamed it tpl_modules_products_quantity_discounts_list.php, so you would use this in your product_listing.php:

case 'PRODUCT_LIST_PRICE':
//trying ajeh code

// $lc_align = 'right';
$lc_price = $products_discount_type = zen_products_lookup($listing->fields['products_id'], $what_field = 'products_discount_type');
if ($products_discount_type != 0) {
$rows++;
$products_id_current = (int)$listing->fields['products_id'];
$quantityDiscounts = array();
$products_discount_type_from = zen_products_lookup($listing->fields['products_id'], $what_field = 'products_discount_type_from');
require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCTS_QUANTITY_DISCOUNTS));
require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts_list.php');//gjh42 20121127
$lc_price = $qdt;//gjh42 20121127
}
else
{ $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';

$lc_align = 'right';
$lc_text = $lc_price;}

//ending ajeh code
``` Please try this and post with your experience. If it needs tweaking, I will need to see the site live to know exactly how it is behaving.Attachment #11530
27 Nov 2012, 8:08 PM
#180
idc1 avatar

idc1

Zen Follower

Join Date:
Jul 2011
Posts:
139
Plugin Contributions:
0

Re: styling product listing pages with column layout grid

I've added the new tpl_modules_products_quantity_discounts_list.php file and made the adjustment within the product_listing.php and you can see the results at www dot skippypages com

Observations:
-It omits some of the products under the Airbox tab. It only shows 18 of 32 items. The missing appear to be the ones with discounts
-It shows all 50 items under belts which 37 do not have pricing. Those missing pricing appear to be those with discounts.

ZC 1.5.5
Add ons: - Column/Grid 1.3.8 - Dual pricing 1.7 - ImageHandler3