Forums / Templates, Stylesheets, Page Layout / How can I format the Featured/New products list on the Home Page?

How can I format the Featured/New products list on the Home Page?

Locked

Views: 3,562

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
7 Sep 2006, 5:37 PM
#1
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

How can I format the Featured/New products list on the Home Page?

Hi

Can someone point me in the right direction... I want to format the Featured products listing on the Home page (similarly the New Products List) that appears under the main home page text. I want it to look more like the actual Featured Products pages. I have set these to display 1 product per row, with description, price, buy now etc. I want to choose 2 or 3 Fetured Products and have them listed on the home page in the same format, i.e. 1 per row but with Description, Price, Buy Now etc.

At the moment it displays an image with title and price underneath.

I have tried searching in the files and believe its something to do with tpl_columnar_display.php. The data is in the array list_box_contents[] but having a look in here shows only the image, title and price. I thought perhaps I need to change the query that gets this info and get more info for description etc. Then I can play around with tpl_columnar_display.php to show it in the right format.

Any help appreciated.

Thanks

7 Sep 2006, 5:56 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: How can I format the Featured/New products list on the Home Page?

don't touch tpl_columnar_display. It's a generator.
You need to simply change how you supply the array of data to it.

Look at how $list_box_contents is built in the module you wish to emulate, and then reproduce similar logic where you want it displayed.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Sep 2006, 6:07 PM
#3
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: How can I format the Featured/New products list on the Home Page?

Seems list_box_contents is built in includes/modules/product_listing.php

But I cant see how it works really. I mean this file seems to list all the variable in switch statements, how on earth it knows which ones to put into the list_box_contents array for the Featured Products I have no idea.

Anyone know? Am I on the right track?

8 Sep 2006, 11:27 AM
#4
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: How can I format the Featured/New products list on the Home Page?

HI
Anyone know which file I can modify to change the Featured Products layout that apepars on the home page? Thanks

8 Sep 2006, 11:29 AM
#5
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: How can I format the Featured/New products list on the Home Page?

So you can see what I am trying to do:

This is the home page (in development of course): http://www.infocomonline.co.uk/~nanzza/new/

I want the 2 featured products here to be displayed similar to what you see on this page: http://www.infocomonline.co.uk/~nanzza/new/index.php?main_page=index&cPath=1

Thanks

13 Sep 2006, 10:21 AM
#6
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: How can I format the Featured/New products list on the Home Page?

Hi
Does anyone know how I can modify the layout of the Featured Products moduke on the home page.

See this page: http://www.infocomonline.co.uk/~nanzza/

I want to modify the product layout to look like they do on this page but don't know how/which file to change: http://www.infocomonline.co.uk/~nanzza/index.php?main_page=index&cPath=1

Thanks

13 Sep 2006, 9:43 PM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: How can I format the Featured/New products list on the Home Page?

Re Post #3:
I haven't looked at the Featured listing, but assuming it's similar to the product listing page, the desired order of elements is set in admin > Configuration. Those numbers are fed into a variable (array) that is then looked at sequentially by the switch. As the switch works through the array, whichever case is true gets fed into $list_box_contents in turn.
Hope this helps you figure out what you need to do.

13 Sep 2006, 9:55 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: How can I format the Featured/New products list on the Home Page?

A thought on procedure:
You may want to take large parts of the file that builds the regular featured products page and insert it in the file that builds the featured box in place of its building code. You would still want the code for "Featured Products!" or whatever it says, and the code for randomly selecting the products to be displayed.

13 Sep 2006, 10:11 PM
#9
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: How can I format the Featured/New products list on the Home Page?

Thanks
I tried taking code from the Featured Products page and inserting it into a file for the Featured Products module on the home page but made a mess of it so came here for help hoping someone would have done this already. Will have a look at your other suggestion. I would have thought it quite simple to just add the description and More Info button to the listing!
Thanks
Laurie

5 Oct 2006, 11:32 AM
#10
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: How can I format the Featured/New products list on the Home Page?

A little late in replying, I have been on other projects, but I have figured this out now...

The files to change is:-
includes/modules/product_listing.php

(of course, dont modify this file, but put a copy in the sub directory named after the template, i.e. includes/modules/Nanzza/product_listing.php)

I changed the Select statements on Lines 15 and 21 to include pd.products_description.

Then on line 54 I changed the 'text' variable to add in the extra information I need, i.e. Product Description and a More Info button.

Laurie