calculateVoucherValues example

->getNamespace('backend/static/discounts_surcharges')
            ->get('voucher_name', 'Voucher');

        $voucherValue = 0.;
        if ($voucherDetails['percental']) {
            $voucherValue = $voucherDetails['value'];
            $voucherName .= ' ' . $voucherValue . ' %';
            $voucherDetails['value'] = ($amount['totalAmount'] / 100) * (float) $voucherValue;
        }

        // Tax calculation for vouchers         [$taxRate$tax$voucherDetails$freeShipping] = $this->calculateVoucherValues($voucherDetails);

        if ($this->proportionalTaxCalculation && !$this->session->get('taxFree') && $voucherDetails['taxconfig'] === 'auto') {
            $taxCalculator = Shopware()->Container()->get('shopware.cart.proportional_tax_calculator');
            $prices = $this->basketHelper->getPositionPrices(
                new DiscountContext(
                    $this->session->get('sessionId'),
                    null,
                    null,
                    null,
                    null,
                    null,
                    
Home | Imprint | This part of the site doesn't use cookies.