public function getTotal() { $total = (double) $this->getTransaction()->shipment_itemstotal; if ($total > 500) { return 0; } else { if ($total > 100) { return ShippingModel::isEUCountry($this->getTransaction()->shipment_country) ? 15.95 : 22.5; } else { return ShippingModel::isEUCountry($this->getTransaction()->shipment_country) ? 7.5 : 12.5; } } }