ePages 6.15.1 - DE_EPAGES/Idealo/API/CSV/IdealoProductsExportDriver.pm

Package DE_EPAGES::Idealo::API::CSV::IdealoProductsExportDriver

This module implements a csv driver to export object Idealo products

Example
use DE_EPAGES::Idealo::API::CSV::IdealoProductsExportDriver;

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

Functions

exportCSV
getExportValues
isProductValidPortal
paymentPrice

exportCSV

exports data (2 dim. array) into a file. sets default file format parameters : sep_char = ";" , always_quote = 1 , encoding = utf8

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)
the object to export
Return
array ref

isProductValidPortal

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

Syntax
$self->isProductValidPortal($Product);
Input
$Product (object)
the product to export

paymentPrice

get payment price for product with vars of portal config.

Syntax
$Value = $self->paymentPrice($Product, $PaymentMethod);
Input
$Product (object)
the product to export
$PaymentMethod (object)
the selected paymentmethod
Return
price for the payment method