Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Aug 2005
    Posts
    100
    Plugin Contributions
    0

    Default Hide disply only attributes

    Hi
    I hope this is the right place to post this question.

    Is there a way to hide display only attributes?
    Only a fool say's money doesn't matter. No rich man ever starved to death.

  2. #2
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: Hide disply only attributes

    May i have a link to the attribute in question here please ...
    And explain a little more in detail ..
    Mark
    Hare Do

  3. #3
    Join Date
    Aug 2005
    Posts
    100
    Plugin Contributions
    0

    Default Re: Hide disply only attributes

    Hi
    I have installed the Numinix googlefroogle add on and it uses the attributes for google categories but the problem is the display only attributes show on the ad and I need to hide them. I am not the only one looking for a solution to this and numinix does not respond to posts about it.

    http://velvetfreeway.com/aaaa/index....&products_id=1

    It would be great if you could help
    Only a fool say's money doesn't matter. No rich man ever starved to death.

  4. #4
    Join Date
    Sep 2005
    Location
    Austria
    Posts
    104
    Plugin Contributions
    6

    xhtml problem Re: Hide disply only attributes

    You could hide these display only attributes via CSS:

    1)
    Find in includes/modules/(YOURTEMPLATE)/attributes.php:
    Code:
    // Read Only - just for display purposes
                      if ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY) {
                        //            $tmp_html .= '<input type="hidden" name ="id[' . $products_options_names->fields['products_options_id'] . ']"' . '" value="' . stripslashes($products_options->fields['products_options_values_name']) . ' SELECTED' . '" />  ' . $products_options->fields['products_options_values_name'];
                        $tmp_html .= $products_options_details . '<br />';
                      } else {
                        $zv_display_select_option ++;
                      }
    Assign an ID by changing to:
    Code:
     // Read Only - just for display purposes
                      if ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY) {
                        //            $tmp_html .= '<input type="hidden" name ="id[' . $products_options_names->fields['products_options_id'] . ']"' . '" value="' . stripslashes($products_options->fields['products_options_values_name']) . ' SELECTED' . '" />  ' . $products_options->fields['products_options_values_name'];
                        $tmp_html .= '<div id="merchanthide">' . $products_options_details . '</div>';
                      } else {
                        $zv_display_select_option ++;
                      }
    2)
    Now you can add the following to your includes/templates/YOURTEMPLATE/stylesheet.css:
    Code:
    #merchanthide{
    	display:none;
    }

  5. #5
    Join Date
    Aug 2005
    Posts
    100
    Plugin Contributions
    0

    Default Re: Hide disply only attributes

    Thanks for that but for some reason it does not work
    Only a fool say's money doesn't matter. No rich man ever starved to death.

  6. #6
    Join Date
    Aug 2005
    Posts
    75
    Plugin Contributions
    0

    Default Re: Hide disply only attributes

    Let me know if you still need a solution that works globally. In plain words NO read only attributes will show anywhere on the site. Works perfectly with Dynamic Filter and you only have to alter 2 lines in 1 file
    Making sure we get the cost of freight back will drive us all mad at some stage.

  7. #7
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,151
    Plugin Contributions
    11

    Default Re: Hide disply only attributes

    Since this forum is a venue to help those in need, how's about posting your solution just in case you're on a cruise when it's needed.

  8. #8
    Join Date
    May 2013
    Posts
    38
    Plugin Contributions
    0

    Default Re: Hide disply only attributes

    I've found this solution:

    Edit your /includes/modules/<template>/attributes.php file. If it doesn't exist, copy the attributes.php file from /includes/modules/attributes.php and put it there.

    Once in the file, locate these lines (this started on line 554 for me):

    Code:
    // READONLY
    case ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY):
    $options_name[] = $products_options_names->fields['products_options_name'];
    $options_menu[] = $tmp_html . "\n";
    $options_comment[] = $products_options_names->fields['products_options_comment'];
    $options_comment_position[] = ($products_options_names->fields['products_options_comment_position'] == '1' ? '1' : '0');
    break;
    Comment the lines so it looks like this:

    Code:
    // READONLY
    case ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY):
    //$options_name[] = $products_options_names->fields['products_options_name'];
    //$options_menu[] = $tmp_html . "\n";
    //$options_comment[] = $products_options_names->fields['products_options_comment'];
    //$options_comment_position[] = ($products_options_names->fields['products_options_comment_position'] == '1' ? '1' : '0');
    break;
    Make sure you leave the 'break;' uncommented so the switch statement knows to break.

    I left the case uncommented because I personally don't like messing with code I didn't write all too much. While it probably won't hurt to just remove the above portion entirely, I like to just comment out what I don't need so I can just remove the comments if I need it later.

  9. #9
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Hide disply only attributes

    Quote Originally Posted by dbltoe View Post
    Since this forum is a venue to help those in need, how's about posting your solution just in case you're on a cruise when it's needed.
    Too funny!!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

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

    Default Re: Hide disply only attributes

    How does googlefroogle use the read-only attributes? Does it look at your website at all, or does it just get a feed straight from you?

    Giving read-only attributes an id means that if there is more than one, there will be duplicate ids on the page - an HTML/CSS no-no. Make it a class instead of an id to be safe. Better yet, base the class (or id in this case) on the options name id and you will get a unique tag that can be used to address just this kind of read-only attribute, leaving others alone. Of course, if every product has a different option name for its google attribute, that would be impractical to handle in styling.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v138a Hide attributes
    By tjmuse in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 5 Sep 2013, 06:59 PM
  2. Hide the "Read Only " attributes
    By crazycucumber in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 5 Feb 2013, 03:10 PM
  3. hide attributes?
    By TheBuz in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 30 Apr 2009, 02:28 PM
  4. category disply
    By hanbar in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 15 Mar 2008, 03:23 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