UpdateAndCorrectComposedProductPricesCommand
extends ContainerAwareCommand
in package
uses
LockableTrait
Table of Contents
Properties
- $dbConnection : Connection
- $em : EntityManager
- $limit : int
- $output : OutputInterface
- $priceService : PriceService
- $user : mixed
Methods
- __construct() : mixed
- configure() : mixed
- execute() : mixed
- calculateComposedProductPrice() : mixed
- calculateComposedProductSpecialPrice() : mixed
- getAllComposedProducts() : array<string|int, mixed>
- Récupère tous les produits composés de la base de données
- getComponentPrices() : mixed
- getUniqueParentSku() : mixed
- processComposedProduct() : mixed
- updateProductPrice() : mixed
- writeDataToCsv() : mixed
- Écrit les données dans un fichier CSV
Properties
$dbConnection
protected
Connection
$dbConnection
$em
protected
EntityManager
$em
$limit
protected
int
$limit
= 500
$output
protected
OutputInterface
$output
$priceService
protected
PriceService
$priceService
$user
protected
mixed
$user
Methods
__construct()
public
__construct() : mixed
configure()
protected
configure() : mixed
execute()
protected
execute(InputInterface $input, OutputInterface $output) : mixed
Parameters
- $input : InputInterface
- $output : OutputInterface
calculateComposedProductPrice()
private
calculateComposedProductPrice(array<string|int, mixed> $parentProductPrices[, array<string|int, mixed> $childProductData = [] ]) : mixed
Parameters
- $parentProductPrices : array<string|int, mixed>
- $childProductData : array<string|int, mixed> = []
calculateComposedProductSpecialPrice()
private
calculateComposedProductSpecialPrice(array<string|int, mixed> $parentProductPrices[, array<string|int, mixed> $childProductData = [] ]) : mixed
Parameters
- $parentProductPrices : array<string|int, mixed>
- $childProductData : array<string|int, mixed> = []
getAllComposedProducts()
Récupère tous les produits composés de la base de données
private
getAllComposedProducts() : array<string|int, mixed>
Return values
array<string|int, mixed>getComponentPrices()
private
getComponentPrices(string $sku[, int $storeId = 3 ]) : mixed
Parameters
- $sku : string
- $storeId : int = 3
getUniqueParentSku()
private
getUniqueParentSku(mixed $productComposition) : mixed
Parameters
- $productComposition : mixed
processComposedProduct()
private
processComposedProduct(mixed $childProductData, mixed $parentSku, mixed $storeId) : mixed
Parameters
- $childProductData : mixed
- $parentSku : mixed
- $storeId : mixed
updateProductPrice()
private
updateProductPrice(mixed $childProductData[, mixed $productNewPrice = null ][, mixed $productNewSpecialPriceData = null ][, mixed $promo = null ][, mixed $storeId = 3 ]) : mixed
Parameters
- $childProductData : mixed
- $productNewPrice : mixed = null
- $productNewSpecialPriceData : mixed = null
- $promo : mixed = null
- $storeId : mixed = 3
writeDataToCsv()
Écrit les données dans un fichier CSV
private
writeDataToCsv(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
Les données à écrire