ErpCacheUtil
class ErpCacheUtil
Class ErpCacheUtil - Helper class designed to provide cached data from database
Methods
ErpCacheUtil constructor.
Get all erp codes and ids of products Use file as cache, if there is no file create one
Add data to cache file
Create add read cache file for product relationships
Get all erp codes of products Use file as cache, if there is no file create one
Cache data of ids of simple product for given product erp code Use file as cache, if there is no file create one
Get all erp codes of attribute sets Use file as cache, if there is no file create one
Get all erp codes of attributes Use file as cache, if there is no file create one
Get all erp codes of attribute values Use file as cache, if there is no file create one
Get all erp codes of product attribute values Use file as cache, if there is no file create one
Get id and erp code of all categories Use file as cache, if there is no file create one
Get id and erp code of all brands Use file as cache, if there is no file create one
Create file to use as cache and set array in it
Get list of all product prices Use file as cache, if there is no file create one
Get list of all users id and erp codes Use file as cache, if there is no file create one
Get list of all users shipping addresses Use file as cache, if there is no file create one
Get list of all units of measure Use file as cache, if there is no file create one
Get list of all orders that are not synced with erp
Details
at line 85
__construct(ContainerInterface $container)
ErpCacheUtil constructor.
at line 108
array
setAllProductsIdAndCode(string $filename = ERPTmpFiles::PRODUCT_ID_AND_ERP_CODES_FILE_PATH)
Get all erp codes and ids of products Use file as cache, if there is no file create one
at line 140
array
addDataToFile(mixed $data, mixed $filename, mixed $variableName, bool $preserveKeys = false, mixed $rowFunction = null)
Add data to cache file
at line 183
array
setAllProductsRelationships(mixed $data, mixed $filename, mixed $variableName)
Create add read cache file for product relationships
at line 238
array
getAllProductCodes()
Get all erp codes of products Use file as cache, if there is no file create one
at line 265
array
getSimpleCodeErpCodes()
Cache data of ids of simple product for given product erp code Use file as cache, if there is no file create one
at line 299
array
getAllAttributeSetsCodes(bool $shouldCacheAgain = false)
Get all erp codes of attribute sets Use file as cache, if there is no file create one
at line 333
array
getAllAttributeCodes(bool $shouldCacheAgain = false)
Get all erp codes of attributes Use file as cache, if there is no file create one
at line 367
array
getAllAttributeValueCodes(bool $shouldCacheAgain = false)
Get all erp codes of attribute values Use file as cache, if there is no file create one
at line 401
array
getAllProductAttributeValueCodes(bool $shouldCacheAgain = false)
Get all erp codes of product attribute values Use file as cache, if there is no file create one
at line 435
array
getAllCategoriesIdAndCode()
Get id and erp code of all categories Use file as cache, if there is no file create one
at line 469
array
getAllBrandIdsAndCodes()
Get id and erp code of all brands Use file as cache, if there is no file create one
at line 501
createArrayCacheFile(array $dataArray, string $variableName, string $path, mixed $rowFunction)
Create file to use as cache and set array in it
at line 524
array
getAllProductPrices()
Get list of all product prices Use file as cache, if there is no file create one
at line 558
array
getUserErpCodeToIdArray()
Get list of all users id and erp codes Use file as cache, if there is no file create one
at line 594
array
getAllUsersShippingAddressesArray()
Get list of all users shipping addresses Use file as cache, if there is no file create one
at line 627
array
getUnitsOfMeasureArray()
Get list of all units of measure Use file as cache, if there is no file create one
at line 649
array
getUnsyncedErpOrderIds(mixed $page = 1, mixed $offset = 10)
Get list of all orders that are not synced with erp