ePages 6.11.0 - DE_EPAGES/ProductPortal/API/Object/PortalConfig.pm

Package DE_EPAGES::ProductPortal::API::Object::PortalConfig

object interface for PortalConfig.

Base
DE_EPAGES::Object::API::Object::Object

Functions

addProducts
allProducts
existsProduct
exportDriver
exportPortal
items
removeProducts
shippingMethodForProduct
uploadPortal

addProducts

Add products to portal, if a product is an super product all sub products will be added.

Syntax
$PortalConfig->addProducts($aProducts);
Input
$aProducts (ref.array.object)
products

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 = $PortalConfig->allProducts;
Return
$aProductIDs (ref.array.int)
product identifier

existsProduct

Checks if product exists on product portal

Syntax
$PortalConfig->existsProduct($Product);
Input
$Product (object)
product

exportDriver

Retrieves export driver.

Syntax
$PortalConfig->exportDriver;
Return
$ExportDriver (string)
name of export driver

exportPortal

Exports product data which are relevant to Portal.

Syntax
$PortalConfig->exportPortal($FileName);
Input
$FileName (string)
name of export file including path

items

Returns all product identifier of portal config

Syntax
$aProductIDs = $PortalConfig->items;
Return
$aProductIDs (ref.array.int)
product identifier

removeProducts

Removes products from portal.

Syntax
$PortalConfig->removeProducts($aProducts);
Input
$aProducts (ref.array.object)
products

shippingMethodForProduct

Find the shipping method to be used for shipping cost calculation. If no shipping method is assigned to the portal config, returns undef. Returns the assigned shipping method if it is suitable for the product. Otherwise returns the shop's default shipping method if it can be used for the product and the portal site's country. Returns any other shipping method under the same conditions. Returns undef if no suitable shipping method found.

Syntax
my $ShippingMethod = $PortalConfig->shippingMethodForProduct($Product);
Input
$Product (object)
product
Return
$ShippingMethod (object)
shipping method to be used for shipping cost calculation or undef if none found

uploadPortal

This implementation does nothing and returns always -1.

Syntax
$PortalConfig->uploadPortal($FileName);
Input
$PathFileName (string)
path file name of file to upload (optional)
Return
$ret (int)
0 - failure, 1 - success, -1 - no upload necessary