Related Item Sorting (v. 2.84x)

If your related items under a product are not sorting in the same order in which you listed them, you can use the following mod to force the sort order:

  1. Open the products_variables.php file in the /enc/ folder.

  2. Find the following code (around line 830 in 2.84e):

    function var_related($prodid)
  3. A few lines down, add the code:

    $relquery .= " ORDER BY " .SB_DB_PREFIX ."_related.ID";

    just above the line:

    $relresult = mysql_query($relquery, $dblink);
  4. Save and upload the file.