Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2009
    Posts
    6
    Plugin Contributions
    0

    Default changing the product listing page

    Hello, I am trying to change the layout of the page that displays products in a catagory. For example, if you have a catagory full of parts in your store, and you click that catagory on the left, it takes you to a page that lists the products, i call this page the product listing page. I have seen various layouts where the price is under the description, or to the right, or the title is above the image or to the right of it. I was wondering which file contained the code to change the arrangement of that information?
    ----------------------------------------------------------------------------

    What version of Zen Cart are you using? Zen Cart 1.3.8a
    Has your site been upgraded? When? From what version(s)? no , fresh Zen Cart 1.3.8a install
    What addons have you installed? When? none
    In what ways is your site customized or different from a brand new uncustomized install? just changing the css and added some graphics to the top of the site

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: changing the product listing page

    Chages to the product listing are made in override copies of includes/modules/product_listing.php or includes or includes/templates/template_default/templates/tpl_modules_product_listing.php

    There is also a module available in the downloads section that allows for column-type product listing as well as the default row-style listing.
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  3. #3
    Join Date
    Feb 2009
    Posts
    6
    Plugin Contributions
    0

    Default Re: changing the product listing page

    Quote Originally Posted by bunyip View Post
    Chages to the product listing are made in override copies of includes/modules/product_listing.php or includes or includes/templates/template_default/templates/tpl_modules_product_listing.php

    There is also a module available in the downloads section that allows for column-type product listing as well as the default row-style listing.

    Looking into it further after some trial and error, the tpl_modules_product_listing.php file covers everything above and below the actual product rows. It looks like if you want to re-arrange the actual title/description/image format for each product listing you have to edit the "tpl_tabular_display.php" file. However...it uses an array with rows and columns to display the info from the database. I am trying to make it so the title of the item is on top, then under that the image is on the left, and the description is on the right. However. The title and the description are saved as one array item. So they cannot be split it seems.

    Which leads me to my next question...how would you make the listing page look like this http://osc.template-help.com/zencart_22650/index.php if you cannot split the title and the description apart? Im guessing somewhere in the tpl_modules_product_listing.php file there will be a change in the way it saves the info to an array that is passed to tpl_tabular_display.php?

  4. #4
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: changing the product listing page

    You'll need to be editing includes/modules/product_listing.php, remembering to save it as includes/modules/YOUR_TEMPLATE/product_listing.php
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  5. #5
    Join Date
    Feb 2009
    Posts
    6
    Plugin Contributions
    0

    Default Re: changing the product listing page

    more specifically, the array im looking at that stores the (picture/title&description/qtybox&price) info in 0/1/2 array placing like that is $list_box_contents

    so for example, $list_box_contents[1][1]['text'] would contain the title AND description together. I could do what i need to do if they were seperate. But i cant seem to find where this $list_box_contents array is initially created.

    am i going about this the right way? its the only way that makes sense to me

  6. #6
    Join Date
    Feb 2009
    Posts
    6
    Plugin Contributions
    0

    Default Re: changing the product listing page

    Quote Originally Posted by bunyip View Post
    You'll need to be editing includes/modules/product_listing.php, remembering to save it as includes/modules/YOUR_TEMPLATE/product_listing.php
    ill try that and get back to you thanks

  7. #7
    Join Date
    Feb 2009
    Posts
    6
    Plugin Contributions
    0

    Default Re: changing the product listing page

    Quote Originally Posted by bunyip View Post
    You'll need to be editing includes/modules/product_listing.php, remembering to save it as includes/modules/YOUR_TEMPLATE/product_listing.php
    this is proving to be more difficult than i expected. I am decent with php.

    But it seems like i need to make seperate array columns for the title and the description, and im not sure how to do that.

    I see that there is a 'for loop' that iterates through the columns setting the values. but i dont really get where to set a title column and where to set a description column seperately

  8. #8
    Join Date
    Feb 2009
    Posts
    6
    Plugin Contributions
    0

    Default Re: changing the product listing page

    well I got it working, for anyone else looking to do this, I had to modify the /includes/modules/product_listing.php page to tack on the description as a new array column, (i just called it column 10 because i knew it was out in the middle of nowhere but im sure you could have just appended it to the end arbitrarily, but if i set it at column 10 i could call it back out directly later)
    at the same time, i deleted the description line out of the title&description column so it was just a title column. then i had seperate title columns and description columns.

    then going to the tpl_tabular_display.php, i completely deleted the loop that runs through the columns in what appeared to be the most complicated table loop ive ever seen, and just card coded the double row template that i wanted to repeat for each item...

    thanks for pointing me to the right files.

 

 

Similar Threads

  1. Changing the format of product listing page.
    By evanderson in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Nov 2009, 11:40 AM
  2. changing the product listing page
    By kezan98 in forum Basic Configuration
    Replies: 2
    Last Post: 26 Jun 2008, 08:31 PM
  3. changing the product listing format
    By mrcoolboy15 in forum General Questions
    Replies: 3
    Last Post: 23 Apr 2008, 09:34 PM
  4. Changing the product listing layout?
    By credible in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 11 Dec 2007, 01:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg