ProductApi
extends MenzzoApi
in package
Class ProductApi
Table of Contents
Properties
- $admin_password : mixed
- $admin_username : mixed
- $base_url : mixed
- $container : ContainerInterface
- $em : EntityManager
- $mzProduct : mixed
- $password : mixed
- $token_url : mixed
- $url : mixed
- $username : mixed
- $accessToken : string
- $apiKeyConfigCode : string
Methods
- __construct() : mixed
- ProductApi constructor.
- addMediaImagesToProduct() : bool|mixed
- Create Product media images
- addProductlinks() : bool|mixed
- ADD product links data
- addRepository() : void
- Add a repository to this service
- addService() : void
- Add a service to this service
- assignProductToCategory() : bool|mixed
- Assign Product To Category
- assingeProductToWebsite() : bool|mixed
- assign Product to a specific website Product
- batchProductQtyUpdate() : bool|mixed
- Batch Update
- batchProductUpdate() : bool|mixed
- Batch Update
- createProduct() : bool|mixed
- Create Product
- deletedImagesForProduct() : bool|mixed
- Deleted All Images for Product
- deleteProductLinks() : mixed
- Delete Product links by sku and type and the linked sku
- formatProductData() : mixed
- Formatting product data
- getApiToken() : bool|mixed
- Get Api Token
- getAttributeOptions() : array<string|int, mixed>|mixed
- getAxelitesProducts() : false
- getByCriteria() : bool|mixed
- Get products by criteria
- getBySku() : bool|mixed
- Get product details by sku
- getBySkuAndStore() : bool|mixed
- get product details by sku & store
- getCategories() : bool|mixed
- Get Categories
- getEntityManager() : EntityManager
- Getter of the Entity Manager
- getMediaProduct() : bool|mixed
- Create Product media images
- getMenuAllStoreMezzo() : void
- getProductLinksByType() : bool|mixed
- getProductsShippingRates() : bool|mixed
- Get Product stores Prices
- getProductsStoreData() : bool|mixed
- Get products by criteria
- getProductStoresPrices() : bool|mixed
- Get Product stores Prices
- getProductViewsCount() : mixed
- getQueuesStatus() : array<string|int, mixed>
- getSeoProductInfos() : array<string|int, mixed>|mixed
- importLogidavQueueBatch() : bool
- Envoie un batch de 500 lignes de mz_queue à Magento
- refreshApiToken() : bool|mixed|string
- Refreshing Api Access
- removeProductFromWebsite() : bool|mixed
- Remove product from website
- resetProductAttributes() : mixed
- setEntityManager() : mixed
- Setter of the Entity Manager
- synchroniseJsonMenuCategory() : array<string|int, mixed>|mixed
- updateProductData() : bool|mixed
- Update product stock data
- updateProductStockData() : bool|mixed
- Update product stock data
- uploadFileByAttributeCode() : bool|mixed
- execute() : mixed
- formatResponse() : false|mixed
- Returning array from response
Properties
$admin_password
protected
mixed
$admin_password
Tags
$admin_username
protected
mixed
$admin_username
Tags
$base_url
protected
mixed
$base_url
Tags
$container
protected
ContainerInterface
$container
$em
protected
EntityManager
$em
The Entity Manager
$mzProduct
protected
mixed
$mzProduct
Tags
$password
protected
mixed
$password
Tags
$token_url
protected
mixed
$token_url
Tags
$url
protected
mixed
$url
Tags
$username
protected
mixed
$username
Tags
$accessToken
private
string
$accessToken
= ''
$apiKeyConfigCode
private
string
$apiKeyConfigCode
= 'MZ_MAGENTO_ACCESS_TOKEN'
Methods
__construct()
ProductApi constructor.
public
__construct(mixed $base_url, mixed $token_url, mixed $username, mixed $password, mixed $mzproduct) : mixed
Parameters
- $base_url : mixed
- $token_url : mixed
- $username : mixed
- $password : mixed
- $mzproduct : mixed
addMediaImagesToProduct()
Create Product media images
public
addMediaImagesToProduct(mixed $sku, mixed $data[, int $storeId = 0 ]) : bool|mixed
Parameters
- $sku : mixed
- $data : mixed
- $storeId : int = 0
Return values
bool|mixed —(array)
addProductlinks()
ADD product links data
public
addProductlinks(mixed $data, mixed $sku) : bool|mixed
Parameters
- $data : mixed
- $sku : mixed
Return values
bool|mixed —(array)
addRepository()
Add a repository to this service
public
addRepository(int $key, string $class) : void
Parameters
- $key : int
-
Key
- $class : string
-
Class
addService()
Add a service to this service
public
addService(int $key, mixed $service) : void
Parameters
- $key : int
-
Key
- $service : mixed
assignProductToCategory()
Assign Product To Category
public
assignProductToCategory(mixed $categoryId, mixed $sku[, mixed $position = 0 ][, int $storeId = 0 ]) : bool|mixed
Parameters
- $categoryId : mixed
- $sku : mixed
- $position : mixed = 0
- $storeId : int = 0
Return values
bool|mixed —(array)
assingeProductToWebsite()
assign Product to a specific website Product
public
assingeProductToWebsite(mixed $sku, int $storeId) : bool|mixed
Parameters
- $sku : mixed
- $storeId : int
Return values
bool|mixed —(array)
batchProductQtyUpdate()
Batch Update
public
batchProductQtyUpdate(array<string|int, mixed> $data[, int $storeId = 0 ]) : bool|mixed
Parameters
- $data : array<string|int, mixed>
- $storeId : int = 0
Return values
bool|mixed —(array)
batchProductUpdate()
Batch Update
public
batchProductUpdate(array<string|int, mixed> $data[, int $storeId = 0 ]) : bool|mixed
Parameters
- $data : array<string|int, mixed>
- $storeId : int = 0
Return values
bool|mixed —(array)
createProduct()
Create Product
public
createProduct(mixed $data[, int $storeId = 0 ][, mixed $saveOptions = false ]) : bool|mixed
Parameters
- $data : mixed
- $storeId : int = 0
- $saveOptions : mixed = false
Return values
bool|mixed —(array)
deletedImagesForProduct()
Deleted All Images for Product
public
deletedImagesForProduct(mixed $productId) : bool|mixed
Parameters
- $productId : mixed
Return values
bool|mixeddeleteProductLinks()
Delete Product links by sku and type and the linked sku
public
deleteProductLinks(mixed $sku, mixed $type, mixed $linkedProductSku[, int $storeId = 0 ]) : mixed
Parameters
- $sku : mixed
- $type : mixed
- $linkedProductSku : mixed
- $storeId : int = 0
formatProductData()
Formatting product data
public
formatProductData(mixed $data) : mixed
Parameters
- $data : mixed
Tags
getApiToken()
Get Api Token
public
getApiToken(mixed $username, mixed $password) : bool|mixed
Parameters
- $username : mixed
- $password : mixed
Tags
Return values
bool|mixed —(string) token
getAttributeOptions()
public
getAttributeOptions(mixed $attrCode) : array<string|int, mixed>|mixed
Parameters
- $attrCode : mixed
Return values
array<string|int, mixed>|mixedgetAxelitesProducts()
public
getAxelitesProducts([mixed $page = 1 ][, mixed $limit = 500 ]) : false
Parameters
- $page : mixed = 1
- $limit : mixed = 500
Return values
falsegetByCriteria()
Get products by criteria
public
getByCriteria(mixed $criteria[, bool $asArray = true ][, int $storeId = 0 ]) : bool|mixed
Parameters
- $criteria : mixed
- $asArray : bool = true
- $storeId : int = 0
Return values
bool|mixed —(array)
getBySku()
Get product details by sku
public
getBySku(mixed $sku[, bool $searchCriteria = false ][, bool $asArray = true ]) : bool|mixed
Parameters
- $sku : mixed
- $searchCriteria : bool = false
- $asArray : bool = true
Tags
Return values
bool|mixed —(array)
getBySkuAndStore()
get product details by sku & store
public
getBySkuAndStore(mixed $sku[, string $store_code = 'all' ][, bool $searchCriteria = false ][, bool $asArray = true ]) : bool|mixed
Parameters
- $sku : mixed
- $store_code : string = 'all'
- $searchCriteria : bool = false
- $asArray : bool = true
Tags
Return values
bool|mixed —(array)
getCategories()
Get Categories
public
getCategories([array<string|int, mixed> $searchCriteria = [] ][, int $storeId = 3 ]) : bool|mixed
Parameters
- $searchCriteria : array<string|int, mixed> = []
- $storeId : int = 3
Return values
bool|mixed —(array)
getEntityManager()
Getter of the Entity Manager
public
getEntityManager() : EntityManager
Return values
EntityManagergetMediaProduct()
Create Product media images
public
getMediaProduct(mixed $sku[, int $storeId = 0 ]) : bool|mixed
Parameters
- $sku : mixed
- $storeId : int = 0
Return values
bool|mixed —(array)
getMenuAllStoreMezzo()
public
getMenuAllStoreMezzo() : void
getProductLinksByType()
public
getProductLinksByType(mixed $sku, mixed $type[, int $storeId = 0 ][, bool $asArray = true ]) : bool|mixed
Parameters
- $sku : mixed
- $type : mixed
- $storeId : int = 0
- $asArray : bool = true
Return values
bool|mixedgetProductsShippingRates()
Get Product stores Prices
public
getProductsShippingRates(mixed $products[, array<string|int, mixed> $address = [] ][, int $storeId = 3 ]) : bool|mixed
Parameters
- $products : mixed
- $address : array<string|int, mixed> = []
- $storeId : int = 3
Return values
bool|mixed —(array)
getProductsStoreData()
Get products by criteria
public
getProductsStoreData(mixed $productIds[, array<string|int, mixed> $storeIds = [] ]) : bool|mixed
Parameters
- $productIds : mixed
- $storeIds : array<string|int, mixed> = []
Return values
bool|mixed —(array)
getProductStoresPrices()
Get Product stores Prices
public
getProductStoresPrices(mixed $productId) : bool|mixed
Parameters
- $productId : mixed
Return values
bool|mixed —(array)
getProductViewsCount()
public
getProductViewsCount(mixed $id, mixed $period) : mixed
Parameters
- $id : mixed
- $period : mixed
getQueuesStatus()
public
getQueuesStatus(array<string|int, mixed> $uuids) : array<string|int, mixed>
Parameters
- $uuids : array<string|int, mixed>
Return values
array<string|int, mixed>getSeoProductInfos()
public
getSeoProductInfos(array<string|int, mixed> $stores, array<string|int, mixed> $products) : array<string|int, mixed>|mixed
Parameters
- $stores : array<string|int, mixed>
- $products : array<string|int, mixed>
Return values
array<string|int, mixed>|mixedimportLogidavQueueBatch()
Envoie un batch de 500 lignes de mz_queue à Magento
public
importLogidavQueueBatch(array<string|int, mixed> $queues) : bool
Parameters
- $queues : array<string|int, mixed>
Return values
boolrefreshApiToken()
Refreshing Api Access
public
refreshApiToken(mixed $username, mixed $password) : bool|mixed|string
Parameters
- $username : mixed
- $password : mixed
Tags
Return values
bool|mixed|stringremoveProductFromWebsite()
Remove product from website
public
removeProductFromWebsite(mixed $sku, mixed $websiteId) : bool|mixed
Parameters
- $sku : mixed
- $websiteId : mixed
Return values
bool|mixed —(array)
resetProductAttributes()
public
resetProductAttributes(Product $product, array<string|int, mixed> $attributes, int $storeId, mixed $inputType) : mixed
Parameters
- $product : Product
- $attributes : array<string|int, mixed>
- $storeId : int
- $inputType : mixed
setEntityManager()
Setter of the Entity Manager
public
setEntityManager(EntityManager $em) : mixed
Parameters
- $em : EntityManager
-
the Entity Manager
synchroniseJsonMenuCategory()
public
synchroniseJsonMenuCategory(mixed $jsonMenu, mixed $storeId) : array<string|int, mixed>|mixed
Parameters
- $jsonMenu : mixed
- $storeId : mixed
Return values
array<string|int, mixed>|mixedupdateProductData()
Update product stock data
public
updateProductData(Product $product, mixed $data[, int $storeId = 0 ]) : bool|mixed
Parameters
- $product : Product
- $data : mixed
- $storeId : int = 0
Return values
bool|mixed —(array)
updateProductStockData()
Update product stock data
public
updateProductStockData(Product $product, mixed $data) : bool|mixed
Parameters
- $product : Product
- $data : mixed
Return values
bool|mixed —(array)
uploadFileByAttributeCode()
public
uploadFileByAttributeCode(mixed $attributeCode, mixed $fileName, mixed $fileContent) : bool|mixed
Parameters
- $attributeCode : mixed
- $fileName : mixed
- $fileContent : mixed
Return values
bool|mixedexecute()
protected
execute(mixed $requestType, mixed $endpoint[, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $headers = [] ]) : mixed
Parameters
- $requestType : mixed
- $endpoint : mixed
- $body : array<string|int, mixed> = []
- $headers : array<string|int, mixed> = []
formatResponse()
Returning array from response
protected
formatResponse(mixed $response) : false|mixed
Parameters
- $response : mixed