displayGrossPrices example

// Customer group price (with fallback switch)             'prices.price' .

            // Multiplied with the variant min purchase             ($considerMinPurchase ? ' * availableVariant.minpurchase' : '') .

            // Multiplied with the percentage price group discount             ' * ((100 - IFNULL(priceGroup.discount, 0)) / 100)' .

            // Multiplied with the product tax if the current customer group should see gross prices             ($current->displayGrossPrices() ? ' * (( ' . $taxCase . ' + 100) / 100)' : '') .

            // Multiplied with the percentage discount of the current customer group             ($discount ? ' * ' . (100 - (float) $discount) / 100 : '') .

            // Multiplied with the shop currency factor             ($currency->getFactor() ? ' * ' . $currency->getFactor() : '') .

            ', 2)';

        return $selection;
    }

    
/* * Currency calculation: * If the customer is currently in a sub shop with another currency, like dollar, * we have to calculate the price for the other currency. */
        $price *= $context->getCurrency()->getFactor();

        /* * check if the customer group should see gross prices. */
        if (!$customerGroup->displayGrossPrices()) {
            return round($price, 2);
        }

        /** * Gross calculation: * * This line contains the gross price calculation within the store front. * * The passed $context object contains a calculated Struct\Tax object which * defines which tax rules should be used for the tax calculation. * * The tax rules can be defined individual for each customer group and * individual for each area, country and state. * * For example: * - The EK customer group has different configured HIGH-TAX rules. * - In area Europe, in country Germany the global tax value are set to 19% * - But in area Europe, in country Germany, in state Bayern, the tax value are set to 20% * - But in area Europe, in country Germany, in state Berlin, the tax value are set to 18% */
// customer group price (with fallback switch)             $priceField .

            // multiplied with the variant min purchase             ($considerMinPurchase ? ' * availableVariant.minpurchase' : '') .

            // multiplied with the percentage price group discount             ' * ((100 - IFNULL(priceGroup.discount, 0)) / 100)' .

            // multiplied with the product tax if the current customer group should see gross prices             ($current->displayGrossPrices() ? ' * (( ' . $taxCase . ' + 100) / 100)' : '') .

            // multiplied with the percentage discount of the current customer group             ($discount ? ' * ' . (100 - (float) $discount) / 100 : '') .

            // multiplied with the shop currency factor             ($currency->getFactor() ? ' * ' . $currency->getFactor() : '') .

        ', 2)';
    }

    /** * {@inheritdoc} */
Home | Imprint | This part of the site doesn't use cookies.