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

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

Implements system-wide TLE variables for shops

Functions

FeaturedActionAvailable
GetVideoTutorial
HasUntranslatedEntries
ParseAdditionalHtmlHead
SuggestNextNo
VATID_EXAMPLE

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

GetVideoTutorial

Performs a GET request to Vimeo and writes the received data to the TLE variables #ThumbnailURL and #Video.

Syntax
#BLOCK("GetVideoTutorial", #VideoID, #IframeWidth, #IframeHeight, #IframeClass)
    <HTML with TLEs>
#ENDBLOCK
Input
#VideoID (integer)
video ID
#IframeWidth (integer)
width of the embed iframe (default: 640)
#IframeHeight (integer)
height of the embed iframe (default: 360)
#IframeClass (string)
Css class of the iframe
Return
$Content (string)
processed template content with the replaced ThumbnailURL
and the Video JSON object

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

ParseAdditionalHtmlHead

Parses the additional html head

Syntax
#ParseAdditionalHtmlHead(#AdditionalHtmlHead)
Example
#ParseAdditionalHtmlHead(#Shop.AdditionalHtmlHead[0])
Input
#AdditionalHtmlHead (string)
additional html head
Return
#ParsedAdditionalHtmlHead (string)
parsed additional html head

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