getTaxRepository example


    public function getMaxTaxRate()
    {
        $maxTax = 0;

        foreach ($this->_positions as $position) {
            if ((int) $position['modus'] === CartPositionsMode::PRODUCT) {
                $getTax = $position['tax_rate'];
                if (empty($getTax) && $this->_shipping !== null) {
                    $position['tax'] = $this->getTaxRepository()->getTaxRateByConditions(
                        $position['taxID'],
                        $this->_shipping['country']['areaID'],
                        $this->_shipping['countryID'],
                        $this->_shipping['stateID'],
                        $this->_user['customergroupID']
                    );
                }
                if ($getTax > $maxTax) {
                    $maxTax = $getTax;
                }
            }
        }
Home | Imprint | This part of the site doesn't use cookies.