Order
extends Inventory
in package
Order map class.
Table of Contents
- $additionalFieldsCrm : mixed
- {@inheritdoc}
- $billingFields : array<string|int, string>
- Mapped billing fields.
- $customer : object
- Customer model.
- $data : array<string|int, mixed>
- Data from Magento.
- $dataCrm : array<string|int, string>
- Data from YetiForce.
- $dataInv : array<string|int, mixed>
- Inventory item data from Magento.
- $fieldsDefaultValue : array<string|int, string>
- Fields default value.
- $fieldsType : mixed
- {@inheritdoc}
- $gender : array<string|int, string>
- Contacts_gender map.
- $mappedFields : mixed
- {@inheritdoc}
- $mappedFieldsInv : array<string|int, mixed>
- Inventory fields.
- $payment_methods : array<string|int, mixed>
- Payment method value map.
- $salutationtype : array<string|int, string>
- Contacts_gender map.
- $shippingFields : array<string|int, string>
- Mapped shipping fields.
- $ssingleorders_status : array<string|int, string>
- Magento state mapping to CRM statuses.
- $status_magento : array<string|int, mixed>
- status_magento field map.
- $statusForMagento : array<string|int, mixed>
- Mapping statuses from the CRM to Magento.
- $moduleName : mixed
- {@inheritdoc}
- $synchronizer : Base
- Synchronizer.
- __construct() : mixed
- Constructor.
- addAdditionalInvData() : array<string|int, mixed>
- Parse additional inventory data.
- createProduct() : int
- Create product.
- getAdditionalFieldsCrm() : array<string|int, mixed>
- Return additional YetiForce fields list.
- getAddressDataByType() : mixed
- {@inheritdoc}
- getAddressDataCrm() : array<string|int, mixed>
- Return address data.
- getAddressFieldsCrm() : array<string|int, mixed>
- Return address fields crm.
- getAddressFieldValue() : array<string|int, mixed>|mixed
- Get address field value from Magento.
- getCrmBirthday() : string|null
- Get birthday.
- getCrmId() : int
- Get crm id by magento id.
- getCurrency() : int
- Get currency id.
- getCustomAttributeValue() : mixed
- Get custom attribute value.
- getDataCrm() : array<string|int, mixed>
- Return parsed data in YetiForce format.
- getFieldNameCrm() : mixed|string
- Return YetiForce field name.
- getFields() : array<string|int, mixed>
- Return fields list.
- getFieldValue() : array<string|int, mixed>|mixed
- Get field value from Magento.
- getInvFieldName() : mixed|string
- Return Magento inventory field name.
- getInvFieldNameCrm() : string
- Return YetiForce inventory field name.
- getInvFieldValue() : array<string|int, mixed>|mixed
- Get inventory field value.
- getUpdateData() : array<string|int, mixed>
- Data update in magento.
- parsePhone() : array<string|int, mixed>
- Parse phone number.
- setData() : void
- Set data.
- setDataCrm() : void
- Set data YetiForce.
- setDataInv() : void
- Set inventory item data from Magento.
Properties
$additionalFieldsCrm
{@inheritdoc}
public
static mixed
$additionalFieldsCrm
= ['sum_tax' => '', 'sum_total' => '', 'sum_gross' => '', 'sum_discount' => '', 'sum_net' => '', 'payment_status' => '', 'ssingleorders_source' => 'PLL_MAGENTO', 'leadsource' => 'Magento']
$billingFields
Mapped billing fields.
public
static array<string|int, string>
$billingFields
= ['addresslevel1a' => 'country_id', 'addresslevel2a' => 'region|region', 'addresslevel5a' => 'city', 'addresslevel7a' => 'postcode', 'addresslevel8a' => 'street|0', 'buildingnumbera' => 'street|1', 'first_name_a' => 'firstname', 'last_name_a' => 'lastname', 'phone_a' => 'telephone', 'email_a' => 'email', 'vat_id_a' => 'vat_id', 'company_name_a' => 'company', 'phone' => 'telephone', 'mobile' => 'fax']
$customer
Customer model.
public
object
$customer
= false
$data
Data from Magento.
public
array<string|int, mixed>
$data
= []
$dataCrm
Data from YetiForce.
public
array<string|int, string>
$dataCrm
= []
$dataInv
Inventory item data from Magento.
public
array<string|int, mixed>
$dataInv
= []
$fieldsDefaultValue
Fields default value.
public
static array<string|int, string>
$fieldsDefaultValue
= []
$fieldsType
{@inheritdoc}
public
static mixed
$fieldsType
= ['addresslevel1a' => 'country', 'addresslevel1b' => 'country', 'date_start' => 'date', 'payment_methods' => 'mapAndAddNew', 'sale_date' => 'date', 'status_magento' => 'mapAndAddNew', 'ssingleorders_status' => 'mapAndAddNew', 'parent_id' => 'parentRecord']
$gender
Contacts_gender map.
public
static array<string|int, string>
$gender
= ['1' => 'PLL_MAN', '2' => 'PLL_WOMAN']
$mappedFields
{@inheritdoc}
public
static mixed
$mappedFields
= ['subject' => 'increment_id', 'ssingleorders_status' => 'state', 'date_start' => 'created_at', 'attention' => 'customer_note', 'payment_methods' => 'payment|method', 'status_magento' => 'status', 'sale_date' => 'created_at', 'birthday' => 'customer_dob', 'salutationtype' => 'customer_gender', 'email' => 'customer_email', 'firstname' => 'customer_firstname', 'lastname' => 'customer_lastname', 'parent_id' => 'relation_parent_id']
$mappedFieldsInv
Inventory fields.
public
static array<string|int, mixed>
$mappedFieldsInv
= ['price' => 'price', 'qty' => 'qty_ordered', 'name' => 'product_id', 'discount' => 'discount_amount']
$payment_methods
Payment method value map.
public
static array<string|int, mixed>
$payment_methods
= ['redsys' => 'PLL_REDSYS', 'banktransfer' => 'PLL_TRANSFER', 'cashondelivery' => 'PLL_CASH_ON_DELIVERY', 'paypal_express' => 'PLL_PAYPAL_EXPRESS']
$salutationtype
Contacts_gender map.
public
static array<string|int, string>
$salutationtype
= ['1' => 'Mr.', '2' => 'Mrs.']
$shippingFields
Mapped shipping fields.
public
static array<string|int, string>
$shippingFields
= ['addresslevel1b' => 'country_id', 'addresslevel2b' => 'region|region', 'addresslevel5b' => 'city', 'addresslevel7b' => 'postcode', 'addresslevel8b' => 'street|0', 'buildingnumberb' => 'street|1', 'first_name_b' => 'firstname', 'last_name_b' => 'lastname', 'phone_b' => 'telephone', 'email_b' => 'email', 'vat_id_b' => 'vat_id', 'company_name_b' => 'company', 'phone' => 'telephone', 'mobile' => 'fax']
$ssingleorders_status
Magento state mapping to CRM statuses.
public
static array<string|int, string>
$ssingleorders_status
= ['new' => 'PLL_NEW', 'processing' => 'PLL_PROCESSING', 'payment_review' => 'PLL_PAYMENT_REVIEW', 'holded' => 'PLL_ON_HOLD', 'complete' => 'PLL_COMPLETE', 'closed' => 'PLL_CLOSED', 'canceled' => 'PLL_CANCELLED']
$status_magento
status_magento field map.
public
static array<string|int, mixed>
$status_magento
= ['pending' => 'PLL_PENDING', 'pending_payment' => 'PLL_PENDING_PAYMENT', 'pending_paypal' => 'PLL_PENDING_PAYPAL', 'paid' => 'PLL_PAID', 'processing' => 'PLL_PROCESSING', 'paypal_reversed' => 'PLL_PAYPAL_REVERSED', 'payment_review' => 'PLL_PAYMENT_REVIEW', 'fraud' => 'PLL_FRAUD', 'holded' => 'PLL_ON_HOLD', 'send' => 'PLL_SEND', 'complete' => 'PLL_COMPLETE', 'closed' => 'PLL_CLOSED', 'paypal_canceled_reversal' => 'PLL_PAYPAL_CANCELED_REVERSAL', 'canceled' => 'PLL_CANCELLED']
$statusForMagento
Mapping statuses from the CRM to Magento.
public
static array<string|int, mixed>
$statusForMagento
= ['PLL_NEW' => ['state' => 'new', 'status' => 'pending'], 'PLL_PAYMENT_REVIEW' => ['state' => 'payment_review', 'status' => 'payment_review'], 'PLL_ON_HOLD' => ['state' => 'holded', 'status' => 'holded'], 'PLL_PROCESSING' => ['state' => 'processing', 'status' => 'processing'], 'PLL_COMPLETE' => ['state' => 'complete', 'status' => 'complete'], 'PLL_CLOSED' => ['state' => 'closed', 'status' => 'closed'], 'PLL_CANCELLED' => ['state' => 'canceled', 'status' => 'canceled']]
It is used when updating data in Magento.
$moduleName
{@inheritdoc}
protected
mixed
$moduleName
= 'SSingleOrders'
$synchronizer
Synchronizer.
protected
Base
$synchronizer
Methods
__construct()
Constructor.
public
__construct(Base $synchronizer) : mixed
Parameters
- $synchronizer : Base
Return values
mixed —addAdditionalInvData()
Parse additional inventory data.
public
addAdditionalInvData() : array<string|int, mixed>
Return values
array<string|int, mixed> —createProduct()
Create product.
public
createProduct(array<string|int, mixed> $record) : int
Parameters
- $record : array<string|int, mixed>
Return values
int —getAdditionalFieldsCrm()
Return additional YetiForce fields list.
public
getAdditionalFieldsCrm() : array<string|int, mixed>
Return values
array<string|int, mixed> —getAddressDataByType()
{@inheritdoc}
public
getAddressDataByType(string $addressType) : mixed
Parameters
- $addressType : string
Return values
mixed —getAddressDataCrm()
Return address data.
public
getAddressDataCrm(string $type) : array<string|int, mixed>
Parameters
- $type : string
Return values
array<string|int, mixed> —getAddressFieldsCrm()
Return address fields crm.
public
getAddressFieldsCrm(string $type) : array<string|int, mixed>
Parameters
- $type : string
Return values
array<string|int, mixed> —getAddressFieldValue()
Get address field value from Magento.
public
getAddressFieldValue(string $type, string $fieldNameCrm, string $fieldName) : array<string|int, mixed>|mixed
Parameters
- $type : string
- $fieldNameCrm : string
- $fieldName : string
Return values
array<string|int, mixed>|mixed —getCrmBirthday()
Get birthday.
public
getCrmBirthday() : string|null
Return values
string|null —getCrmId()
Get crm id by magento id.
public
getCrmId(int $magentoId[, string|null $moduleName = null ]) : int
Parameters
- $magentoId : int
- $moduleName : string|null = null
Return values
int —getCurrency()
Get currency id.
public
getCurrency() : int
Return values
int —getCustomAttributeValue()
Get custom attribute value.
public
getCustomAttributeValue(string $name) : mixed
Parameters
- $name : string
Return values
mixed —getDataCrm()
Return parsed data in YetiForce format.
public
getDataCrm([bool $onEdit = false ]) : array<string|int, mixed>
Parameters
- $onEdit : bool = false
Return values
array<string|int, mixed> —getFieldNameCrm()
Return YetiForce field name.
public
getFieldNameCrm(string $name) : mixed|string
Parameters
- $name : string
Return values
mixed|string —getFields()
Return fields list.
public
getFields([bool $onEdit = false ]) : array<string|int, mixed>
Parameters
- $onEdit : bool = false
Return values
array<string|int, mixed> —getFieldValue()
Get field value from Magento.
public
getFieldValue(string $magentoFieldName[, string|null $crmFieldName = null ]) : array<string|int, mixed>|mixed
Parameters
- $magentoFieldName : string
- $crmFieldName : string|null = null
Return values
array<string|int, mixed>|mixed —getInvFieldName()
Return Magento inventory field name.
public
getInvFieldName(string $name) : mixed|string
Parameters
- $name : string
Return values
mixed|string —getInvFieldNameCrm()
Return YetiForce inventory field name.
public
getInvFieldNameCrm(string $name) : string
Parameters
- $name : string
Return values
string —getInvFieldValue()
Get inventory field value.
public
getInvFieldValue(string $fieldName) : array<string|int, mixed>|mixed
Parameters
- $fieldName : string
Return values
array<string|int, mixed>|mixed —getUpdateData()
Data update in magento.
public
getUpdateData() : array<string|int, mixed>
Return values
array<string|int, mixed> —parsePhone()
Parse phone number.
public
parsePhone(string $fieldName, array<string|int, mixed> $parsedData) : array<string|int, mixed>
Parameters
- $fieldName : string
- $parsedData : array<string|int, mixed>
Return values
array<string|int, mixed> —setData()
Set data.
public
setData(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
Return values
void —setDataCrm()
Set data YetiForce.
public
setDataCrm(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
Return values
void —setDataInv()
Set inventory item data from Magento.
public
setDataInv(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>