Package DE_EPAGES::ProductPortal::API::CSV::PortalExportDriver
This module implements a csv driver to export object portal products
Base |
DE_EPAGES::Presentation::API::CSV::MonitoredExportDriver; |
Example |
use DE_EPAGES::ProductPortal::API::CSV::PortalExportDriver; my $Driver = DE_EPAGES::ProductPortal::API::CSV::PortalExportDriver->new( Handler => $Handler ); $Driver->($FileName, $hFileFormat, $aColumnNames, $ViewObject); |
Functions
- allProducts
- currencyID
- dayUnitName
- deliveryPeriod
- descriptionAttribute
- drive
- exportCSV
- exportLine
- formatPrice
- getExportValues
- imageAttribute
- imageUrl
- isProductValidPortal
- isProductValidPortalExt1
- items
- languageID
- portalSite
- productPrice
- productUrl
- removeHtmlTags
- shippingMethod
- shippingPrice
- startMonitor
- taxModel
- useAddToBasket
- writeHeader
allProducts
Returns the product identifiers to be exported. If the option "ExportAllVariation" is selected all SubProducts of a MasterProduct are exported, else only default SubProducts are exported.
Syntax |
$aProductIDs = $self->allProducts; |
Return |
|
currencyID
Exports to site of portal.
Syntax |
$CurrencyID = $self->currencyID; |
Return |
|
dayUnitName
returns the name of the time unit day in the current language the value is being cached
Syntax |
my $name = dayUnitName; |
Output |
|
deliveryPeriod
returns the delivery period followed by the localized name of the time unit day
Syntax |
$Period = deliveryPeriod($Product); |
Input |
|
Return |
|
descriptionAttribute
used description attribute of portal config.
Syntax |
$DescriptionAttribute = $self->descriptionAttribute; |
Return |
|
drive
Overwrite standard drive methode to start monitor 'PortalMonitor'.
Syntax |
$self->drive($aObjects); |
exportCSV
starts the csv export
Syntax |
$self->exportCSV($FileName, $hFileFormat, $aColumnNames, $ViewObject, $NoMonitor); |
Input |
|
exportLine
Export one line, increments monitor.
Syntax |
$aProductIDs = $self->exportLine; |
formatPrice
formats prices (from shipping or products) to portal specific format.
Syntax |
$FormattedValue = $self->formatPrice($Value); |
Example |
$FormattedShippingValue = $self->formatPrice($self->shippingPrice($Product)); |
Input |
|
Return |
|
getExportValues
helper method of exportLine to convert column names to methods names of this exporter and calls the method to get the values of the exported object. The order of return values depends on order of column names.
Syntax |
$self->getExportValues($Object); |
Return |
|
imageAttribute
used image attribute of portal config.
Syntax |
$ImageAttribute = $self->imageAttribute; |
Return |
|
imageUrl
Returns url to product image.
Syntax |
$URL = $self->imageUrl($Product, $ImageAttribute); |
Example |
$URL = $self->imageUrl($Product, $self->imageAttribute); |
Return |
|
isProductValidPortal
Throws error if not valid, (not visible).
Syntax |
$self->isProductValidPortal; |
isProductValidPortalExt1
Throws error if not valid (not visible, no name or no price).
Syntax |
$self->isProductValidPortalExt1; |
items
Returns all product identifier of portal config, initialize monitor.
Syntax |
$aProductIDs = $self->items; |
Return |
|
languageID
Exports to site of portal.
Syntax |
$LanguageID = $self->languageID; |
Return |
|
portalSite
Exports to site of portal.
Syntax |
$PortalSite = $self->portalSite; |
Return |
|
productPrice
get price of product with vars of portal config.
Syntax |
$Value = $self->productPrice($Product); |
Return |
|
productUrl
Returns url to product.
Syntax |
$URL = $self->productUrl($Product); |
Return |
|
removeHtmlTags
Removes all html tags and consolidates spaces. Removes newlines after converting.
Syntax |
my $NoHtml = $self->removeHtmlTags($HTML); |
Input |
|
Return |
|
shippingMethod
used shipping method of portal config.
Syntax |
$ShippingMethod = $self->shippingMethod; |
Return |
|
shippingPrice
get shipping price for product with vars of portal config.
Syntax |
$Value = $self->shippingPrice($Product); |
Return |
|
startMonitor
starts the monitor (if plain "\rexport products (%d / %d)")
Syntax |
$self->startMonitor($PageTypeName); |
Input |
|
taxModel
Tax model used for export.
Syntax |
$TaxModel = $self->taxModel; |
Return |
|
useAddToBasket
use add to basket link.
Syntax |
$UseAddToBasket = $self->useAddToBasket; |
Return |
|
writeHeader
Writes the header line using the attribute names of the columns.
Syntax |
$self->writeHeader(); |