ProductService
in package
Table of Contents
Constants
- COEFF_CALCULE_WHOLE_SALE_PRODUCT = 2.7
- PROMO_PERCENTAGE = 50
- sameColors = ["Argenté" => 23, "Beige/Marron" => 291, "Beu Foncé" => 25, "Multicouleur" => 254, "Dark" => 24, "Marron clair" => 59, "Fuchsia" => 590]
Properties
- $eventDispatcher : EventDispatcherInterface
- $productService : mixed
- AppBundle\Services\ProductService
- $allCategories : mixed
- $attributeService : AttributeService
- $categoryService : CategoryService
- $configService : ConfigService|object
- $container : ContainerInterface
- $entityManager : EntityManagerInterface
- $filesImportService : FilesImportService
- $header : array<string|int, mixed>
- $meduseService : mixed
- $priceHistoryService : PriceHistoryService
- $priceService : PriceService
- $productFeedDir : mixed
- $productFeedDirPath : string
- $productFeedFile : mixed
- $queueService : QueueServiceInterface
- $stores : mixed
- $vidaxlApi : VidaxlApi
Methods
- __construct() : mixed
- addAsirGroupLog() : mixed
- afterSaleProductCreated() : void
- afterSaleProductUpdatedFromSale() : mixed
- asirExport() : mixed
- calculateMenzzoPriceFromWholeSalePrice() : false|float
- checkAndApplyPromo() : void
- To be removed
- checkAsirGroupLogFile() : string
- connectToAsirSftp() : SFTP
- connectToSftp() : SFTP
- export() : StreamedResponse
- Exporting sales
- exportXls() : mixed
- Exporting as Xls
- getCalculatedPrice() : false|float
- getCategories() : array<string|int, mixed>|array<string|int, int>
- getDimensionFeatures() : array<string|int, string>
- getGlsMessagerieShippingPrice() : mixed
- getGlsShippingPrice() : mixed
- getMappingColor() : array<string|int, mixed>
- getMappingColoris() : string
- getMatiere() : array<string|int, mixed>
- getProductMappingData() : array<string|int, mixed>
- getRepo() : ProductRepository
- importPromoFileFromSftp() : SFTP
- Connecting to SFTP
- logFile() : mixed
- mappingCoeff() : float|int
- mappingLamp() : string|void
- mappingTaille() : string
- processSaleProduct() : void
- save() : Product
- Save The Entity
- syncProductStockInLogidavAndMagento() : mixed
- updateAsirGroupProductStatus() : mixed
- exportCsv() : StreamedResponse
- Exporting as csv
- getFinalCategory() : mixed|null
- Get Final category from category ids
- getPregForOne() : array<string|int, mixed>
- getPregMatch() : array<string|int, string>
Constants
COEFF_CALCULE_WHOLE_SALE_PRODUCT
public
mixed
COEFF_CALCULE_WHOLE_SALE_PRODUCT
= 2.7
PROMO_PERCENTAGE
public
mixed
PROMO_PERCENTAGE
= 50
sameColors
public
mixed
sameColors
= ["Argenté" => 23, "Beige/Marron" => 291, "Beu Foncé" => 25, "Multicouleur" => 254, "Dark" => 24, "Marron clair" => 59, "Fuchsia" => 590]
Properties
$eventDispatcher
protected
EventDispatcherInterface
$eventDispatcher
$productService
AppBundle\Services\ProductService
protected
mixed
$productService
$allCategories
private
mixed
$allCategories
$attributeService
private
AttributeService
$attributeService
$categoryService
private
CategoryService
$categoryService
$configService
private
ConfigService|object
$configService
$container
private
ContainerInterface
$container
$entityManager
private
EntityManagerInterface
$entityManager
$filesImportService
private
FilesImportService
$filesImportService
$header
private
array<string|int, mixed>
$header
= ['id' => 'ID', 'img' => 'Img', 'sku' => 'Réf', 'ean' => 'Ean', 'name' => 'Nom', 'description' => 'Description', 'features' => 'Features', 'extraFeatures' => 'Extra Features', 'color' => 'Couleur', 'menzzoPrice' => 'Prix Menzzo', 'retailPrice' => 'Prix magasin', 'wholesalePrice' => 'Prix Facturé', 'cat' => 'Catégories', 'qty' => 'Qté', 'price' => 'Prix', 'variations' => 'Variantes', 'packageDimensions' => 'Dimensions', 'asirBuyPrice' => 'Prix d\'achat', 'matter' => 'Matière', 'matterDetail' => 'Matière détail', 'weight' => 'Poids', 'volume' => 'Volume', 'packagesNumber' => 'Nombre de packages', 'saleQty30' => 'Ventes sur 30j', 'buyingPrice' => "prix d'achat"]
$meduseService
private
mixed
$meduseService
$priceHistoryService
private
PriceHistoryService
$priceHistoryService
$priceService
private
PriceService
$priceService
$productFeedDir
private
mixed
$productFeedDir
$productFeedDirPath
private
string
$productFeedDirPath
$productFeedFile
private
mixed
$productFeedFile
$queueService
private
QueueServiceInterface
$queueService
$stores
private
mixed
$stores
$vidaxlApi
private
VidaxlApi
$vidaxlApi
Methods
__construct()
public
__construct(ContainerInterface $container, QueueServiceInterface $queueService, EntityManagerInterface $entityManager, AttributeService $attributeService, EventDispatcherInterface $eventDispatcher, PriceHistoryService $priceHistoryService, PriceService $priceService, FilesImportService $filesImportService, MeduseService $meduseService) : mixed
Parameters
- $container : ContainerInterface
- $queueService : QueueServiceInterface
- $entityManager : EntityManagerInterface
- $attributeService : AttributeService
- $eventDispatcher : EventDispatcherInterface
- $priceHistoryService : PriceHistoryService
- $priceService : PriceService
- $filesImportService : FilesImportService
- $meduseService : MeduseService
addAsirGroupLog()
public
addAsirGroupLog(mixed $results) : mixed
Parameters
- $results : mixed
afterSaleProductCreated()
public
afterSaleProductCreated(AfterSaleProductCreatedFromSaleEvent $event) : void
Parameters
- $event : AfterSaleProductCreatedFromSaleEvent
Tags
afterSaleProductUpdatedFromSale()
public
afterSaleProductUpdatedFromSale(AfterSaleProductUpdatedFromSaleEvent $event) : mixed
Parameters
- $event : AfterSaleProductUpdatedFromSaleEvent
Tags
asirExport()
public
asirExport() : mixed
calculateMenzzoPriceFromWholeSalePrice()
public
calculateMenzzoPriceFromWholeSalePrice(mixed $price) : false|float
Parameters
- $price : mixed
Return values
false|floatcheckAndApplyPromo()
To be removed
public
checkAndApplyPromo(Product $product) : void
Parameters
- $product : Product
checkAsirGroupLogFile()
public
checkAsirGroupLogFile(mixed $file, mixed $header) : string
Parameters
- $file : mixed
- $header : mixed
Return values
stringconnectToAsirSftp()
public
connectToAsirSftp(mixed $sftpServer, mixed $sftpPort, mixed $sftpUserName, mixed $sftpUserPass) : SFTP
Parameters
- $sftpServer : mixed
- $sftpPort : mixed
- $sftpUserName : mixed
- $sftpUserPass : mixed
Return values
SFTPconnectToSftp()
public
connectToSftp(mixed $host, mixed $port, mixed $username, mixed $password) : SFTP
Parameters
- $host : mixed
- $port : mixed
- $username : mixed
- $password : mixed
Return values
SFTPexport()
Exporting sales
public
export(mixed $title, mixed $data, mixed $columns, mixed $format[, array<string|int, mixed> $customHeader = [] ]) : StreamedResponse
Parameters
- $title : mixed
- $data : mixed
- $columns : mixed
- $format : mixed
- $customHeader : array<string|int, mixed> = []
Return values
StreamedResponseexportXls()
Exporting as Xls
public
exportXls(mixed $data, mixed $columns, mixed $title[, bool $toFile = false ]) : mixed
Parameters
- $data : mixed
- $columns : mixed
- $title : mixed
- $toFile : bool = false
getCalculatedPrice()
public
getCalculatedPrice(mixed $wholeSalePrice) : false|float
Parameters
- $wholeSalePrice : mixed
Return values
false|floatgetCategories()
public
getCategories(mixed $product) : array<string|int, mixed>|array<string|int, int>
Parameters
- $product : mixed
Return values
array<string|int, mixed>|array<string|int, int>getDimensionFeatures()
public
getDimensionFeatures(mixed $asGroupProduct) : array<string|int, string>
Parameters
- $asGroupProduct : mixed
Return values
array<string|int, string>getGlsMessagerieShippingPrice()
public
static getGlsMessagerieShippingPrice(mixed $weight) : mixed
Parameters
- $weight : mixed
getGlsShippingPrice()
public
static getGlsShippingPrice(mixed $weight) : mixed
Parameters
- $weight : mixed
getMappingColor()
public
getMappingColor(mixed $color) : array<string|int, mixed>
Parameters
- $color : mixed
Return values
array<string|int, mixed>getMappingColoris()
public
getMappingColoris(mixed $color) : string
Parameters
- $color : mixed
Return values
stringgetMatiere()
public
getMatiere(mixed $asGroupProduct, int $id) : array<string|int, mixed>
Parameters
- $asGroupProduct : mixed
- $id : int
Return values
array<string|int, mixed>getProductMappingData()
public
getProductMappingData(Product $asGroupProduct[, array<string|int, mixed> $color = [] ]) : array<string|int, mixed>
Parameters
- $asGroupProduct : Product
- $color : array<string|int, mixed> = []
Return values
array<string|int, mixed>getRepo()
public
getRepo() : ProductRepository
Return values
ProductRepositoryimportPromoFileFromSftp()
Connecting to SFTP
public
importPromoFileFromSftp() : SFTP
Return values
SFTPlogFile()
public
logFile(string $msg) : mixed
Parameters
- $msg : string
mappingCoeff()
public
mappingCoeff(mixed $weight) : float|int
Parameters
- $weight : mixed
Return values
float|intmappingLamp()
public
mappingLamp(mixed $asGroupProduct) : string|void
Parameters
- $asGroupProduct : mixed
Return values
string|voidmappingTaille()
public
mappingTaille(mixed $asGroupProduct) : string
Parameters
- $asGroupProduct : mixed
Return values
stringprocessSaleProduct()
public
processSaleProduct(mixed $saleProduct) : void
Parameters
- $saleProduct : mixed
save()
Save The Entity
public
save(Product $catalog[, bool $flush = true ]) : Product
Parameters
- $catalog : Product
- $flush : bool = true
Return values
ProductsyncProductStockInLogidavAndMagento()
public
syncProductStockInLogidavAndMagento(string $sku, int $qty) : mixed
Parameters
- $sku : string
- $qty : int
Tags
updateAsirGroupProductStatus()
public
updateAsirGroupProductStatus(string $sku, int $isActive) : mixed
Parameters
- $sku : string
- $isActive : int
exportCsv()
Exporting as csv
private
exportCsv(mixed $data, mixed $columns, mixed $title) : StreamedResponse
Parameters
- $data : mixed
- $columns : mixed
- $title : mixed
Return values
StreamedResponsegetFinalCategory()
Get Final category from category ids
private
getFinalCategory(mixed $categoryIds) : mixed|null
Parameters
- $categoryIds : mixed
Return values
mixed|nullgetPregForOne()
private
getPregForOne(mixed $string, mixed $word) : array<string|int, mixed>
Parameters
- $string : mixed
- $word : mixed
Return values
array<string|int, mixed>getPregMatch()
private
getPregMatch(mixed $string, mixed $word) : array<string|int, string>
Parameters
- $string : mixed
- $word : mixed