SilverCart\Dev\ProductCsvBulkLoader
We use our own bulkloader because there's an unpatched bug in Silverstripe's implementation with regards to relationships.
(see Silverstripe bugtracker "http://open.silverstripe.org/ticket/6472").
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class ProductCsvBulkLoader
extends CsvBulkLoader
{
- // members
- public static array $match_existing_fields = ;
- protected bool $createNewIfNotMatched = true;
- // methods
- public BulkLoader_Result load()
- public int processAll()
- protected boolean processRecord()
- public void Log()
Hierarchy
Extends
- SilverStripe\Dev\CsvBulkLoader
Tasks
Line | Task |
---|---|
30+ | Test this. |
Members
protected
- $createNewIfNotMatched
—
SilverCart\Dev\bool
Indicator to check whether to create a new product if no existing one is matching
public
- $match_existing_fields
—
array
List of field names to check existing records for.
Methods
protected
- processRecord() — Process a record from the import file
public
- Log() — Write a log message.
- load() — Load the given file via {@link self::processAll()} and {@link self::processRecord()}.
- processAll() — Process every record in the file