[SOLVED] & tested on version 1.5.x
To sort 'weight based shipping options' by
price instead of
alphabetically.
You will need to do three small easy steps :
First....
1. Go to => /public_html/catalog/model/shipping/weight.php
FIND
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "geo_zone ORDER BY name");
REPLACE WITH
//$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "geo_zone ORDER BY name");
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "geo_zone ORDER BY geo_zone_id");
and save.
Next....
2. Go to your store admin panel -
www.yourdomainname.com/admin/index.php? ... n/geo_zone
and create all new GeoZones that you want to use. (this is important because if you reuse your old GeoZones you will lose the weight based rates data on your weight-based shipping option) Lets not worry about adding any zones to these new GeoZones you will use for weight based shipping yet.
Finally...
3. First step is to backup your database. (you can do that inside your admin panel and save the .sql file to your desktop or external hard-drive)
Get into your 'phpMyAdmin' and click on your database. When the database is expanded, look for your "geo_zone" and click on it.
Once loaded, look on the right side (browse tab) you will see list of all your current geo_zones, your new geo_zones and their corresponding "geo_zone_id" in a numeric value. Start by finding your most expensive geo_zone for the weight based shipping option. Click edit, and change the geo_zone_id to 90, then click go, so it saves and goes back to previous screen. Then find your next most expensive geo_zone for the weight based shipping option. Click edit, and change the geo_zone_od to 89, then click go, so it saves and goes back to previous screen. And just keep going with numbering your new geo_zones in numeric value.
Example list of new geo_zones we used for weight based shipping, changing their ID:
Standard Shipping (geo_zone_id=87)
Priority Shipping (geo_zone_id=88)
Two-Day Shipping (geo_zone_id=89)
Next Day Shipping (geo_zone_id= 90)
You can create as many geo_zones as you'd like and just number them starting with the most expensive with the highest number and keep going down in numbers as you get towards you least expensive. (I started with 90 as my highest id) I suggest you use the higher number also.
From there you are pretty much all set!
Now you can go back to your
www.yourdomainname.com/admin/index.php? ... n/geo_zone
and start adding zones to your new geo_zones.
Hope this helps someone, seems not a lot of answers available for this simple task. Cheers!
