Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Product Listing layout config.

Product Listing layout config.

Locked

Views: 13,250

Results 1 to 20 of 52
This thread is locked. New replies are disabled.
13 Jun 2006, 4:05 PM
#1
v_kirk avatar

v_kirk

Zen Follower

Join Date:
Jun 2006
Posts:
110
Plugin Contributions:
0

Product Listing layout config.

i will make this as simple as possible,

my product listing layout currently looks like this...

i want it to look like this....

how would i do that?

13 Jun 2006, 6:13 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Product Listing layout config.

You would create a copy of the product_listing.php file in modules/YOUR_TEMPLATE_NAME directory and edit the layout to that which you want. It's not that difficult, but would require some basic php and CSS skills.

13 Jun 2006, 6:55 PM
#3
v_kirk avatar

v_kirk

Zen Follower

Join Date:
Jun 2006
Posts:
110
Plugin Contributions:
0

Re: Product Listing layout config.

ok, i have some basic knowledge with both, i have some web development tools that may even make it easier... idk yet :D

any other replies are still helpful

13 Jun 2006, 7:34 PM
#4
v_kirk avatar

v_kirk

Zen Follower

Join Date:
Jun 2006
Posts:
110
Plugin Contributions:
0

Re: Product Listing layout config.

what parts of it would i change? would it have to be a complete remake? or does anybody already have a code that looks like how i want it?

13 Jun 2006, 11:14 PM
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Product Listing layout config.

It's not a complete remake. More of a tweak in the relevant places. You would probably just leave the MySQL code that extracts info from the database alone and much of the rest of the file would remain as is, so you only really need to concentrate on amending the code that outputs each products details, cutting it down to the info you want and displaying it in a column format. You will find similar code in modules/feature_products.php which already does this.

13 Jun 2006, 11:20 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Listing layout config.

You might peek in the Downloads and find the:

Column Layout Grid for Product Listing

I believe this is in the Other Modules ...

14 Jun 2006, 12:52 AM
#7
jollyjim avatar

jollyjim

Totally Zenned

Join Date:
May 2005
Location:
Cheshire, UK
Posts:
401
Plugin Contributions:
2

Re: Product Listing layout config.

If using the Column Layout Grid mod and your images are different heights, they may mess up the layout. I just reverted a design to a single column because of this issue. The solution is to make you images the same height and width but when there are lots of them it is easier said than done.

Hope this tip helps you avoid a headache

JJ

14 Jun 2006, 12:54 AM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Listing layout config.

You can also just have the images align at the top ... or the text align at the bottom to allow for height differences ...

4 Jul 2006, 3:30 AM
#9
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Product Listing layout config.

I've been using the Column Listing mod in a 1.3.0.1 just fine.

Now I'm updating to 1.3.0.2 and observe significant enough changes to /includes/modules/product_listing.php
that I'm having a wee bit of trouble integrating mod code into new file version.

Version of product_listing.php I'm using with 1.3.0.1:

  • @version $Id: product_listing.php 3240 2006-03-22 04:10:45Z ajeh $
  • UPDATED TO WORK WITH COLUMNAR PRODUCT LISTING 04/04/2006

New product_listing.php in v.1.3.0.2

  • @version $Id: product_listing.php 3688 2006-06-02 00:12:18Z drbyte $

Anyone know if the Column Listing mod has been updated for 1.3.0.2?

4 Jul 2006, 6:33 AM
#12
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Product Listing layout config.

DrByte-

Comparing the stock core v.1301 and v.1302 product_listing.php files, I observe the following code fragment early in the file was removed from product_listing.php in v.1302:

// needs a better check v1.3.1
if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == true and $listing_split->number_of_rows > 0) {
  // bof: multiple products

//  $chk_attributes = $db->Execute($listing_sql);
  $chk_attributes = $db->Execute($listing_split->sql_query);
  while (!$chk_attributes->EOF) {
    if ($chk_attributes->fields['product_is_call'] == 0) {
      if (zen_get_products_allow_add_to_cart($chk_attributes->fields['products_id']) !='N') {
        if ((SHOW_PRODUCTS_SOLD_OUT_IMAGE == 1 and $chk_attributes->fields['products_quantity'] > 0) or SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) {
          if (zen_has_product_attributes($chk_attributes->fields['products_id']) < 1 and $chk_attributes->fields['products_type'] != 3) {
            $how_many++;
          }
        }
      }
    }
    $chk_attributes->MoveNext();
  }
  if ($how_many >= 1) {
    echo zen_draw_form('multiple_products_cart_quantity', zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params(array('action')) . 'action=multiple_products_add_product'), 'post', 'enctype="multipart/form-data"');
  }
}

However in the product_listing.php included in the updated "Column Layout Grid for Product Listing for 1.3.0.2" that code fragment remains. Can you confirm if needed for the Column Layout Grid mod? Thanks.

Woody

4 Jul 2006, 7:45 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Product Listing layout config.

Um ... that would make things interesting, wouldn't it .....

It should be removed.

Contribution updated

5 Jul 2006, 7:15 AM
#14
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: Product Listing layout config.

ZEN_CART_HOME_DIR/includes/modules/YOUR_TEMPLATE/product_listing.php

Hmmmmmm......... But i dont have any template_Folder in /includes/modules/ :no: :no: How to do then??????? However i have a product_listing.php in /includes/modules/

5 Jul 2006, 7:35 AM
#15
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: Product Listing layout config.

When write 3 in Product Listing - Columns Per Row i got 2 rows. Write 4 and i get 3 rows ???

It seems that one row is always emty ??

5 Jul 2006, 7:46 AM
#16
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: Product Listing layout config.

If i write 4 in Product Listing - Columns Per Row i will somtimes get 1 product per row and somtimes mixed 1 per row, 3 per row, 2 per row, 1 per row, 2 per row, :ohmy:

5 Jul 2006, 8:00 AM
#18
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Product Listing layout config.

PeterBKK:

ZEN_CART_HOME_DIR/includes/modules/YOUR_TEMPLATE/product_listing.php

Hmmmmmm......... But i dont have any template_Folder in /includes/modules/ :no: :no: How to do then??????? However i have a product_listing.php in /includes/modules/

Create the folder ;-)

Most Zen Cart documentation states that if you observe a "custom" folder already present in a directory, then that indicates overrides are suppose to work. So in the same directory create a new folder with the name of your template, and place your modified file(s) there.

Note I have had mixed success overriding modules. I don't know why, most my module overrides work, but some times they do not. In these cases I overwrite the core module files (after backing up of course).

In this particular case overriding the core product_listing.php with the version DrByte provided in the Column product listing mod update works well in v.1302.

Woody

5 Jul 2006, 8:16 AM
#19
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: Product Listing layout config.

I did not even had a classic folder in /modules/ so i replaced the product_listing.php in /modules/ Cold i do that or should i undo it as i had so many problems???

5 Jul 2006, 8:32 AM
#20
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: Product Listing layout config.

ops... I did had one classic folder :lookaroun :lookaroun