Documentation

CsvImport
in package

CSV Import

Tags
author

Cloudrexx Development Team info@cloudrexx.com

copyright

CLOUDREXX CMS - CLOUDREXX AG

subpackage

module_shop

todo

Edit PHP DocBlocks!

Table of Contents

Properties

$arrName2Fieldname  : mixed
$arrTemplateArray  : mixed
$delimiter  : mixed
$escapor  : mixed
$separator  : mixed

Methods

__construct()  : mixed
DBfieldsName()  : mixed
getAvailableNamesMenuOptions()  : array<string|int, mixed>
Return the menu options of available names that can be assigned to the fields of the file to be imported.
getCategoryId()  : int
Returns the ID of the ShopCategory with the given name and parent ID, if present.
GetFileContent()  : array<string|int, mixed>
Get the file content from the csv file
getFilefieldMenuOptions()  : string
Get the file field menu options
GetFirstCat()  : int
Returns the ID of the first ShopCategory found in the database.
GetImageChoice()  : mixed
GetImgListDelete()  : mixed
getNameArray()  : array<string|int, mixed>
Returns an array of template names, indexed by respective IDs
getTemplateArray()  : mixed
initTemplateArray()  : mixed
InsertNewCat()  : int
Insert a new ShopCategory into the database.

Properties

Methods

DBfieldsName()

public DBfieldsName([mixed $name = '' ]) : mixed
Parameters
$name : mixed = ''

getAvailableNamesMenuOptions()

Return the menu options of available names that can be assigned to the fields of the file to be imported.

public getAvailableNamesMenuOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

The available names

getCategoryId()

Returns the ID of the ShopCategory with the given name and parent ID, if present.

public static getCategoryId(string $catName[, int $catParent = null ]) : int

If the ShopCategory cannot be found, a new ShopCategory with the given name is inserted and its ID returned.

Parameters
$catName : string

The ShopCategory name

$catParent : int = null

The optional parent ShopCategory ID, or null to ignore it (default)

Tags
static
author

Unknown info@cloudrexx.com

author

Reto Kohli reto.kohli@comvation.com

Return values
int

The ID of the ShopCategory, or 0 on failure.

GetFileContent()

Get the file content from the csv file

public GetFileContent(string $file) : array<string|int, mixed>
Parameters
$file : string

file name with path

Return values
array<string|int, mixed>

getFilefieldMenuOptions()

Get the file field menu options

public getFilefieldMenuOptions(string $file) : string
Parameters
$file : string

file name with path

Return values
string

GetFirstCat()

Returns the ID of the first ShopCategory found in the database.

public static GetFirstCat() : int

If none is available, a default ShopCateogry named 'Import' is inserted and its ID returned instead.

Tags
static
author

Unknown info@cloudrexx.com

author

Reto Kohli reto.kohli@comvation.com

Return values
int

The ShopCategory, or 0 on failure

GetImgListDelete()

public GetImgListDelete(mixed $DeleteText) : mixed
Parameters
$DeleteText : mixed

getNameArray()

Returns an array of template names, indexed by respective IDs

public getNameArray() : array<string|int, mixed>
Tags
author

Reto Kohli reto.kohli@comvation.com

since
3.0.0
Return values
array<string|int, mixed>

The array of template names

InsertNewCat()

Insert a new ShopCategory into the database.

public static InsertNewCat(string $catName, int $catParent) : int
Parameters
$catName : string

The new ShopCategory name

$catParent : int

The parent ShopCategory ID

Tags
static
author

Unknown info@cloudrexx.com

author

Reto Kohli reto.kohli@comvation.com

Return values
int

The ID of the new ShopCategory, or 0 on failure.


        
On this page

Search results