ePages 6.11.0 - DE_EPAGES/ExternalShipping/API/CSV/ShippingLabelExportDriver.pm

Package DE_EPAGES::ExternalShipping::API::CSV::ShippingLabelExportDriver

This module implements a csv driver to export object portal products

Base
DE_EPAGES::Presentation::API::CSV::MonitoredExportDriver;
Example
use DE_EPAGES::ExternalShipping::API::CSV::ShippingLabelExportDriver;

my $Driver = DE_EPAGES::ExternalShipping::API::CSV::ShippingLabelExportDriver->new(
    Handler => $Handler
);
$Driver->($FileName, $hFileFormat, $aColumnNames, $ViewObject);

Functions

currencyID
drive
exportCSV
exportLine
getExportValues
items
languageID
shippingFulfillmentMethod
startMonitor
writeHeader

currencyID

Syntax
$CurrencyID = $self->currencyID;
Return
$CurrencyID (object)
Portal site

drive

Overwrite standard drive methode to start monitor 'ShippingLabelMonitor'.

Syntax
$self->drive($aObjects);

exportCSV

starts the csv export

Syntax
$self->exportCSV($FileName, $hFileFormat, $aColumnNames, $ViewObject, $NoMonitor);
Input
$FileName (string)
export to file
$hFileFormat (ref.hash)
file format DE_EPAGES::Presentation::API::CSV::MonitoredExportDriver::exportCSV
$aColumnNames (ref.array.string)
name of column
$ViewObject (PortalConfig)
export based on this object
$NoMonitor (boolean)
deactivate monitor, eg. for scripts/scheduler

exportLine

Export one line, increments monitor.

Syntax
$aProductIDs = $self->exportLine;

getExportValues

helper method of exportLine to convert column names to methods names of this exporter and calls the method to get the values of the exported object. The order of return values depends on order of column names.

Syntax
$self->getExportValues($Object);
Return
$aValues (ref.array.string)
list of values

items

Returns all product identifier of portal config, initialize monitor.

Syntax
$aProductIDs = $self->items;
Return
$aProductIDs (ref.array.int)
product identifier

languageID

Syntax
$LanguageID = $self->languageID;
Return
$LanguageID (object)
language

shippingFulfillmentMethod

used shipping fulfillment method

Syntax
$ShippingFulfillmentMethod = $self->shippingFulfillmentMethod;
Return
$ShippingFulfillmentMethod (object)
shipping fulfillment method

startMonitor

starts the monitor (if plain "\rexport shipping labels (%d / %d)")

Syntax
$self->startMonitor($PageTypeName);
Input
$PageTypeName (string)
name of pagetype

writeHeader

Writes the header line using the attribute names of the columns.

Syntax
$self->writeHeader();