ePages 6.13.3 - DE_EPAGES/UniversalPortal/API/CSV/UniversalProductsExportDriver.pm

Package DE_EPAGES::UniversalPortal::API::CSV::UniversalProductsExportDriver

This module implements a csv driver to export User defined Portals.

Base
DE_EPAGES::ProductPortal::API::CSV::PortalExportDriver
Example
 use DE_EPAGES::UniversalPortal::API::CSV::UniversalProductsExportDriver;

my $Driver = DE_EPAGES::UniversalPortal::API::CSV::UniversalProductsExportDriver->new(
    Handler => $Handler
);
$Driver->exportCSV;

Functions

DeliveryCost
DeliveryPeriod
Description
ImageLarge
ImageMedium
ImageSmall
ListPrice
MainCategory
MeasureWithUnit
UPCEAN
UniversalPortalAttributeSet
WebUrl
Weight
getAttributeValue
getExportValues
isProductValidPortal
isProductValidPortalExt1

DeliveryCost

Retruns the shipping price if it set or a empthy string

Syntax
DeliveryCost( $Product );
Input
$Product (ref.hash)
a product
Return
$ShippingPrice (String)
shipping price or empthy string

DeliveryPeriod

Returns the product delivery period

Syntax
DeliveryPeriod( $Product );
Input
$Product (ref)
a product
Return
$Delivery (String)
delivery period

Description

retruns the description and remove HTML-Tags and new lines

Syntax
Description( $Product );
Input
$Product (ref.hash)
a product
Return
$DescriptionValueString (String)
The description without HTML and new lines

ImageLarge

returns the URL to the large image

Syntax
ImageLarge( $Product );
Input
$Product (ref)
a product
Return
$ImageURL (String)
URL to the large image

ImageMedium

returns the URL to the medium image

Syntax
ImageMedium( $Product );
Input
$Product (ref)
a product
Return
$ImageURL (String)
URL to the medium image

ImageSmall

returns the URL to the small image

Syntax
ImageSmall( $Product );
Input
$Product (ref)
a product
Return
$ImageURL (String)
URL to the small image

ListPrice

returns the price

Syntax
ListPrice( $Product );
Input
$Product (ref)
a product
Return
$Price (String)
returns the price

MainCategory

Export column "shop_cat" (shop category) which shall be the complete path of categories in the shop. It must be seperated by other symbols than the columns of the export file! (e.g. " / ")

Syntax
MainCategory( $Product );
Input
$Product (ref)
a produc
Return
$CategoryNamesString (String)
product category

MeasureWithUnit

retruns the measure additional Unit

Syntax
MeasureWithUnit( $Product,$Measure );
Input
$Product (ref.hash)
a product
$measure (String)
name of the current measure
Return
$Width (String)
the Width of product with Unit

UPCEAN

returns the UPCEAN

Syntax
UPCEAN( $Product );
Input
$Product (ref)
a product
Return
$UPCEAN (String)
returns the UPCEAN

UniversalPortalAttributeSet

Returns the UniversalPortalAttributeSet.

Syntax
$UniversalPortalAttributeSet = $self->UniversalPortalAttributeSet();
Return
$UniversalPortalAttributeSet (object)
UniversalPortalAttributeSet

WebUrl

returns the WebUrl

Syntax
$WebUrl = WebUrl($Product)
Input
$Product (ref)
a product
Return
$WebUrl (String)
WebUrl

Weight

retruns the Weight additional Unit

Syntax
Weight( $Product );
Input
$Product (ref.hash)
a product
Return
$Weight (String)
the Weight of product with Unit

getAttributeValue

The method returns a specific value from a product or a user defined "ProductAttribute" as string.

Syntax
getAttributeValue( $Product, $Attribute );
Input
$Product (ref.hash)
a product
$Attribute (ref.hash)
an UniversalPortalAttribute or a ProductAttribute
reference
Return
$ProductValue (String)
Return a product value or a "ProductAttribute"
as string.

getExportValues

Overwrites the method in DE_EPAGES::ProductPortal::API::CSV::PortalExportDriver. helper method of exportLine to convert column names to methods names which are stored in UniversalAttributes. This exporter and calls the method to get the values of the exported object. Futher it truncates it to the user defined length if the field is set.

Syntax
$self->getExportValues($Object);
Input
$Product (ref.hash)
a product
Return
$aValues (ref.array.string)
list of values

isProductValidPortal

Overwrites the method in DE_EPAGES::ProductPortal::API::CSV::PortalExportDriver and calls isProductValidPortalExt1

Syntax
isProductValidPortal( $Input1 );
Input
$Product (ref.hash)
a product

isProductValidPortalExt1

Overwrites the method in DE_EPAGES::ProductPortal::API::CSV::PortalExportDriver The method checks whether the current Value is mandatory. If it is so the whole line will not printed to the CSV-file.

Syntax
isProductValidPortalExt1( $Input1 );
Input
$Product (ref.hash)
a product