Jump to content

Edit History

neoweiter

neoweiter

Hi everyone

I made a module with this hook

    public function hookActionProductPriceCalculation($params)
    {
        if (empty($params['cart']) || !Validate::isLoadedObject($params['cart'])) {
            return;
        }

        $id_product = (int)$params['id_product'];

        $prices = PriceController::getStaticPrices($id_product); // Custom Class with new price calculation

        if ($prices && isset($prices['final_price'])) {
            $params['price'] = (float)$prices['final_price'];
        }
    }

this simply overrides all my products Tax Excl. prices in the Cart and in final Order.

This works well, but strangely the Cart Total does not count the Taxes anymore. My total Tax Incl. is the same as the total Tax Exc. amount like if the total tax was 0.00

Why is that ? How can I fix the total tax incl ?

Thanks

neoweiter

neoweiter

Hi everyone

I made a module with this hook

    public function hookActionProductPriceCalculation($params)
    {
        if (empty($params['cart']) || !Validate::isLoadedObject($params['cart'])) {
            return;
        }

        $id_product = (int)$params['id_product'];

        $prices = PriceController::getStaticPrices($id_product); // Custom Class with new price calculation

        if ($prices && isset($prices['final_price'])) {
            $params['price'] = (float)$prices['final_price'];
        }
    }

this simply overrides all my products Tax Excl. prices in the Cart and in final Order.

This works well, but strangely the Cart Total does not count the Taxes anymore. My total Tax Incl. is the same as the total Tax Exc. amount.

Why is that ? How can I fix the total tax incl ?

Thanks

×
×
  • Create New...