Post by tinybibiya » Mon Nov 03, 2014 1:59 pm

I am trying to modify a shipping model.

I want to get the geo_zone_id from database and make a IF statement out of it.
Can someone help how to do it? The file is model/shipping/weight.php

Newbie

Posts

Joined
Thu Sep 19, 2013 6:14 pm

Post by fido-x » Thu Nov 06, 2014 4:58 pm

The geo_zone_id being used by the weight module (and model) can be retrieved with:

Code: Select all

$this->config->get('weight_geo_zone_id')
And used, for example:

Code: Select all

if ($this->config->get('weight_geo_zone_id') == $number) {
    do something
} else {
    do something else
}

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia
Who is online

Users browsing this forum: No registered users and 6 guests