Logidav Docs

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

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

$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"]

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

calculateMenzzoPriceFromWholeSalePrice()

public calculateMenzzoPriceFromWholeSalePrice(mixed $price) : false|float
Parameters
$price : mixed
Return values
false|float

checkAsirGroupLogFile()

public checkAsirGroupLogFile(mixed $file, mixed $header) : string
Parameters
$file : mixed
$header : mixed
Return values
string

connectToAsirSftp()

public connectToAsirSftp(mixed $sftpServer, mixed $sftpPort, mixed $sftpUserName, mixed $sftpUserPass) : SFTP
Parameters
$sftpServer : mixed
$sftpPort : mixed
$sftpUserName : mixed
$sftpUserPass : mixed
Return values
SFTP

connectToSftp()

public connectToSftp(mixed $host, mixed $port, mixed $username, mixed $password) : SFTP
Parameters
$host : mixed
$port : mixed
$username : mixed
$password : mixed
Return values
SFTP

export()

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
StreamedResponse

exportXls()

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|float

getCategories()

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
string

getMatiere()

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>

importPromoFileFromSftp()

Connecting to SFTP

public importPromoFileFromSftp() : SFTP
Return values
SFTP

logFile()

public logFile(string $msg) : mixed
Parameters
$msg : string

mappingCoeff()

public mappingCoeff(mixed $weight) : float|int
Parameters
$weight : mixed
Return values
float|int

mappingLamp()

public mappingLamp(mixed $asGroupProduct) : string|void
Parameters
$asGroupProduct : mixed
Return values
string|void

mappingTaille()

public mappingTaille(mixed $asGroupProduct) : string
Parameters
$asGroupProduct : mixed
Return values
string

processSaleProduct()

public processSaleProduct(mixed $saleProduct) : void
Parameters
$saleProduct : mixed

syncProductStockInLogidavAndMagento()

public syncProductStockInLogidavAndMagento(string $sku, int $qty) : mixed
Parameters
$sku : string
$qty : int
Tags
throws
ContainerExceptionInterface
throws
NotFoundExceptionInterface

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
StreamedResponse

getFinalCategory()

Get Final category from category ids

private getFinalCategory(mixed $categoryIds) : mixed|null
Parameters
$categoryIds : mixed
Return values
mixed|null

getPregForOne()

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
Return values
array<string|int, string>

        
On this page

Search results