Hey guys
I'm using Jonathan's tip for using "weight based shipping" to create multiple flat rates.
I have two geo zones named Express and Registered.
Express is coming up first in the options because it's alphabetically first, but I want it to be second as it is the more expensive option.
Anyone know how to do that?
Thanks
The easiest way around this would be to use something like Multi Flat Rate Shipping, but if you don't want to use a commercial extension, you'd need to modify how the geo zones are pulled from the database. This edit may (or may not) work:
That should order them by the way they are entered in the database, however it will change everywhere that the geo zones are pulled.
Code: Select all
IN:
/admin/model/localisation/geo_zone.php
REPLACE:
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "geo_zone ORDER BY name ASC");
WITH:
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "geo_zone");
Hi
Thanks for that - Express still comes up first in the options, unfortunately.
There's no option for "sort order" in the admin panel for geo zones so I guess that's why.
Just realised I can probably leave the original code and change ASC to DESC ?
Thanks for that - Express still comes up first in the options, unfortunately.
There's no option for "sort order" in the admin panel for geo zones so I guess that's why.
Just realised I can probably leave the original code and change ASC to DESC ?
I just had the same problem as above with "Weight Based Shipping". Here's how I worked around it (Opencart 3.0.2).
Edit the "...catalog/model/extension/shipping/weight.php" and change line 8 from
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "geo_zone ORDER BY name");
to
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "geo_zone ORDER BY date_modified");
Now in the admin dashboard go to System>Localisation>Geo Zones and click edit and save on each Geo Zone in the order that you want them displayed.
Edit the "...catalog/model/extension/shipping/weight.php" and change line 8 from
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "geo_zone ORDER BY name");
to
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "geo_zone ORDER BY date_modified");
Now in the admin dashboard go to System>Localisation>Geo Zones and click edit and save on each Geo Zone in the order that you want them displayed.
Pinball LEDs here: https://www.scribblygum.com.au
Who is online
Users browsing this forum: No registered users and 37 guests