ePages 7.3.0 - DE_EPAGES/Shop/API/Constants.pm

Package DE_EPAGES::Shop::API::Constants

Constants of cartridge Shop

@EXPORT_OK
TAX_MODEL_GROSS
TAX_MODEL_NET
BASKETACTION_ADDQUANTITY
BASKETACTION_REPLACEQUANTITY
BASKETACTION_DONTCHANGEQUANTITY
BASKETACTION_ADDNEWPOSITION
Text2TaxModel
TaxModel2Text
$TAX_MODEL_GROSS_WITH_VATID
$COUNTRIES_EXCLUDED_FROM_VIES_CHECK
$NUMBER_FORMAT_INFIX_PATTERNS
$COUNTRIES_WITH_SAME_TAX
$EU_COUNTRY_AREA_EXCEPTIONS
SHOP_JWT_LIFETIME_LONG
SHOP_JWT_LIFETIME_SHORT
STOCK_IS_ORDERABLE
STOCK_HAS_LONGER_DELIVERYTIME
STOCK_NO_ADDTOBASKET
STOCK_NOT_VISIBLE
UNITY_STOREFRONT_APP_NAME
UNITY_STOREFRONT_APP_TYPE

Functions

TaxModel2Text
Text2TaxModel

TAX_MODEL_NET (integer)

Product prices include tax. Tax is calculated from the sum of product prices.

TAX_MODEL_GROSS (integer)

Product prices don't include tax. Tax is added to the sum of product prices.

BASKETACTION_ADDQUANTITY (integer)

Shop basket action if lineitem exists: Increases quantity in existing line item.

BASKETACTION_REPLACEQUANTITY (integer)

Shop basket action if lineitem exists: Replaces the quantity at line item.

BASKETACTION_DONTCHANGEQUANTITY (integer)

Shop basket action if lineitem exists: Does not change line item.

BASKETACTION_ADDNEWPOSITION (integer)

Shop basket action if lineitem exists: Creates a new line item.

$TAX_MODEL_GROSS_WITH_VATID (ref.hash.array.string)

VATID starts with one of these values then
use taxmodel gross

$COUNTRIES_EXCLUDED_FROM_VIES_CHECK (ref.array.int)

If the VATCountryCode is contained
in this hash the VATIDs from this country should only be checked locally
and not against the VIES database.
Only the key of this hash matters, the value is irrelevant (hash is used
as a set). To check whether a country is excluded you should use defined.

$NUMBER_FORMAT_INFIX_PATTERNS (ref.hash.string)

Infix of numbers will be formatted with
one of these patterns

$COUNTRIES_WITH_SAME_TAX (ref.hash.array.string)

use same tax handling for country codes
use taxmodel gross

$EU_COUNTRY_AREA_EXCEPTIONS (ref.hash.array.hash)

eu countries with no eu tax handling areas

SHOP_JWT_LIFETIME_LONG (integer)

lifetime of the JSON Web Token for shop provisioning
with long validity for shop creation and deletion in seconds

SHOP_JWT_LIFETIME_SHORT (integer)

lifetime of the JSON Web Token for shop provisioning
with short validity for shop status changes in seconds

UNITY_STOREFRONT_APP_NAME (string)

app name for registering
Unity Storefront with ePages J

UNITY_STOREFRONT_APP_TYPE (string)

app type for registering
Unity Storefront with ePages J

STOCK_IS_ORDERABLE (integer)

product can be ordered even if out of stock, no
message (0)

STOCK_HAS_LONGER_DELIVERYTIME (integer)

product can be ordered even if out of
customer is informed about longer delivery time (1)

STOCK_NO_ADDTOBASKET (integer)

if the product is out of stock, it is still visible,
but cannot be added to the basket (2)

STOCK_NOT_VISIBLE (integer)

the product is hidden if out of stock (3)

TaxModel2Text

Returns the tax model name by id. Returns undef if $TaxModel is undef. Throws an error if $TaxModel is neither TAX_MODEL_NET nor TAX_MODEL_GROSS.

Syntax
$TaxModelName = TaxModel2Text( $TaxModel )
Input
$TaxModel (int)
tax model id (TAX_MODEL_NET or TAX_MODEL_GROSS)
Return
$TaxModelName (string)
tax model name ('gross' or 'net')

Text2TaxModel

Returns the tax model id by name. Returns undef if $TaxModelName is undef. Throws an error if $TaxModelName is neither 'gross' nor 'net'.

Syntax
$TaxModel = Text2TaxModel( $TaxModelName )
Input
$TaxModelName (string)
tax model name ('gross' or 'net')
Return
$TaxModel (int)
tax model id (TAX_MODEL_NET or TAX_MODEL_GROSS)