Logidav Docs

ProductService
in package
uses DatatablesExportTrait

Class ProductService

Table of Contents

Constants

EXPORT_HEADER  = ['id' => 'ID', 'img' => 'Photo', 'sku' => 'SKU', 'name' => 'Nom', 'cat' => 'Catégorie', 'qty' => 'Qté', 'price' => 'Prix']
sameColors  = ["Argenté" => 23, "Beige/Marron" => 291, "Beu Foncé" => 25, "Multicouleur" => 254, "Dark" => 24, "Marron clair" => 59, "Fuchsia" => 590]

Properties

$bigbuyApi  : BigbuyApi
$categoryService  : CategoryService
$configService  : ConfigService|object
$container  : ContainerInterface
$eanProductService  : mixed
AppBundle\Services\EanProductService
$eventDispatcher  : EventDispatcherInterface
$header  : array<string|int, mixed>
$langs  : mixed
$productService  : mixed
AppBundle\Services\ProductService
$stores  : mixed
$allCategories  : array<string|int, mixed>
$attributeService  : AttributeService
$bigbuyShippingRateService  : ShippingRateService
$entityManager  : EntityManagerInterface
$productLabelMatchDictionaryService  : ProductLabelMatchDictionaryService
$queueService  : QueueServiceInterface

Methods

__construct()  : mixed
QueueService constructor.
checkBigBuyDirectory()  : mixed
check if directory exist
checkBigBuyHasPackaging()  : void
dicionnaryChangeLabelForString()  : mixed
export()  : StreamedResponse
Exporting sales
exportXls()  : mixed
Exporting as Xls
generateBodyForShippingRateBigBuyApi()  : array<string|int, array<string|int, mixed>>
generateNewEanForProduct()  : string
getBigBuyMappingData()  : array<string|int, mixed>
getCalculatedPrice()  : mixed
getCategoriesFiles()  : mixed
get Categoriesfiles
getCategoryProductFullData()  : false|string
getCategoryProductInfoByLang()  : false|string
getDicionnaryLabelle()  : mixed
getFormattedAttributes()  : mixed
Get Formatted Attributes
getMinimumCarerShippingRate()  : array<string|int, mixed>|false
getOptionsForAttributePack()  : array<string|int, mixed>
getRepo()  : ProductRepository
importBigBuyRelatedCategoryProductsCsv()  : mixed
importProducts()  : void
Import Products
importProductsCsv()  : void
importProductsDoctrine()  : void
importProductsSql()  : void
initSelection()  : array<string|int, mixed>
initStoreLangCodes()  : mixed
save()  : Product
Save The Entity
connect()  : SFTP
Connecting by sftp
exportCsv()  : StreamedResponse
Exporting as csv
getFinalCategory()  : mixed|null
Get Final category from category ids

Constants

EXPORT_HEADER

public mixed EXPORT_HEADER = ['id' => 'ID', 'img' => 'Photo', 'sku' => 'SKU', 'name' => 'Nom', 'cat' => 'Catégorie', 'qty' => 'Qté', 'price' => 'Prix']

sameColors

public mixed sameColors = ["Argenté" => 23, "Beige/Marron" => 291, "Beu Foncé" => 25, "Multicouleur" => 254, "Dark" => 24, "Marron clair" => 59, "Fuchsia" => 590]

Properties

$eanProductService

AppBundle\Services\EanProductService

protected mixed $eanProductService

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$productService

AppBundle\Services\ProductService

protected mixed $productService

$allCategories

private array<string|int, mixed> $allCategories = []

Methods

__construct()

QueueService constructor.

public __construct(ContainerInterface $container, EntityManagerInterface $entityManager, BigbuyApi $bigbuyApi, CategoryService $categoryService, AttributeService $attributeService, QueueServiceInterface $queueService, ProductLabelMatchDictionaryService $productLabelMatchDictionaryService, ShippingRateService $bigbuyShippingRateService, EventDispatcherInterface $eventDispatcher, EanProductService $eanProductService) : mixed
Parameters
$container : ContainerInterface
$entityManager : EntityManagerInterface
$bigbuyApi : BigbuyApi
$categoryService : CategoryService
$attributeService : AttributeService
$queueService : QueueServiceInterface
$productLabelMatchDictionaryService : ProductLabelMatchDictionaryService
$bigbuyShippingRateService : ShippingRateService
$eventDispatcher : EventDispatcherInterface
$eanProductService : EanProductService

checkBigBuyDirectory()

check if directory exist

public checkBigBuyDirectory() : mixed

checkBigBuyHasPackaging()

public checkBigBuyHasPackaging(mixed $id, mixed $stock) : void
Parameters
$id : mixed
$stock : mixed

dicionnaryChangeLabelForString()

public dicionnaryChangeLabelForString(mixed $string) : mixed
Parameters
$string : mixed

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

generateBodyForShippingRateBigBuyApi()

public generateBodyForShippingRateBigBuyApi(mixed $codeCountry, mixed $sku, mixed $qty) : array<string|int, array<string|int, mixed>>
Parameters
$codeCountry : mixed
$sku : mixed
$qty : mixed
Return values
array<string|int, array<string|int, mixed>>

generateNewEanForProduct()

public generateNewEanForProduct(mixed $sku) : string
Parameters
$sku : mixed
Tags
throws
DBALException
Return values
string

getBigBuyMappingData()

public getBigBuyMappingData(array<string|int, mixed> $products, mixed $bigBuyProduct[, array<string|int, mixed> $color = [] ][, array<string|int, mixed> $format = [] ], mixed $pack) : array<string|int, mixed>
Parameters
$products : array<string|int, mixed>
$bigBuyProduct : mixed
$color : array<string|int, mixed> = []
$format : array<string|int, mixed> = []
$pack : mixed
Tags
throws
NonUniqueResultException
throws
DBALException
throws
DBALException
Return values
array<string|int, mixed>

getCategoriesFiles()

get Categoriesfiles

public getCategoriesFiles() : mixed

getCategoryProductFullData()

public getCategoryProductFullData(mixed $categoryId, mixed $product, mixed $images) : false|string
Parameters
$categoryId : mixed
$product : mixed
$images : mixed
Return values
false|string

getCategoryProductInfoByLang()

public getCategoryProductInfoByLang(mixed $categoryId, mixed $productId, mixed $lang) : false|string
Parameters
$categoryId : mixed
$productId : mixed
$lang : mixed
Return values
false|string

getFormattedAttributes()

Get Formatted Attributes

public getFormattedAttributes() : mixed

getMinimumCarerShippingRate()

public getMinimumCarerShippingRate(mixed $data) : array<string|int, mixed>|false
Parameters
$data : mixed
Return values
array<string|int, mixed>|false

getOptionsForAttributePack()

public getOptionsForAttributePack() : array<string|int, mixed>
Return values
array<string|int, mixed>

importBigBuyRelatedCategoryProductsCsv()

public importBigBuyRelatedCategoryProductsCsv(mixed $categoryId) : mixed
Parameters
$categoryId : mixed
Tags
throws
Exception

importProducts()

Import Products

public importProducts([string $style = 'csv' ][, mixed $onlyCreatedProducts = false ]) : void
Parameters
$style : string = 'csv'
$onlyCreatedProducts : mixed = false
Tags
throws
DBALException
throws
InvalidArgumentException

importProductsCsv()

public importProductsCsv([bool $onlyCreatedProducts = false ]) : void
Parameters
$onlyCreatedProducts : bool = false
Tags
throws
DBALException
throws
OptimisticLockException

importProductsDoctrine()

public importProductsDoctrine() : void

importProductsSql()

public importProductsSql() : void
Tags
throws
DBALException
throws
InvalidArgumentException

initSelection()

public initSelection(mixed $session) : array<string|int, mixed>
Parameters
$session : mixed
Return values
array<string|int, mixed>

connect()

Connecting by sftp

private connect() : SFTP
Return values
SFTP

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

        
On this page

Search results