Post by ifone_developer » Fri Oct 01, 2010 3:43 pm

Hi guyz,
I need to set the following type of shipping rates to my cart's shipping page
Standard : $7
2-day : $14
Overnight : $21
Of course, I have done this using weight based shipping method.
But what am getting as output is this.
2-day : $14
Overnight : $21
Standard : $7
This is not the order which i expected. Now i need to sort by price so that i can get the former model.
I have tried changing the back end but i cudn't make it.
Changing things in admin panel also didn't work.
Could anyone plz help me in solving this??
Thanq

New member

Posts

Joined
Sat Jul 10, 2010 6:48 pm

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ifone_developer » Fri Oct 01, 2010 9:05 pm

Hi qphoria,
Its fixed... Thanks a lot

New member

Posts

Joined
Sat Jul 10, 2010 6:48 pm

Post by HTMLCSSNoob » Tue Oct 12, 2010 5:21 pm

I tried the fix mentioned in that link in OC 1.4.9.1 in the /catalog/model/shipping/weight.php file, but it didn't change the sort order.

Anybody have an idea how to get the weight based shipping to sort by price instead of alphabetically?

Active Member

Posts

Joined
Fri Aug 20, 2010 7:53 am

Post by darrengould » Tue Jul 12, 2011 10:30 am

Did anyone find out how to sort this as I am getting a bit brassed off with everything being sorted alphabetically instead of admin having the option to define a sort order.

Not only do I want to be able to sort shipping methods by their sort order but also payment methods.

I have set up paypal and bank transfer and although I can set paypal above in the sort order it always defaults to bank transfer as the default but I don't want this to happen.

In practice it should not default to any but make the customer choose so that they know they have selected one.

New member

Posts

Joined
Fri Mar 25, 2011 9:07 pm

Post by OCMaster597 » Wed Oct 23, 2019 8:33 am

[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! ;)

Newbie

Posts

Joined
Thu Nov 30, 2017 2:53 am
Who is online

Users browsing this forum: No registered users and 10 guests