Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How To Display Product List Below Product Detail?

How To Display Product List Below Product Detail?

Locked

Views: 3,216

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
11 Jun 2009, 4:39 AM
#1
scottdev avatar

scottdev

New Zenner

Join Date:
Dec 2008
Location:
San Diego, California
Posts:
54
Plugin Contributions:
0

How To Display Product List Below Product Detail?

I would like to display the product list (link) with only the title, qty and add to cart link for the category being viewed below the product detail page.

Could someone give me a few tips on how I might do this?

1.3.8
Go Daddy Hosted

11 Jun 2009, 9:35 PM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: How To Display Product List Below Product Detail?

Just to clarify what it is that you want to do.

The page that has only one product is the product_info page. To change this you will probably have to edit tpl_product_info_display and possibly other files.

The page that displays a list of all the products is the product_listing page. A certain amount of configuration is done in the admin section. There is a good mod called flexible_product_listing which allows you to control more fully how items are displayed in the list.

If you want to put a product_list on the product_info page then that is going to take a bit more thought and programming, I believe. But maybe someone out there has already done something similar.

Let us know!

Nik

Nick
iszent.com

11 Jun 2009, 11:59 PM
#3
scottdev avatar

scottdev

New Zenner

Join Date:
Dec 2008
Location:
San Diego, California
Posts:
54
Plugin Contributions:
0

Re: How To Display Product List Below Product Detail?

Hey thanks for the information.

Wouldn't it basically be just using includes referencing the product listing code under the product description code on the tpl_product_info_display page?

We're not doing anything different with the data that is already being pulled from the db that displays products on the product_listing page. We're simply displaying the same thing but on a different page.

1.3.8
Go Daddy Hosted

13 Jun 2009, 6:08 PM
#4
justdoitrocky avatar

justdoitrocky

New Zenner

Join Date:
Apr 2009
Posts:
13
Plugin Contributions:
0

Re: How To Display Product List Below Product Detail?

I am looking for the answer too~. :smile:

17 Jun 2009, 8:16 PM
#5
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: How To Display Product List Below Product Detail?

Sorry for the delay in getting back to you. Have been a bit frantic.

Yes, it may be that simple. I'll have a look at it now.

Nik

Nick
iszent.com

17 Jun 2009, 10:05 PM
#6
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: How To Display Product List Below Product Detail?

Well, you will need someone with more knowledge of the mysql stuff that zen cart uses. Not my field I am afraid.

The way it works is that in the product_listing page:

mainpage= index loads the template:

tpl_index_product_list.php

which in turn loads

tpl_modules_product_listing.php

which in turn loads

product_listing.php which sorts the entries into an array where one entry corresponds to one <td> cell in the final table.

and it loads:

tpl_tabular_display.php which outputs the array in a form of a table which is what we see on the page.

Somewhere in that string the process breaks down if you simply call tpl_index_product_list at the bottom of the product_info page. I assume that this is because some of the variables that this template uses are not defined correctly at this point in the page. Whereas they have been if it is used in the position it was intended.

As I say you need someone with a bit more knowledge of the way zen cart processes the database, I am afraid.

Anyone?

Nick
iszent.com

30 Jun 2009, 5:59 PM
#7
scottdev avatar

scottdev

New Zenner

Join Date:
Dec 2008
Location:
San Diego, California
Posts:
54
Plugin Contributions:
0

Re: How To Display Product List Below Product Detail?

Ok - giving this a shot still:

I placed the following code at the bottom of tpl_product_info_display.php:

<!--BOF - TESTING DISPLAY PRODUCT LIST--> <?php require($template->get_template_dir('tpl_tabular_display.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_product_listing.php');?> <!--EOF - TESTING DISPLAY PRODUCT LIST-->

And received this error at the bottom of the product display page:

1109 Unknown table 'p' in field list
in:
[select count(p.products_id) as total ]

1.3.8
Go Daddy Hosted