Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2009
    Posts
    43
    Plugin Contributions
    0

    Default How to add a heading between row 1 and 2 on product listing page?

    I've been searching the forum for days to see if it's possible to cross sell a product to a category. haven't found the answer...so here's an alternative. Within each product listing I want to add a heading that will go directly between row 1 and 2 on the product listing page. It will say "You may also like". How can I achieve this?

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: How to add a heading between row 1 and 2 on product listing page?

    THere are a few cross sell mods in Free Software Add Ons, above. If they won't do the job, you may be able to see how they do what they do and adapt it.

  3. #3
    Join Date
    Mar 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: How to add a heading between row 1 and 2 on product listing page?

    I have the cross sell mod...but it won't cross sell products to categories as I mentioned in my post. do you know how I can add headings within the product listing page?

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

    Default Re: How to add a heading between row 1 and 2 on product listing page?

    Pretty much any modification is possible if you know PHP well enough...

    To add a blurb within the product listing, you would edit /includes/modules/your_template/product_listing.php. The largest part of that file is a loop that adds each desired element in the desired order to the listing for a product, then moves to the next product and repeats. It uses $rows as a counter (starting from 0), so you could insert your output code in an appropriate place wrapped in a test for $rows equaling 1 or whatever:
    PHP Code:
    if ($rows == 1){
      
    //your code


  5. #5
    Join Date
    Mar 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: How to add a heading between row 1 and 2 on product listing page?

    Thanks for your response Glen. Unfortunately PHP is VERY new to me. If I want to add the heading "You may also like" directly between rows 1 and 2...what should my php code look like?

    Also, is it possible to have this display for certain categories? And not on others?

    P.S. THIS FORUM ROCKS. thank you so much for your help!

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

    Default Re: How to add a heading between row 1 and 2 on product listing page?

    By "rows 1 and 2" do you mean the first two products? I can't take time right now to write the code for it.

    You can include a test for $cPath equalling the ones for categories you want to use - look at the comments in /includes/templates/template_default/common/tpl_main_page.php for an example using the explode() function.

 

 

Similar Threads

  1. product listing: Huge gap between product and price/add
    By Nkin in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 27 May 2011, 03:00 PM
  2. changin order of product listing Row heading
    By bigmo337 in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 3 Feb 2011, 07:20 PM
  3. How do I add space in between product listing?
    By LTaylorBrown in forum Setting Up Categories, Products, Attributes
    Replies: 27
    Last Post: 4 Jun 2010, 09:52 PM
  4. Remove white space between product listing and category heading
    By Yiannis in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 13 Jan 2010, 01:23 PM
  5. product listing row heading
    By studeo in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 5 May 2007, 12:51 AM

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