Documentation

Order extends Record
in package

Synchronization orders 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.
$connector  : Token
Connector.
$updateFields  : mixed
{@inheritdoc}
__construct()  : mixed
Constructor.
createOrderInCrm()  : mixed|int
Create order in crm.
export()  : bool
Export orders to magento.
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.
getChanges()  : Generator
Get changes for update.
getFormattedTime()  : string
Return parsed time to magento time zone.
getFromApi()  : array<string|int, mixed>
Get data by id from api.
getOrdersFromApi()  : array<string|int, mixed>
Method to get orders form Magento.
getSearchCriteria()  : string
Method to get search criteria Magento records.
import()  : bool
Import orders 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.
updateOrderInCrm()  : void
Method to update order in YetiForce.
updateOrderInMagento()  : void
Update order in magento.

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 = []

$updateFields

{@inheritdoc}

protected static mixed $updateFields = ['ssingleorders_status', 'status_magento']

Methods

__construct()

Constructor.

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

createOrderInCrm()

Create order in crm.

public createOrderInCrm(Inventory $mapModel) : mixed|int
Parameters
$mapModel : Inventory
Return values
mixed|int

export()

Export orders to magento.

public export() : bool
Return values
bool

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

getChanges()

Get changes for update.

public getChanges() : Generator
Return values
Generator

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>

getOrdersFromApi()

Method to get orders form Magento.

public getOrdersFromApi() : array<string|int, mixed>
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 orders 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

updateOrderInCrm()

Method to update order in YetiForce.

public updateOrderInCrm(int $id, Inventory $mapModel) : void
Parameters
$id : int
$mapModel : Inventory
Tags
throws
Exception
Return values
void

updateOrderInMagento()

Update order in magento.

public updateOrderInMagento(array<string|int, mixed> $row) : void
Parameters
$row : array<string|int, mixed>
Return values
void

        

Search results