Documentation

Category extends Record
in package

Synchronize products categories class.

Table of Contents

$accountFieldsMap  : array<string|int, string>
Account fields map .
$config  : Config
Config.
$controller  : Controller
Controller.
$lastScan  : array<string|int, mixed>
Last scan config data.
$cache  : array<string|int, mixed>
Category cache.
$connector  : Token
Connector.
__construct()  : mixed
Constructor.
createCategory()  : void
Create category in CRM.
findAccount()  : int
Find account record id by vat id or email fields.
findAdditionalData()  : array<string|int, mixed>
Parse additional data.
findByEmail()  : int
Find record id by email fields.
findProduct()  : int
Find product id by ean.
getCategoriesFromApi()  : array<string|int, mixed>
Method to get categories form Magento.
getCategory()  : array<string|int, mixed>
Method to get category by id form Magento.
getCrmId()  : int
Get crm id by magento id.
getFormattedTime()  : string
Return parsed time to magento time zone.
getFromApi()  : array<string|int, mixed>
Get data by id from api.
getSearchCriteria()  : string
Method to get search criteria Magento records.
import()  : bool
Import categories from Magento.
log()  : void
Add log to db.
parseInventoryData()  : array<string|int, mixed>
Parse inventory data to YetiForce format.
parseShippingData()  : array<string|int, mixed>
Parse shipping data.
process()  : mixed
{@inheritdoc}
saveInventoryCrm()  : bool
Save inventory elements.
syncAccount()  : int
Method to create/update account.
syncContact()  : int
Method to create contact.

Properties

$accountFieldsMap

Account fields map .

public array<string|int, string> $accountFieldsMap = ['email1' => 'email', 'phone' => 'phone', 'phone_extra' => 'phone_extra', 'fax' => 'mobile', 'fax_extra' => 'mobile_extra', 'buildingnumbera' => 'buildingnumbera', 'addresslevel1a' => 'addresslevel1a', 'addresslevel2a' => 'addresslevel2a', 'addresslevel3a' => 'addresslevel3a', 'addresslevel4a' => 'addresslevel4a', 'addresslevel5a' => 'addresslevel5a', 'addresslevel6a' => 'addresslevel6a', 'addresslevel7a' => 'addresslevel7a', 'addresslevel8a' => 'addresslevel8a', 'buildingnumberb' => 'buildingnumberb', 'addresslevel1b' => 'addresslevel1b', 'addresslevel2b' => 'addresslevel2b', 'addresslevel3b' => 'addresslevel3b', 'addresslevel4b' => 'addresslevel4b', 'addresslevel5b' => 'addresslevel5b', 'addresslevel6b' => 'addresslevel6b', 'addresslevel7b' => 'addresslevel7b', 'addresslevel8b' => 'addresslevel8b']

$lastScan

Last scan config data.

public array<string|int, mixed> $lastScan = []

$cache

Category cache.

protected array<string|int, mixed> $cache = []

Methods

__construct()

Constructor.

public __construct(Controller $controller) : mixed
Parameters
$controller : Controller
Return values
mixed

createCategory()

Create category in CRM.

public createCategory(int $id[, array<string|int, mixed> $category = [] ]) : void
Parameters
$id : int
$category : array<string|int, mixed> = []
Return values
void

findAccount()

Find account record id by vat id or email fields.

public findAccount(array<string|int, mixed> $data, Vtiger_Record_Model $recordModel) : int
Parameters
$data : array<string|int, mixed>
$recordModel : Vtiger_Record_Model
Return values
int

findAdditionalData()

Parse additional data.

public findAdditionalData(Inventory $mapModel) : array<string|int, mixed>
Parameters
$mapModel : Inventory
Return values
array<string|int, mixed>

findByEmail()

Find record id by email fields.

public findByEmail(array<string|int, mixed> $data, Vtiger_Record_Model $recordModel) : int
Parameters
$data : array<string|int, mixed>
$recordModel : Vtiger_Record_Model
Return values
int

findProduct()

Find product id by ean.

public findProduct(string $ean) : int
Parameters
$ean : string
Return values
int

getCategoriesFromApi()

Method to get categories form Magento.

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

getCategory()

Method to get category by id form Magento.

public getCategory(int $id) : array<string|int, mixed>
Parameters
$id : int
Return values
array<string|int, mixed>

getCrmId()

Get crm id by magento id.

public getCrmId(int $magentoId) : int
Parameters
$magentoId : int
Return values
int

getFormattedTime()

Return parsed time to magento time zone.

public getFormattedTime(string $value) : string
Parameters
$value : string
Return values
string

getFromApi()

Get data by id from api.

public getFromApi(string $type, string $id) : array<string|int, mixed>
Parameters
$type : string
$id : string
Return values
array<string|int, mixed>

getSearchCriteria()

Method to get search criteria Magento records.

public getSearchCriteria([int $pageSize = 10 ]) : string
Parameters
$pageSize : int = 10
Return values
string

import()

Import categories from Magento.

public import() : bool
Return values
bool

log()

Add log to db.

public log(string $category[, Throwable|null $ex = null ]) : void
Parameters
$category : string
$ex : Throwable|null = null
Return values
void

parseInventoryData()

Parse inventory data to YetiForce format.

public parseInventoryData(Vtiger_Record_Model $recordModel, array<string|int, mixed> $item, Inventory $mapModel) : array<string|int, mixed>
Parameters
$recordModel : Vtiger_Record_Model
$item : array<string|int, mixed>
$mapModel : Inventory
Return values
array<string|int, mixed>

parseShippingData()

Parse shipping data.

public parseShippingData(Inventory $mapModel) : array<string|int, mixed>
Parameters
$mapModel : Inventory
Return values
array<string|int, mixed>

process()

{@inheritdoc}

public process() : mixed
Return values
mixed

syncAccount()

Method to create/update account.

public syncAccount(array<string|int, mixed> $data) : int
Parameters
$data : array<string|int, mixed>
Return values
int

syncContact()

Method to create contact.

public syncContact(array<string|int, mixed> $data) : int
Parameters
$data : array<string|int, mixed>
Return values
int

        

Search results