Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2011
    Posts
    106
    Plugin Contributions
    0

    Default Need to only show in one category

    Hi All,

    I am needing to only show a specific fields in a specific category on my product listings page, I have played around a bit but without any luck.

    I have been trying a bit with:

    Code:
    <?php
    if ($categories_name = 'Washing Machines') { ?>
    <div>show this thing</div>
    <?php } elseif  ($categories_name = 'Fridges')  { ?>
    <div>show that thing</div>
    <?php } else { ?>
    <div>Don't show anything</div>
    <?php } ?>
    Any help would be greatly appreciated.

    Jay

  2. #2
    Join Date
    Jul 2011
    Posts
    106
    Plugin Contributions
    0

    Default Re: Need to only show in one category

    SOLVED!!!

    I went about it the wrong way, I used the ID instead:

    Code:
    <?php
    if ($current_category_id = 'category id number') { ?>
    <div>show this thing</div>
    <?php } elseif  ($current_category_id = 'other category id number')  { ?>
    <div>show that thing</div>
    <?php } else { ?>
    <div>Don't show anything</div>
    <?php } ?>
    Not sure if it helps anyone else, but allowed me to place specifics into the product listing for specific categories.

 

 

Similar Threads

  1. Show sideboxes in only one master category
    By monkeyjr47906 in forum General Questions
    Replies: 2
    Last Post: 23 Jun 2014, 06:51 PM
  2. 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
  3. Need SideBox to show in One Catagory Only
    By ljdream00 in forum Basic Configuration
    Replies: 31
    Last Post: 16 Mar 2009, 07:30 PM
  4. I need to have a particular sidebox only show on one EZ page.
    By tolefairy in forum Basic Configuration
    Replies: 7
    Last Post: 21 Jan 2008, 08:22 AM
  5. I need to have a particular sidebox only show on one EZ page.
    By tolefairy in forum General Questions
    Replies: 0
    Last Post: 20 Jan 2008, 07:20 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