Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Static Public Member Functions | Static Private Member Functions | List of all members
eZVATManager Class Reference

The class eZVATManager does. More...

## Static Public Member Functions
static | getVAT ( $object, $country)
static | isUserCountryRequired ()
static | getUserCountry ( $user=false, $considerPreferedCountry=true)
static | setUserCountry ( $user, $country)
static | isDynamicVatChargingEnabled ()

## Static Private Member Functions
static | getUserCountryAttributeName ( $requireUserCountry)
static | loadVATHandler ()

## Detailed Description

The class eZVATManager does.

Definition at line 17 of file ezvatmanager.php.

## Member Function Documentation

## ◆ getUserCountry()

static eZVATManager::getUserCountry | ( |  | $user = `false`,
|  |  | $considerPreferedCountry = `true`
| ) |  |
| static

Determine user's country.

Definition at line 112 of file ezvatmanager.php.

References eZUser\currentUser(), getUserCountryAttributeName(), isUserCountryRequired(), eZDebug\writeDebug(), and eZDebug\writeError().

Referenced by getVAT().

## ◆ getUserCountryAttributeName()

static eZVATManager::getUserCountryAttributeName | ( |  | $requireUserCountry | ) |
| static private

Determine name of content attribute that contains user's country.

Definition at line 76 of file ezvatmanager.php.

References eZDebug\writeError().

Referenced by getUserCountry(), and setUserCountry().

## ◆ getVAT()

static eZVATManager::getVAT | ( |  | $object,
|  |  | $country
| ) |  |
| static

Get percentage of VAT type corresponding to the given product and country the user is from.

Returns
  Percentage, or null on error.

Definition at line 26 of file ezvatmanager.php.

References getUserCountry(), isUserCountryRequired(), loadVATHandler(), eZDebug\writeNotice(), and eZDebug\writeWarning().

Referenced by eZVatType\getPercentage().

## ◆ isDynamicVatChargingEnabled()

static eZVATManager::isDynamicVatChargingEnabled | ( |  | ) |
| static

Returns
  true if a VAT handler is specified in the ini setting, false otherwise.

Definition at line 255 of file ezvatmanager.php.

References loadVATHandler().

Referenced by eZVatType\fetch(), and eZVatType\fetchList().

## ◆ isUserCountryRequired()

static eZVATManager::isUserCountryRequired | ( |  | ) |
| static

Check if users must have country specified.

Definition at line 60 of file ezvatmanager.php.

Referenced by getUserCountry(), getVAT(), and setUserCountry().

## ◆ loadVATHandler()

static eZVATManager::loadVATHandler | ( |  | ) |
| static private

Load VAT handler (if specified).

Returns
  true if no handler specified, false if a handler specified but could not be loaded, handler object if handler specified and found.

Definition at line 274 of file ezvatmanager.php.

References eZExtension\baseDirectory(), and eZDebug\writeError().

Referenced by getVAT(), and isDynamicVatChargingEnabled().

## ◆ setUserCountry()

static eZVATManager::setUserCountry | ( |  | $user,
|  |  | $country
| ) |  |
| static

Set user's country.

Definition at line 210 of file ezvatmanager.php.

References getUserCountryAttributeName(), isUserCountryRequired(), eZDebug\writeError(), and eZDebug\writeNotice().

The documentation for this class was generated from the following file:

- ezvatmanager.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.