Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2006
    Location
    Cardiff, Wales
    Posts
    305
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default 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.

  3. #3
    Join Date
    Jul 2006
    Location
    Cardiff, Wales
    Posts
    305
    Plugin Contributions
    0

    Default 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?

  4. #4
    Join Date
    Jul 2006
    Location
    Cardiff, Wales
    Posts
    305
    Plugin Contributions
    0

    Default 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

  5. #5
    Join Date
    Jul 2006
    Location
    Cardiff, Wales
    Posts
    305
    Plugin Contributions
    0

    Default 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/~nanz...=index&cPath=1

    Thanks

  6. #6
    Join Date
    Jul 2006
    Location
    Cardiff, Wales
    Posts
    305
    Plugin Contributions
    0

    Default 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/~nanz...=index&cPath=1

    Thanks

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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.

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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.

  9. #9
    Join Date
    Jul 2006
    Location
    Cardiff, Wales
    Posts
    305
    Plugin Contributions
    0

    Default 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

  10. #10
    Join Date
    Jul 2006
    Location
    Cardiff, Wales
    Posts
    305
    Plugin Contributions
    0

    Default 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

 

 

Similar Threads

  1. How can I move featured products up the home page?
    By k_pricey in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 27 Aug 2011, 09:50 AM
  2. Replies: 2
    Last Post: 15 Mar 2011, 05:54 PM
  3. how to add the add-to-cart-button to the new products box on the home page?
    By ebloger in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 10 Nov 2008, 10:30 AM
  4. How can I reformat the featured listing on the home page?
    By katandmouse in forum General Questions
    Replies: 0
    Last Post: 6 Aug 2008, 10:17 AM
  5. How can I use Flash to display my Featured Products in the home page centerbox?
    By Derwin in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 29 Dec 2007, 02:53 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR