ePages 6.17.43 - DE_EPAGES/Twenga/API/CSV/TwengaProductsExportDriver.pm

Package DE_EPAGES::Twenga::API::CSV::TwengaProductsExportDriver

This module implements a csv driver to export object Twenga products

Example
use DE_EPAGES::Twenga::API::CSV::TwengaProductsExportDriver;

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

Functions

exportCSV
isProductValidPortal

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

isProductValidPortal

Error out if the product has issues that make it unfit for export to Twenga (probably due to Twenga quality standards). There used to be lots of errors here, which created support traffic. Some people did not understand these errors, nor what they were supposed to do with them. So I removed the category checks, which resulted in errors that were difficult to understand for a merchant.

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