Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2007
    Posts
    72
    Plugin Contributions
    0

    Default Show sideboxes in only one master category

    Hello -

    I've searched the forum and I know how to show sideboxes based on page, customer login status, and product_id, however I've had zero luck figuring out how to show a sidebox only in a specific master category. Does anyone have any suggestions?

    Thanks in advance.

  2. #2
    Join Date
    Nov 2007
    Posts
    72
    Plugin Contributions
    0

    Default Re: Show sideboxes in only one master category

    Whoops I found it right after I posted ...

    Code:
    if ($_GET['cPath'] == 12 or $_GET['cPath'] == 47) {
    //do it
    } else {
    //skip it
    }

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,873
    Plugin Contributions
    96

    Default Re: Show sideboxes in only one master category

    You could add the following check around the content-building portion of /includes/templates/YOUR_TEMPLATE/sideboxes/tpl_YOUR_SIDEBOX.php to limit its display to categories listings pages with a master-categories value of 77:
    Code:
    if ($current_page_base == 'index' && $categories_depth == 'nested' && strpos ('77_', $cPath) === 0) {
      ... normal processing ...
    
    }
    Please note the use of the === (exactly equal) operator on the last clause.

    If you want to display the content on product-listing pages, too, just remove the && $categories_depth == 'nested' portion.

 

 

Similar Threads

  1. v139h Need to only show in one category
    By 4jDesigns in forum General Questions
    Replies: 1
    Last Post: 30 May 2012, 12:40 PM
  2. Total price of items in one master category
    By willsy in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 2 Aug 2011, 09:49 PM
  3. Only one category description will not show
    By Goldenis in forum Customization from the Admin
    Replies: 4
    Last Post: 13 Jan 2011, 10:13 PM
  4. Show Product listing with only one in the category
    By xuhuamao in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 31 Mar 2007, 12:49 AM

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