ePages 6.10 - DE_EPAGES/Preissuchmaschine/API/CSV/PreissuchmaschineProductsExportDriver.pm

Package DE_EPAGES::Preissuchmaschine::API::CSV::PreissuchmaschineProductsExportDriver

This module implements a csv driver to export object Preissuchmaschine products

Example
use DE_EPAGES::Preissuchmaschine::API::CSV::PreissuchmaschineProductsExportDriver;

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

Functions

exportCSV
getExportValues
isProductValidPortal
paymentPrice
shortDescriptionAttribute
writeHeader

exportCSV

exports data (2 dim. array) into a file. sets default file format parameters : sep_char = "|" , always_quote = 1 , encoding = encoding(utf-8)

Syntax
$Exporter->exportCSV($FileName, $hFormat, $aColumns, $ViewObject, $aObjects );
Input
$FileName (string)
export file
$hFormat (ref.hash)
export file format
$aColumns (attribute object)
column attributes (used for header and values)
$ViewObject (object)
object to view monitor should be the shop
$aObjects (ref.array.object)
list of objects

getExportValues

get values for one line.

Syntax
$self->getExportValues($Object);

isProductValidPortal

return 1 if product is visible and has name and has a price

Syntax
$self->isProductValidPortal($Product);

paymentPrice

get payment price for product with vars of portal config.

Syntax
$Value = $self->paymentPrice($Product, $PaymentAlias);

shortDescriptionAttribute

used short description attribute of portal config.

Syntax
$DescriptionAttribute = $self->shortDescriptionAttribute;
Return
$ShortDescriptionAttribute (string)
short description attribute

writeHeader

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

Syntax
$self->writeHeader();