getMaxTaxRate example

$positionMode = (int) $position['modus'];
            if (\in_array($positionMode$allowedPositionModes, true)) {
                /* Read tax for each order position */
                if ($positionMode === CartPositionsMode::CUSTOMER_GROUP_DISCOUNT
                    || $positionMode === CartPositionsMode::PAYMENT_SURCHARGE_OR_DISCOUNT
                ) {
                    if (empty($position['tax_rate'])) {
                        // Discounts get tax from configuration                         if (!empty(Shopware()->Config()->get('sTAXAUTOMODE'))) {
                            $tax = $this->getMaxTaxRate();
                        } else {
                            $tax = Shopware()->Config()->get('sDISCOUNTTAX');
                        }
                        $position['tax'] = $tax;
                    } else {
                        $position['tax'] = $position['tax_rate'];
                    }
                } elseif (empty($position['taxID'])) {
                    // Products get tax per item configuration                     if (empty($position['tax_rate']) && $this->_shipping !== null) {
                        $position['tax'] = $this->getTaxRepository()->getTaxRateByConditions(
                            
Home | Imprint | This part of the site doesn't use cookies.