Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    26
    Plugin Contributions
    0

    Default Hide attributes for a category

    I want to hide the attributes section of products in a particular category only but still show them for all other categories - say category id 77 all products should not show attributes. the reason i want to do this is so that a hidden attribute can be passed when a product is purchased.

    I tried this but it does not work:

    if ($listing->fields['master_categories_id'] == '77') {
    echo ''
    } else {
    require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php');
    }

    it just always shows the template for attributes, i think it is something to do with the first line ....anyone any ideas??

    Thanks in advance

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,268
    Plugin Contributions
    3

    Default Re: Hide attributes for a category

    Possibly easier using a CATEGORY-SPECIFIC stylesheet.

    Create a NEW stylesheet called c_77.css (use notepad)

    Insert the following declaration:

    #productAttributes, .wrapperAttribsOptions {display:none;}

    (you may need to use {visibility:hidden} instead of {display:none} )

    SAVE, then ftp to your css folder.

    See what happens...
    20 years a Zencart User

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

    Default Re: Hide attributes for a category

    Hi Schoolboy

    Yeah my first thoughts were style sheet but i dont think that would work? I only want to hide all the attributes for all products in one category, how would that css entry work, wouldnt it hide attributes for ALL categories???

  4. #4
    Join Date
    Mar 2009
    Posts
    26
    Plugin Contributions
    0

    Default Re: Hide attributes for a category

    Oh hang on, i didnt read properly i will try create seperate stylesheet :)

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

    Default Re: Hide attributes for a category

    Quote Originally Posted by schoolboy View Post
    Possibly easier using a CATEGORY-SPECIFIC stylesheet.

    Create a NEW stylesheet called c_77.css (use notepad)

    Insert the following declaration:

    #productAttributes, .wrapperAttribsOptions {display:none;}

    (you may need to use {visibility:hidden} instead of {display:none} )

    SAVE, then ftp to your css folder.

    See what happens...
    Brilliant solution schoolboy, worked a treat, thankyou......... my category was actually a subcategory too so i fugured out i had to use both categories i.e. 77_78.css.............. attributes now gone for that category :) So simple, thankyou :)

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,268
    Plugin Contributions
    3

    Default Re: Hide attributes for a category

    There is a CSS-README file in the css folder... See what else you can do with SPECIFIC stylesheets...
    20 years a Zencart User

 

 

Similar Threads

  1. hide or deny Delete options For category and product
    By jennydutch in forum Customization from the Admin
    Replies: 5
    Last Post: 21 Apr 2014, 05:16 PM
  2. hide breadcrumbs for specific category
    By fakeDecoy in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 13 May 2012, 08:08 AM
  3. hide radio button or checkbox for my attributes?
    By balihr in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 1 Jul 2010, 07:47 PM
  4. Hide Price for only one category
    By microinfo in forum General Questions
    Replies: 2
    Last Post: 26 Jun 2008, 11:13 AM
  5. Hide 1 Category for Ebay checkout method
    By ryanb4614 in forum Basic Configuration
    Replies: 1
    Last Post: 9 Jun 2008, 06:26 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