ePages 7.38.0 - DE_EPAGES/Shopzilla/API/CSV/ShopzillaProductsExportDriver.pm

Package DE_EPAGES::Shopzilla::API::CSV::ShopzillaProductsExportDriver

This module implements a csv driver to export object Shopzilla products

Example
use DE_EPAGES::Shopzilla::API::CSV::ShopzillaProductsExportDriver;

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

Functions

exportCSV
getExportValues
isProductValidPortal

exportCSV

exports data (2 dim. array) into a file. sets default file format parameters : sep_char = "|" , always_quote = 0 , 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

Calls the implementation of the super class and replaces all tabs by spaces afterwards. Google does not like quoted data in the CSV file, so we remove all tabs (tab is the separator char) and prevent the CSV export driver from quoting any items. see EPG-19210

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

isProductValidPortal

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

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