ePages 6.11.0 - DE_EPAGES/Product/API/CSV/ProductAnalyzer.pm

Package DE_EPAGES::Product::API::CSV::ProductAnalyzer

This module implements a separate class to analyze a CSV which contains products and return an hash with the values.

Functions

analyze

analyze

Analyzes an array of CSV columns which contain product information and returns a hash which can be imported into the application.

Syntax
my $hAttributeValues = $self->analyze( $aColumns );
Input
$aColumns (ref array)
CSV columns
Return
$hAttributeValues (ref.hash)
properties of a object of CSV file with following keys
  • DirectAttributes - direct attributes of the object with following keys
    • Alias - alias of the object - string
    • Class - class object of the object - object
    • Parent - parent object of the object - object
    • more direct attributes which should set via $Object->set method,
      or can used by $Class->insert($hAttributeValues->{'DirectAttributes'});
    - ref.hash
  • DoNotImport - 0 or 1, set to 1 if there are errors to set the parsed values - boolean
  • Object - object if it is found or undef if it doesn't exist - object
  • LocalizedAttributes -localized attributes hash with language id as key - ref.hash
  • PriceAttributes - price attributes hash with CurrencyID/TaxModel as key e.g. ('EUR/1') -ref.hash
  • VariationValueIDs - variation value ids which are used at the subproduct - ref.array
  • PreDefMultiValueIDs - value ids for a multiple-choice option attribute - ref.hash.array.int