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;
Bookmarks