ePages 7.26.0 - DE_EPAGES/Shop/API/TLE/ShopHandler.pm

Package DE_EPAGES::Shop::API::TLE::ShopHandler

Implements system-wide TLE variables for shops

Functions

ClearObjectCache
FeaturedActionAvailable
HasUntranslatedEntries
SuggestNextNo
VATID_EXAMPLE

ClearObjectCache

Clears cache related to a certain a object.

Syntax
ClearObjectCache( $Processor, $aObjectIDs );
Input
$Processor (object)
TLE processor
aObjectIDs (array ref)
An array containing an Object ID

FeaturedActionAvailable

Returns the feature status for the action If both, a regular and an excluding feature are defined, 'NotVisible' will be returned regardless of the state of the regular feature. Applicable to every object with a 'feature' attribute.

Syntax
#FeaturedActionAvailable(#ShopObject, #Object, #Feature)
Example
#IF( #FeaturedActionAvailable(#Shop.Object, #Action.Object) EQ "Allowed" ) ... #ENDIF
#IF( #FeaturedActionAvailable(#Shop.Object, #UNDEF, "ProductRating") NE "NotVisible") ... #ENDIF
Input
#ShopObject (object)
shop object
#Object (object or #UNDEF)
object with 'feature' attribute (usually an action)
#Feature (object or string or #UNDEF)
feature object or feature name,
can be omitted if avaible on #Object (default: #Object.Feature)
Return
#Status (string)
'NotAllowed' action not allowed for feature AND
no excluding feature active
or 'NotVisible' action not visible for feature OR
excluding feature is active
or 'Allowed' action allowed for feature (not active, but visible) AND
no excluding feature active
or 'LimitReached' feature limit reached for this action AND
no excluding feature active
or 'NotAssigned' action not assigned to a feature

HasUntranslatedEntries

Checks for a language dependend attribute of a given shop object if there are empty entries in any of the installed shop languages for an already filled attribute

Syntax
#HasUntranslatedEntries(#Object, #AttributeName)
Example
#IF(#HasUntranslatedEntries(#Object, "Name"))
  #INCLUDE("BubbleHelp")
#ENDIT
Input
#Object (DE_EPAGES::Object::API::Object::Object)
object
#AttributeName (String)
attribute name
Return
#HasUntranslatedEntries (Boolean)
result

SuggestNextNo

Returns a suggestion for a new alias.

Syntax
#SuggestNextNo(#ShopObject, #ClassName)
#SuggestNextNo(#ShopObject, #ClassName, #Object)
Example
#LOCAL("NewAlias", #SuggestNextNo(#Shop.Object, "Invoice", #Order.Object))
  #NewAlias
#ENDLOCAL
Input
#ShopObject (DE_EPAGES::Shop::API::Object::Shop)
shop object
#ClassName (String)
class name
#Object (DE_EPAGES::Object::API::Object::Object)
parent object (optional)
Return
#NewAlias (String)
new alias suitable for given class name

VATID_EXAMPLE

Returns an example for a valid vatid for the given country.

Syntax
#VATID_EXAMPLE(#CountryID)
Example
#LOCAL("VATID", #VATID_EXAMPLE(#Shop.Address.Country.CountryID))
  #VATID
#ENDLOCAL
Input
#CountryID (integer)
country identifier
Return
#VATID (string)
vatid example