This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

shop:onAfterCsvOptionMatrixImport event

Triggered by /modules/shop/models/shop_productcsvimportmodel.php
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onAfterCsvOptionMatrixImport(mixed $result, array $fields, int $product_id, array $record_options, array $csv_row, array $image_directories, array $image_root_dir)
$result mixed the object containing information about the operation status. The object has the following fields:
  • status - OK, SKIPPED or OK-WITH-WARNINGS string value.
  • operation - ADD or UPDATE string value.
  • warnings - an array of warnings.
  • id - identifier of the added/updated record.
$fields array specifies a list if imported product fields.
$product_id int specifies the product identifier.
$record_options array specifies the set of options identifying the imported record. Data format: ['Color'=>'Red', 'Size'=>'M'].
$csv_row array specifies a list of columns loaded from the CSV file. The column values go in the same order as they are defined in the CSV file.
$image_directories array a list of directories containing uploaded images on the server
$image_root_dir array path to the images directory in the ZIP file or in the images directory (if specified in the import configuration)
Triggered after a new or existing Option Matrix record has been updated from a CSV file. Example
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onAfterCsvOptionMatrixImport', $this, 'after_om_import');
}

public function after_om_import($result, $fields, $product_id, $record_options, $csv_row)
{
  // Do something
}