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

    Default Re: How to modify your template to not show display only attributes

    Quote Originally Posted by AvaAdorn View Post
    When I add the code, it does nothing. Where are you adding the code? I added it in 3 places. I searched for TABLE_PRODUCTS_ATTRIBUTES, and then added the code underneath that.
    Yep thats right there are 3 places

    I tried a few permutations but none worked
    Only a fool say's money doesn't matter. No rich man ever starved to death.

  2. #12
    Join Date
    Jun 2014
    Location
    Close to Philadelphia, PA
    Posts
    1
    Plugin Contributions
    0

    Default Re: How to modify your template to not show display only attributes

    Just wanted to see if you guys ever found a solution to your question and not being able to "hide" the section when set to Display Only.

    As the code from the ZenCart fellow mentioned, there are 3 places where you need to add in the mySQL line of code:

    for each SQL query for TABLE_PRODUCTS_ATTRIBUTES you need to add:

    and patrib.attributes_display_only = 0



    Code:
    $sql = "select count(*) as total
              from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib
              where    patrib.products_id='" . (int)$_GET['products_id'] . "'
                and      patrib.options_id = popt.products_options_id
    			and	     patrib.attributes_display_only = 0
                and      popt.language_id = '" . (int)$_SESSION['languages_id'] . "'" .
                " limit 1";
    Code:
    $sql = "select distinct popt.products_options_id, popt.products_options_name, popt.products_options_sort_order,
                                  popt.products_options_type, popt.products_options_length, popt.products_options_comment,
                                  popt.products_options_size,
                                  popt.products_options_images_per_row,
                                  popt.products_options_images_style,
                                  popt.products_options_rows
                  from        " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib
                  where           patrib.products_id='" . (int)$_GET['products_id'] . "'
                  and             patrib.options_id = popt.products_options_id
    	      and             patrib.attributes_display_only = 0
                  and             popt.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
                  $options_order_by;
    EXCEPT THERE IS ONE SQL QUERY that you need to slightly change the line that you add, use this on the 3rd change:

    Code:
       $sql = "select    pov.products_options_values_id,
                            pov.products_options_values_name,
                            pa.*
                  from      " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
                  where     pa.products_id = '" . (int)$_GET['products_id'] . "'
                  and       pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
                  and       pa.options_values_id = pov.products_options_values_id
    	      and       pa.attributes_display_only = 0
                  and       pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
                    $order_by;

  3. #13
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Re: How to modify your template to not show display only attributes

    Quote Originally Posted by jtincher View Post
    Just wanted to see if you guys ever found a solution to your question and not being able to "hide" the section when set to Display Only.
    Thank you for submitting this code. It was helpful. However, I tried this and added the 3 lines of code exactly as you stated to my attributes.php file. My attributes that I set as Read Only still show up. Not sure what I am doing wrong.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. show additonal graphic only when text attributes display?
    By bonnit in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 24 May 2011, 09:42 AM
  2. Display-only attributes: show side by side?
    By cosmocanuck in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 20 Mar 2011, 04:29 AM
  3. How to Display Read only Attributes in Category Lists?
    By MikeInValdosta in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 1 Dec 2010, 03:31 AM
  4. Replies: 3
    Last Post: 2 Mar 2010, 03:56 AM
  5. Replies: 2
    Last Post: 17 Dec 2009, 08:58 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