Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Product Listing page

    Besides this tutorial is there any other way of controlling which sideboxes show up on which pages.

    I have one sidebox that I would like to ONLY display on the product listing page.
    Thank you,
    autoace

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

    Default Re: Product Listing page

    You would use the principles of the tutorial, but change
    ($this_is_home_page)
    to something like
    ($current_page_base == 'index' and $_GET['cPath'] != '')

    There may be a better way of stating it, but that would be the general approach. There is more info like this in the comments at the top of tpl_main_page.php as well.

  3. #3
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Product Listing page

    Quote Originally Posted by gjh42 View Post
    You would use the principles of the tutorial, but change
    ($this_is_home_page)
    to something like
    ($current_page_base == 'index' and $_GET['cPath'] != '')

    There may be a better way of stating it, but that would be the general approach. There is more info like this in the comments at the top of tpl_main_page.php as well.
    TY, Glenn - its a starting point. Ill report back here with some results for others
    Thank you,
    autoace

  4. #4
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Product Listing page

    Quote Originally Posted by autoace View Post
    TY, Glenn - its a starting point. Ill report back here with some results for others
    Glenn,

    Now say for the sub-cats, if I wanted to do the same thing, I believe it would be something like:

    Code:
    if (in_array($cPath,explode(",",'1,1_12')) )
    Am I headed in the right direction?

    Or if on the sub-cats I merely wanted to change the width of the column, I could do that via css, correct? something like 1_12.css ?

    Thanks for your help.
    Thank you,
    autoace

  5. #5
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Product Listing page

    Quote Originally Posted by gjh42 View Post
    You would use the principles of the tutorial, but change
    ($this_is_home_page)
    to something like
    ($current_page_base == 'index' and $_GET['cPath'] != '')

    There may be a better way of stating it, but that would be the general approach. There is more info like this in the comments at the top of tpl_main_page.php as well.
    Hi Glenn,

    I followed your advise and changed the line to what you gave and then included 1,2,3,4,5,6,7,8,9,10 in the single quotes for the cPath. However, its not working the way I want it to.

    I just want the sidebox, product_filter.php to show up on the product listing pages for the categories.

    I named the variable name from 'featured' to 'product_filter" because thats the name of the file for the sidebox.

    What am I doing wrong?
    Thank you,
    autoace

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

    Default Re: Product Listing page

    I can't be sure which part of the test is failing without seeing the whole "if" statement.

    Re post 4, both approaches would work. The stylesheet name would be c_1_12.css .

  7. #7
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Product Listing page

    Quote Originally Posted by gjh42 View Post
    I can't be sure which part of the test is failing without seeing the whole "if" statement.

    Re post 4, both approaches would work. The stylesheet name would be c_1_12.css .
    Here is the if statement:

    Code:
    if ($current_page_base == 'index' and $_GET['cPath'] != '1,2,3,4,5,6,7,8,9,10') {
        $show_product_filter = true;
      } else {
        $show_product_filter = false;
      }
    Thanks for the help.
    Thank you,
    autoace

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

    Default Re: Product Listing page

    $_GET['cPath'] != '1,2,3,4,5,6,7,8,9,10'

    This won't work - you need to use the explode for the list of cats.

    in_array($cPath,explode(",",'1,2,3,4,5,6,7,8,9,10'))
    PHP Code:
    if ($current_page_base == 'index' and in_array($cPath,explode(",",'1,2,3,4,5,6,7,8,9,10')) ) {
        
    $show_product_filter true;
      } else {
        
    $show_product_filter false;
      } 
    If you want to include all subcats as well, you can truncate the value of cPath for the test with (int)

    in_array( (int)$cPath,explode(",",'1,2,3,4,5,6,7,8,9,10'))

 

 

Similar Threads

  1. v154 Featured Listing Not displaying on Product Listing Page
    By cyberfolli in forum Templates, Stylesheets, Page Layout
    Replies: 24
    Last Post: 28 Aug 2015, 12:17 AM
  2. v139h Please Help, Problem with home page ( Index listing or Product listing )
    By oziweb in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 6 Apr 2013, 05:15 AM
  3. Product Listing Page - Can I make the Buy Now Button Go to Product page?
    By gtgderek in forum Customization from the Admin
    Replies: 4
    Last Post: 12 Jun 2011, 02:16 AM
  4. Can I use features of All Products Listing in my Product Listing page?
    By bearaman in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 28 Jun 2007, 05:56 PM
  5. product listing page to look like new listing page
    By christienicole in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Jun 2006, 03:19 PM

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