SilverShop\Admin\ProductBulkLoader
ProductBulkLoader - allows loading products via CSV file.
Images should be uploaded before import, where the Photo/Image field
corresponds to the filename of a file that was uploaded.
Variations can be specified in a "Variation" column this format:
Type:value,value,value
eg: Color: red, green, blue , yellow
up to 6 other variation columns can be specified by adding a number to the end, eg Variation2,$Variation3
Synopsis
class ProductBulkLoader
extends CsvBulkLoader
{
- // members
- private static $parent_page_id = NULL;
- protected static bool $create_new_product_groups = false;
- protected $foundParentId = NULL;
- public array $columnMap = ;
- public array $duplicateChecks = ;
- public array $relationCallbacks = ;
- // methods
- protected void processAll()
- public void processRecord()
- public void imageByFilename()
- public void setParent()
- public void setContent()
- public void processVariation()
- public void processVariation1()
- public void processVariation2()
- public void processVariation3()
- public void processVariation4()
- public void processVariation5()
- public void processVariation6()
- public void variationRow()
Hierarchy
Extends
- SilverStripe\Dev\CsvBulkLoader
Tasks
Line | Task |
---|---|
276 | or find existing variation |
Members
private
- $parent_page_id
—
null
You can force every product to be in a certain category, as long as you know its ID.
protected
- $create_new_product_groups
—
SilverShop\Admin\bool
Set this if you want categories to be created if they don't exist. - $foundParentId
public
- $columnMap
- $duplicateChecks
- $relationCallbacks