Jump to content

HOW TO Change the Order (ID) of various things?


Recommended Posts

I have noticed that PS sets things in order that u add them, latest last.
e.g. in languages English is first ID 1 french is second ID 2
is there a way to show the French flag first and English second

same thing with featured products

and the Information module showing CMS links

Link to comment
Share on other sites

Step 1:
Look for the table ps_lang (or whatever your prefix language is) in phpMyAdmin.

Step 2:
Add a new field after ISO CODE. Setting could be: Name: importance, type: TINYINT

Step 3:
Fill importance in the way that you want to show in the front-office, etc.


Step 4:
Look for the function LoadLanguages in /clases/Language.php, at the end of the file in 1.2.3 version of PS
and change the line that do you have by:

$result = Db::getInstance()->ExecuteS('SELECT `id_lang`, `name`, `iso_code`, `active` FROM `'._DB_PREFIX_.'lang` ORDER BY importance' );

It works for me.

Good Look.

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...