News:

Looking for documentation? Take a look on our wiki

Main Menu

show favourite countries on top of the drop down list

Started by K&K media production, April 25, 2012, 22:28:54 PM

Previous topic - Next topic

K&K media production

If anyone like to show favourite countries on top of the country selection drop down list, here is my solution:

1. Go to your MySql database and use this command:

UPDATE `j25_virtuemart_countries` SET `ordering` = '3'

2. Now, each country has the ordering number 3. Go to the table j25_vituemart_countries and look for your first favourite country. Now you must edit it and set the ordering number to 1. Repeat this step for each of your favourite countries.

3. You must edit this vm core file: administrator/components/com_virtuemart/models/country.php at line 45. Change

$this->_selectedOrdering = 'country_name'; to $this->_selectedOrdering = 'ordering, country_name';

4. Now go to your country selection drop down list and your favourite countries are on the top.

If you like a line between your favourite countries und the other countries, create in vm BE a new country with the name "-------------". In the database give this country the ordering number 2. Now you will have a line between your favourite countries and the other countries.

MADmarion

Arrrh... I was so happy that I found this solution, but it doesn't work for me.

I did exactly the same changes, but countries are still ordered by name+ASC.

Anything else I could check?