Merhaba üstadlar,

Kodlama olayında çok yeniyim ve şöyle bir problemim var.

Elimde bu kodlar var,
<?phpclass ModelShippingMng extends Model {
    function getQuote($address) {
        $this->load->language('shipping/mng');
        
        if ($this->config->get('mng_status')) {
              $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone_to_geo_zone WHERE geo_zone_id = '" . (int)$this->config->get('mng_geo_zone_id') . "' AND country_id = '" . (int)$address['country_id'] . "' AND (zone_id = '" . (int)$address['zone_id'] . "' OR zone_id = '0')");


              if (!$this->config->get('mng_geo_zone_id')) {
                $status = TRUE;
              } elseif ($query->num_rows) {
                $status = TRUE;
              } else {
                $status = FALSE;
              }
        } else {
            $status = FALSE;
        }
        
        $method_data = array();
    
        if ($status) {
            $cost = 0;
            $desi = $this->cart->getDesi();
            $sub_total = $this->cart->getSubTotal();
            
            $rate1 = $this->config->get('mng_rate1');
            $rate2 = $this->config->get('mng_rate2');
            $rate3 = $this->config->get('mng_rate3');
            $rate4 = $this->config->get('mng_rate4');
            $rate5 = $this->config->get('mng_rate5');
            $rate6 = $this->config->get('mng_rate6');
            $rate7 = $this->config->get('mng_rate7');
            $rate8 = $this->config->get('mng_rate8');            
            
            
            if ($desi < 2){$cost = $rate1;}
            if (($desi >= 2)&&($desi<=6)){$cost = $rate2;}
            if (($desi >= 7)&&($desi<=10)){$cost = $rate3;}
            if (($desi >= 11)&&($desi<=15)){$cost = $rate4;}
            if (($desi >= 16)&&($desi<=20)){$cost = $rate5;}
            if (($desi >= 21)&&($desi<=25)){$cost = $rate6;}
            if (($desi >= 26)&&($desi<=30)){$cost = $rate7;}
            if ($desi > 30){$cost = $rate7 + ($rate8 * ($desi - 30));}
                        
            
            $quote_data = array();
            
            if ((float)$cost) {
                $text = $this->language->get('text_description');
            
                if ($this->config->get('mng_display_weight')) {
                    $text .= ' (' . $this->language->get('text_weight') . ' ' . $this->weight->format($this->cart->getWeight(), $this->config->get('config_weight_class')) . ')';
                }
            
                    


                if ($this->config->get('mng_display_time')) {
                    $text .= ' (' . $this->language->get('text_time') . ')';
                }    
                
                  $quote_data['mng'] = array(
                    'code'           => 'mng.mng',
                    'title'        => $text,
                    'cost'         => $cost,
                    'tax_class_id' => $this->config->get('mng_tax_class_id'),
                    'text'         => $this->currency->format($this->tax->calculate($cost, $this->config->get('mng_tax_class_id'), $this->config->get('config_tax')))
                  );


                  $method_data = array(
                    'code'         => 'mng',
                    'title'      => $this->language->get('text_title'),
                    'quote'      => $quote_data,
                    'sort_order' => $this->config->get('mng_sort_order'),
                    'error'      => FALSE
                  );
            }
        }
    
        return $method_data;
    }
}
?>

ve ben bu koda elimde sql'de bulunan *****_product tablosunda sku değerini okutturup aşağıdaki işlemi yaptırmak istiyorum.

eğer SKU 1 ise ücretsiz yaz, ücret 0 olsun,
eğer SKU 1 değilse işleme devam et ve desi hesapla

Yardımlarınız için şimdiden teşekkür ederim.