Results 1 to 5 of 5
  1. #1

    Default Category specific sidebox

    Hi!
    I would like to enable a side box for only one product category, I would need it to display on all the pages which are in that category (product pages, sub categories)

    So far the only way I can think of doing this is by checking who the product manufacturer is and based upon the result I would be able to set my sidebox to show or not to show.

    Can someone please tell me if there is a better way to do this or if this is the way to go than what PHP coding should I use ?


    TIA


  2. #2

    Default Re: Category specific sidebox

    for anyone interested, I got it to work by using the following code in modules/sideboxes/custom_sidebox.php

    if ($current_category_id == '3' || $current_category_id == '78' || $current_category_id == '79' || $current_category_id == '80')

    $show_custom_sidebox = true;
    }

    else
    { $show_custom_sidebox = false; }


    replace the numbers 3,78,79,80 with your category ID

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Category specific sidebox

    Thanks for the update that you solved this and the example of how you accomplished it!
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Jul 2009
    Posts
    37
    Plugin Contributions
    0

    Default Re: Category specific sidebox

    This fix still works, though there is a typo in the above code. It is missing an open bracket. The fixed code should be:

    if ($current_category_id == '3' || $current_category_id == '78' || $current_category_id == '79' || $current_category_id == '80') {

    $show_custom_sidebox = true;
    }

    else
    { $show_custom_sidebox = false; }

  5. #5
    Join Date
    Jul 2009
    Posts
    37
    Plugin Contributions
    0

    Default Re: Category specific sidebox

    BTW, much thanks to hbtrading for coming up with this solution!

 

 

Similar Threads

  1. Replies: 4
    Last Post: 23 Feb 2014, 09:39 PM
  2. v151 Change specific category link color on sidebox
    By longstockings in forum General Questions
    Replies: 0
    Last Post: 8 Oct 2013, 11:00 AM
  3. Disable a Specific Sidebox on Just One Specific EZPage
    By limelites in forum Basic Configuration
    Replies: 1
    Last Post: 23 Feb 2009, 03:22 AM
  4. EZ Pages sidebox appear in only specific category id's?
    By HTsean in forum General Questions
    Replies: 1
    Last Post: 14 May 2008, 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