Logidav Docs

ImportSalesFromMosaikasaCommand extends ContainerAwareCommand
in package

Table of Contents

Properties

$mosaikasaService  : MosaikasaService

Methods

__construct()  : mixed
configure()  : void
execute()  : void
Import the last updated sales from Shopify website within 1 hour
addMosaikasaOrder()  : mixed
extractShopifyId()  : string
Extrait l'ID numérique d'un identifiant Shopify
getCouponCodeIfApplicated()  : mixed
getProductInfoIfItExists()  : mixed
isProductCorrectPrice()  : bool|null
Vérifie si le prix du produit est correct et enregistre les différences dans un CSV
logPriceDiscrepancy()  : mixed
Enregistre les différences de prix dans un fichier CSV
prepareOrderToBeAdded()  : array<string|int, mixed>
processMosaikasaOrderItems()  : mixed
reformatDataAndAddSales()  : mixed

Properties

Methods

execute()

Import the last updated sales from Shopify website within 1 hour

protected execute(InputInterface $input, OutputInterface $output) : void
Parameters
$input : InputInterface
$output : OutputInterface

addMosaikasaOrder()

private addMosaikasaOrder(mixed $mosaikasaOrderReadyToAdd[, mixed $output = null ]) : mixed
Parameters
$mosaikasaOrderReadyToAdd : mixed
$output : mixed = null

extractShopifyId()

Extrait l'ID numérique d'un identifiant Shopify

private extractShopifyId(string $shopifyId) : string
Parameters
$shopifyId : string

Format: "gid://shopify/Order/5464272797769"

Return values
string

L'ID numérique extrait

getCouponCodeIfApplicated()

private getCouponCodeIfApplicated(mixed $mosaikasaOrderData) : mixed
Parameters
$mosaikasaOrderData : mixed

isProductCorrectPrice()

Vérifie si le prix du produit est correct et enregistre les différences dans un CSV

private isProductCorrectPrice(object $productInfos, float $price) : bool|null
Parameters
$productInfos : object

Informations sur le produit

$price : float

Prix à vérifier

Return values
bool|null

Retourne null si le prix est correct, sinon false

logPriceDiscrepancy()

Enregistre les différences de prix dans un fichier CSV

private logPriceDiscrepancy(string $sku, float $regularPrice, float|null $specialPrice, string|null $specialPriceTo, float $actualPrice, string $reason) : mixed
Parameters
$sku : string

SKU du produit

$regularPrice : float

Prix régulier du produit

$specialPrice : float|null

Prix spécial du produit

$specialPriceTo : string|null

Date d'expiration du prix spécial

$actualPrice : float

Prix passé en paramètre

$reason : string

Raison de la différence

prepareOrderToBeAdded()

private prepareOrderToBeAdded(mixed $mosaikasaOrderItemsData, mixed $mosaikasaOrderData, mixed $mosaikasaOrderStatus, mixed $mosaikasaOrderId) : array<string|int, mixed>
Parameters
$mosaikasaOrderItemsData : mixed
$mosaikasaOrderData : mixed
$mosaikasaOrderStatus : mixed
$mosaikasaOrderId : mixed
Return values
array<string|int, mixed>

processMosaikasaOrderItems()

private processMosaikasaOrderItems(mixed $mosaikasaNewOrder, mixed $mosaikasaOrderId, mixed $mosaikasaFulfillmentOrders[, mixed $output = null ]) : mixed
Parameters
$mosaikasaNewOrder : mixed
$mosaikasaOrderId : mixed
$mosaikasaFulfillmentOrders : mixed
$output : mixed = null

reformatDataAndAddSales()

private reformatDataAndAddSales(mixed $mosaikasaNewOrders[, mixed $output = null ]) : mixed
Parameters
$mosaikasaNewOrders : mixed
$output : mixed = null

        
On this page

Search results