ePages 6.15.1 - DE_EPAGES/MultiStore/API/Object.pm

Package DE_EPAGES::MultiStore::API::Object

Affiliate Object API

Base
Exporter
@EXPORT_OK
MapAttributeNames
GetRemoteAttributes
PathStringFromSite
PathStringFromSubShop
VisibleInSubShop
SerializeObject
DeserializeObject

Functions

DeserializeObject
MapAttributeNames
PathStringFromSite
PathStringFromSubShop
SerializeObject
VisibleInSubShop

DeserializeObject

Checks if $Element is deserializable by calling ->can('doDeserialize'). If yes, it returns the result of that. If not, $Element is returned unchanged

Syntax
DeserializeObject( $Element, $Site );
Input
$Element (any)
any input
$Site (object)
Site object as reference point to deserialize from
Return
$DeserializedObject (any)
deserialized object

MapAttributeNames

Maps internal (SuperProductID) to external (SuperProduct) names

Syntax
MapAttributeNames( $Object, $aNames );
Input
$Object (object)
input object
$aNames (ref.array.string)
internal cache attribute names
Return
$aMappedNames (ref.array.string)
mapped attribute names

PathStringFromSite

Returns the relative path based from the object's site

Syntax
PathStringFromSite( $Object );
Input
$Object (object)
object
Return
$PathString (string)
path string

PathStringFromSubShop

Returns the relative path based from the object's site

Syntax
PathStringFromSubShop( $Object );
Input
$Object (object)
object
Return
$PathString (string)
path string

SerializeObject

Serializes an Object into a placeholder containing a the object path If no object is passed, $Element is returned unchanged.

Syntax
SerializeObject( $Element );
Input
$Element (any)
object or any other input
Return
$SerializedElement (any)
serialized element

VisibleInSubShop

Returns true if affiliate object is visible in subshop

Syntax
my $IsVisible = VisibleInSubShop( $RemoteObject, $SubShop );
Input
$RemoteObject (DE_EPAGES::Content::API::Object::ContentObject)
remote content object
$SubShop (DE_EPAGES::Shop::API::Object::Object)
subshop object
Return
$IsVisible (boolean)
true if object is visible