ePages 6.17.9 - DE_EPAGES/Guenstiger/API/CSV/GuenstigerProductsExportDriver.pm

Package DE_EPAGES::Guenstiger::API::CSV::GuenstigerProductsExportDriver

This module implements a csv driver to export object Guenstiger products

Example
use DE_EPAGES::Guenstiger::API::CSV::GuenstigerProductsExportDriver;

my $Driver = DE_EPAGES::Guenstiger::API::CSV::GuenstigerProductsExportDriver->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);
Input
$Object (object)
product
Return
$aValues (ref.array.string)
values of one line to export

isProductValidPortal

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

Syntax
$self->isProductValidPortal($Product);
Input
$Product (object)
product
Return
$isValid (boolean)
is visible and has a name

paymentPrice

get payment price for product with vars of portal config.

Syntax
$Value = $self->paymentPrice($Product, $PaymentAlias);
Input
$Product (object)
product
$PaymentAlias (string)
alias of payment method
Return
$price (float)
price of payment method

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();