Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Attribute Manager sort order problem help


Recommended Posts

In The contrib Ajax Manager , I can move option values up/down within each option group, and move option groups up/down in relation to other option groups.


The problem is however the reflection on my catalog is not perfect. The option values as ordered within option groups is retained, but the option group ordering is not reflected.


Can any suggest why? I have double checked product_info.php, and both of the 2 queries there sort by products_options_sort_order. So my code from that section reads like this:


$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_sort_order");

while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {

$products_options_array = array();

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.products_options_sort_order");



I noticed that if you have the attribute sort order contrib the last query there is sorted by attribute_sort. Not that using that helps either. Also in attributeManagerConfig.class.php is it correct that both AM_FIELD_OPTION_SORT_ORDER and AM_FIELD_OPTION_VALUE_SORT_ORDER use products_options_sort_order? Does nothing refer to the attribute_sort column created by the attribute sort order contrib?


I don't see the need to install the attribute sort order contrib if the tablet column it creates isn't used. I installed it anyway. It seems this contrib uses the existing sort order columns from the 2 related tables in the DB.


Incidentally, no values are being generated in the products_options_sort_order column of the products_options table. Perhaps that gives a clue.


Please help!!

Link to comment
Share on other sites

  • 3 months later...


This topic is now archived and is closed to further replies.

  • Create New...