Logidav Docs

ShoppingFeedService extends SaleService

Class ShoppingFeedService

Table of Contents

Constants

LAST_MAGENTO_ID_CONFIG_CODE  = 'LAST_MAGENTO_ID'
TNT_MAX_NB_PARCELS  = 3
TNT_MAX_PACKAGE_WEIGHT  = 30
TNT_MAX_WEIGHT  = 90
TRACKING_LENGTH  = 13

Properties

$alfyApi  : AlfyApi
$container  : ContainerInterface
$em  : EntityManager
$eventDispatcher  : EventDispatcher
$logService  : LogService
$mosaikasaService  : mixed
$productService  : mixed
$refreshCode  : string
$saleEntity  : Sale
$salePrestoService  : mixed
$saleProductService  : SaleProductService
$saleRepository  : SaleRepository
$smsService  : mixed
$source  : string
$status  : array<string|int, mixed>
$account  : mixed
$alreadySent  : array<string|int, mixed>
$cancellationSentToShoppingFeed  : array<string|int, mixed>
$header  : mixed
$params  : array<string|int, mixed>
$shippingService  : ShippingService|object|null
$trackingCodeService  : TrackingCodeService

Methods

__construct()  : mixed
ShoppingFeedService constructor.
acceptShoppingFeedOrder()  : bool|string
Accepting order from marketplace
acceptShoppingFeedOrders()  : bool|string
Accepting order from marketplace
acknowledgeShoppingFeedOrder()  : bool|string
Acknowledging order from marketplace
acknowledgeShoppingFeedOrders()  : bool|string
Acknowledging orders from marketplace
addAlfyDeliveryDate()  : false|string
addLogIfHasConsolidatedProduct()  : mixed
addOrder()  : Sale|bool
Save a Sale
addOrderItem()  : SaleProduct
Adding order items
addRepository()  : void
Add a repository to this service
addService()  : void
Add a service to this service
afterSaleCanceled()  : mixed
Sale Canceled
buildCsvDataFromTntData()  : mixed
calculateSaleProductRealShippingMethod()  : void
Calculates the real shipping method for the given SaleProduct.
calculateSaleProductShippingAmount()  : mixed
calculateSaleProductsShippment()  : bool
Calculating sale products shippment
calendarByTransporter()  : mixed
canCallOnSaleConfirmedWebhook()  : mixed
Check whether webhook call is active or not
canCallWebhook()  : mixed
Check whether webhook call is active or not
canCancelSale()  : bool
Can cancel sale
canCancelSaleProduct()  : bool
Can cancel sale product
cancelPreRefund()  : mixed
cancel preRefund
cancelSaleOrSaleProduct()  : string
Canceling sale or sale product
canImportSales()  : mixed
Check whether sales import is active or not
canReactiveSaleProduct()  : bool
Can cancel sale product
checkSaleAndSetComplete()  : bool
Checking sale and set complete if all saleProducts has been shipped
checkTrackingNumberUniqueness()  : bool
Check tracking number uniqness
construct()  : mixed
SaleService constructor.
createCalbersonPreExpeditionForSale()  : array<string|int, mixed>
createChronopostPreExpeditionForSale()  : array<string|int, mixed>
createGlsPreExpeditionForSale()  : array<string|int, mixed>
createInvoiceAfterShipmentCsv()  : false|string
create invoice after shipment csv
createManualExpedition()  : array<string|int, mixed>|array<string|int, string>|void
Creating manual expedition for sale
createOrderShipment()  : mixed
Create Order Shipment
createOrderShipmentMagento()  : bool
This function is used for retrait
createRetraitExpedition()  : bool
Create retrait expedition
createRetraitExpeditionMagento()  : string
Creating retrait expedition for sale
createSalePresto()  : mixed
Add sale presto datas
createSdenPreExpeditionForSale()  : array<string|int, mixed>
createShipmentCsv()  : false|string
Create shipment csv in magento
createTntExpedition()  : array<string|int, mixed>
Creating tnt expedition
createTrackingUrl()  : mixed
execute()  : bool|string
existenceValidationRequest()  : array<string|int, mixed>
export()  : StreamedResponse
Exporting sales
exportSalesXls()  : mixed
Exporting as Xls
find()  : mixed
findAll()  : mixed
findBy()  : mixed
findById()  : mixed
findByNot()  : mixed
Search by not
findOneByIncrementId()  : mixed
findSalesUpdated()  : array<string|int, mixed>|int|string
findSpecificSales()  : mixed
generateChronopostTicketForSaleProduct()  : void
Generate sale product ticket
generateGeodisExpeditionTickets()  : array<string|int, array<string|int, mixed>>
Generate Geodis expedition ticket
generateGeodisExpeditionTicketsForParts()  : array<string|int, array<string|int, mixed>>
Generate Geodis expedition ticket
generateGeodisExpeditionTicketsTest()  : array<string|int, array<string|int, mixed>>
Generate Geodis expedition ticket
generateSaleDataMapping()  : array<string|int, mixed>
Map V2 data to logidav
generateShoppingFeedOrderMapping()  : mixed
generateUniqTrackingId()  : string
Generate a unique tracking number
generateUniqueSaleTrackingId()  : string
Generate unique sale tracking id
getAllSources()  : array<string|int, mixed>
getAvailableShippingBySale()  : array<string|int, mixed>
Get available shipping methods by Sale
getBillingEmail()  : string|null
Get billing email for sale
getCarrierLinks()  : array<string|int, mixed>
Get carrier track links
getCarrierList()  : array<string|int, mixed>|mixed|string
getCartCheckOrder()  : mixed
getChronopostOrdersForPrint()  : mixed
getCountAmazonShippingNotPrinted()  : mixed
getCountEspagneShippingNotPrinted()  : mixed
getCountShippingNotPrinted()  : mixed
getCountStoreNotPrinted()  : int|mixed|string
getCustomerEmail()  : mixed
Get billing email for sale
getCustomerFullName()  : mixed
Getting Customer first name
getCustomerSales()  : mixed
getEntityManager()  : EntityManager
Getter of the Entity Manager
getFormattedSaleTrackings()  : array<string|int, mixed>
getIncrementIdFromTrack()  : mixed
getItemIdsFromTrack()  : mixed
getLastId()  : mixed
getLastMagentoId()  : mixed
getMarketplaceCreatedAt()  : DateTime
Get marketplace date
getNumberOfSav()  : mixed
getOldRetrait()  : mixed
getOrderInfo()  : array<string|int, mixed>
Get sale info
getOrders()  : mixed|null
Get orders from Shopping Feed
getOrdersByRange()  : mixed
getPartnerName()  : mixed
getPaylinePaymentStats()  : mixed
Get Payline Stats PayPal|CB|FCB3X|PRESTO
getPaymentStat()  : mixed
Getting payment stats
getRepo()  : SaleRepository|SaleRepository
Get Repository
getReservedChronopostSales()  : string
Return sales in csv file
getSaleByTrackingId()  : mixed
getSaleByUser()  : mixed
getSaleInfo()  : array<string|int, mixed>
Get sale info
getSaleInvoice()  : bool
Get order invoice
getSalePaymentMethod()  : mixed
Get Sale payment Method
getSaleRepository()  : mixed
Get Sale Repository
getSaleSavCountByStatus()  : mixed
getSaleShippingAddress()  : array<string|int, mixed>
getSalesNumberByDateAndSource()  : mixed
getSaleSource()  : bool|string
Get Sale source
getSaleTracking()  : string
Get Sale tracking
getSaleTrackingCodes()  : array<string|int, mixed>
getSaleTrackings()  : array<string|int, mixed>
getSaleTrackLink()  : string
Get Sale track link
getSaleTrackLinkV2()  : string
Get Sale track link
getSellsyTransporter()  : mixed
Get Sellsy transporter
getShipmentCreatedAt()  : mixed
getShippingAmountForSellsy()  : float
Get Shipping amount
getShippingMethodFromV1()  : mixed
Get Shipping method from v1 data v1 to v2
getShippingMethodFromV2Data()  : mixed
Mapping V2 shipping data to v1 data
getShippingTelephone()  : mixed
Get Shipping telephone for sale
getShoppingFeedSale()  : mixed
getShoppingFeedStoreId()  : mixed
getSource()  : mixed
getStatusMapping()  : mixed|string
Get status mapping
getTrackingUrlForShoppingFeed()  : string
Get tracking url for Lengow
handleRdv()  : void
importSalesByCriteria()  : mixed
isAllowedToCancelTuskOrder()  : false
isOkToSendRetraitEmail()  : bool
notifyCustomerForDelivery()  : array<string|int, mixed>
onAfterSaleCreated()  : mixed
This method is triggered after a sale is created.
onAfterSaleUpdated()  : mixed
This method is triggered after a sale is updated.
onSaleProductsShipped()  : mixed
When sale products are shipped
processSaleForFrontApp()  : void
Process a sale transaction.
reactiveSaleProduct()  : string
Reactive sale or sale product
regenerateSaleTrackLinks()  : void
salesByDate()  : mixed
save()  : Sale
Save a Sale
saveFromApi()  : Sale|bool
Save a Sale
search()  : mixed
search a Sales
searchFull()  : array<string|int, mixed>
searchIdfPlanning()  : mixed
Search idf planning
searchIdfPlanningPdf()  : array<string|int, mixed>|Query|int|string
search a Sales
searchIdfTransporter()  : mixed
Search idf transporter
searchOrdersUpdated()  : mixed
searchProcessingInStockNotPrinted()  : mixed
Search processing in stock not printed sales
searchProcessingNotPrinted()  : mixed
Search processing not printed
searchProcessingNotPrintedNoStock()  : mixed
Search processing not printed
searchProcessingOldRetrait()  : mixed
searchProcessingRetraitNew()  : mixed
Search processing retrait new
searchProcessingRetraitNotPrinted()  : mixed
Search processing retrait not printed sales
searchRecapCommandesMarketplaces()  : mixed
Search processing not printed
searchSaleDropInvoiced()  : mixed
search a Sales
searchSaleDropPending()  : mixed
searchSaleSendExpedition()  : mixed
Search sent expedition sales
searchSalesForPrintInvoices()  : array<string|int, mixed>|int|string
Search for sales to print
searchShippedChronopost()  : mixed
Get SaleProduct
searchUpStairsPlanning()  : mixed
Get UpStairs planing
searchUpStairsTransporter()  : mixed
Search a Sales
sendRetraitEmail()  : bool|void
sendSmsCodeCoupon()  : string
sendSparePartToChronopost()  : array<string|int, mixed>
Sends a spare part shipment request to Chronopost
sendToChronopost()  : array<string|int, mixed>
Send sale to chronopost
sendToTrusk()  : mixed
setEntityManager()  : mixed
Setter of the Entity Manager
setIsIdf()  : mixed
Set Product as idf
setIsUpStairs()  : mixed
Set is UpStairs
setLastMagentoId()  : int
setRealShippingMethod()  : string
Set real shipping method by method and postalCode
setRealShippingMethodForShoppingFeed()  : string
Setting real shipping method for Shopping Feed from postalCode
setSaleEntity()  : mixed
Set sale entity
setSaleProductAsShippedChronopost()  : array<string|int, mixed>|bool|mixed
Setting sale product as shipped
setSaleProductAsShippedGeodis()  : mixed
Setting sale product as shipped
setSaleProductsAsShipped()  : mixed
Setting sale product as shipped
setShoppingFeedStoreId()  : mixed
showInvoiceInformationsEditButton()  : bool
Show invoice edit button
showPreRefundBlock()  : mixed
Show pre refund block in sale show
showSaleProductsEditButton()  : mixed
showSaleProductsSelect()  : mixed
showSaleStatusEditButton()  : bool
Show sale status edit button
showShippingAddressFullname()  : mixed
showShippingInformationEditButton()  : bool
Show invoice edit button
showShippingMethodEditButton()  : bool
Show shipping method edit button in sale view
sumShipping()  : mixed
Sum shipping
switchToComplete()  : string
Switch sale to complete state
switchToProcessing()  : string
Switch sale to processing
trackingId()  : string
Generating tracking id
trackingIdByS()  : bool
Check is old tracking
updateContactOnFrontApp()  : mixed
updateInternalStockAndWriteAsirLog()  : void
updateSaleAddress()  : string
Update sale address from sale sheet
updateSaleProductAvailabilityDate()  : mixed
07-12-2021 : Add type (DDISP) for Salelog by Habib ben aissa
_evaluateWeightItemFromProduct()  : float|int
_evaluateWeightItemLineFromProduct()  : mixed
cancelMagentoSale()  : mixed
Simulating magento response
cancelSale()  : string
Canceling a sale
cancelSaleProduct()  : string
Canceling sale product
createNewSale()  : Sale
Creating new order
createSaleShipment()  : mixed
Creating sale shipment
getChronopostTrackingNumberForSpareParts()  : mixed
Save Chronopost shipping infos
getCustomerAvailabilityDate()  : false|string
getCustomerAvailabilityForSaleProduct()  : string
Getting product options
getCustomerFirstNameForSale()  : mixed
Getting customer First name for sale creation
getCustomerIdForSale()  : mixed
Getting customer id for sale creation
getCustomerLastNameForSale()  : mixed
Getting customer last Name for sale creation
getOrderItemReference()  : string
getProductOptionsForSale()  : mixed
Getting product options
getShippingMethodForSale()  : mixed
Getting Shipping for sale creation
saveChronopostShippingInfo()  : mixed
Save Chronopost shipping infos
setActionToOrder()  : mixed|null
Set action to ShoppingFeed order
setIsInvoicedSellsy()  : mixed
Getting is invoiced Sellsy sale creation
updateOrderItem()  : SaleProduct
Update order item
addSingleHandleToContact()  : mixed
cancelShoppingFeedSale()  : bool|string
createContactInFrontApp()  : void
Creates a contact in the FrontApp system.
exportCsv()  : mixed
Exporting as csv
exportXls()  : mixed
Exporting as Xls
getFrontAppContactByContactId()  : array<string|int, mixed>|null
Retrieves the front app contact details by contact ID.
getParam()  : bool
Get params
getShippingInfoFromV2Data()  : array<string|int, mixed>
Get Shipping method for v2 data
getShoppingFeedCarrier()  : string
Get Shopping feed carrier
refuseShoppingFeedSale()  : bool|string
shipShoppingFeedSale()  : bool|string
Ship a sale
updateCustomFields()  : mixed

Constants

LAST_MAGENTO_ID_CONFIG_CODE

public mixed LAST_MAGENTO_ID_CONFIG_CODE = 'LAST_MAGENTO_ID'

TNT_MAX_NB_PARCELS

public mixed TNT_MAX_NB_PARCELS = 3

TNT_MAX_PACKAGE_WEIGHT

public mixed TNT_MAX_PACKAGE_WEIGHT = 30

Properties

$eventDispatcher

protected EventDispatcher $eventDispatcher

$mosaikasaService

protected mixed $mosaikasaService

$salePrestoService

protected mixed $salePrestoService

$status

protected array<string|int, mixed> $status = ['shipped' => 'complete', 'waiting_shipment' => 'processing', 'created' => 'processing']

$cancellationSentToShoppingFeed

private array<string|int, mixed> $cancellationSentToShoppingFeed = array()

$header

private mixed $header = ['id' => 'ID', 'incrementId' => 'Incr.ID', 'status' => 'Status', 'customer' => 'Client', 'sku' => 'SKU', 'Date' => 'Date', 'NOM' => 'NOM', 'Prenom' => 'Prenom', 'Mail' => 'Mail', 'Sub total' => 'Sub total', 'Remise' => 'Remise', 'Code remise' => 'Code remise', 'Frais de port' => 'Frais de port', 'Grand total hors taxe' => 'Grand total hors taxe', 'IAV' => 'IAV', 'Grand total avec taxe' => 'Grand total avec taxe', 'shippingMethod' => 'Livraison', 'realShippingMethod' => 'Livraison réel', 'grandTotal' => 'Total', 'createdAt' => 'Date', 'isPrinted' => 'Imprimer', 'source' => 'Source', 'qty' => 'QTY', 'available' => 'Dispo. Réelle', 'customerAvailable' => 'Dispo. Client', 'diffDates' => 'Diff. des dates', 'createdAtDate' => 'Date', 'createdAtTime' => 'Heure', 'notif' => 'Notif', 'track' => 'TRACKING', 'tnt_label' => 'Etiquette', 'magentoNum' => 'Numéro d\'expédition', 'scannedAt' => 'Date scan', 'menzzo' => 'MENZZO#', 'cmd' => 'Commande N°', 'date' => 'Date', 'billing_email' => 'Email de Facturation', 'dispo' => ' Dispo', 'expedition' => 'Suivre l\'expédition', 'sellsy' => 'ID sellsy', 'sellsyInvoicedAt' => 'Date sellsy facturé', 'user' => 'Utilisateur', 'message' => 'Message', 'created_at' => 'Date', 'phone' => 'Tel', 'address' => 'Adresse', 'postcode' => 'Code Postal', 'dateidf' => ' Date IDF', 'reason' => 'Etat', 'fixedDate' => 'Date RDV', 'idfCalledAtTime' => 'De', 'idfCalledToTime' => 'A', 'transporter' => 'Transporteur', 'username' => 'Transporteur', 'shippedAt' => 'Date']

Methods

__construct()

ShoppingFeedService constructor.

public __construct(mixed $params) : mixed
Parameters
$params : mixed

acceptShoppingFeedOrder()

Accepting order from marketplace

public acceptShoppingFeedOrder(mixed $reference, mixed $channelName) : bool|string
Parameters
$reference : mixed
$channelName : mixed
Tags
throws
Exception
Return values
bool|string

acceptShoppingFeedOrders()

Accepting order from marketplace

public acceptShoppingFeedOrders(mixed $data) : bool|string
Parameters
$data : mixed
Tags
throws
Exception
Return values
bool|string

acknowledgeShoppingFeedOrder()

Acknowledging order from marketplace

public acknowledgeShoppingFeedOrder(mixed $orderId, mixed $reference, mixed $channelName) : bool|string
Parameters
$orderId : mixed
$reference : mixed
$channelName : mixed
Tags
throws
Exception
Return values
bool|string

acknowledgeShoppingFeedOrders()

Acknowledging orders from marketplace

public acknowledgeShoppingFeedOrders(mixed $data) : bool|string
Parameters
$data : mixed
Tags
throws
Exception
Return values
bool|string

addAlfyDeliveryDate()

public addAlfyDeliveryDate(Sale $sale, SaleProduct $saleProduct[, mixed $userId = null ]) : false|string
Parameters
$sale : Sale
$saleProduct : SaleProduct
$userId : mixed = null
Return values
false|string

addLogIfHasConsolidatedProduct()

public addLogIfHasConsolidatedProduct(mixed $sale) : mixed
Parameters
$sale : mixed

addOrder()

Save a Sale

public addOrder(mixed $data[, bool $isV2Data = false ]) : Sale|bool
Parameters
$data : mixed
$isV2Data : bool = false
Tags
throws
Exception
Return values
Sale|bool

addOrderItem()

Adding order items

public addOrderItem(mixed $item, mixed $sale, mixed $countItems[, mixed $k = null ]) : SaleProduct
Parameters
$item : mixed
$sale : mixed
$countItems : mixed
$k : mixed = null
Tags
throws
Exception
Return values
SaleProduct

addRepository()

Add a repository to this service

public addRepository(int $key, string $class) : void
Parameters
$key : int

Key

$class : string

Class

addService()

Add a service to this service

public addService(int $key, mixed $service) : void
Parameters
$key : int

Key

$service : mixed

buildCsvDataFromTntData()

public buildCsvDataFromTntData(mixed $tntData) : mixed
Parameters
$tntData : mixed

calculateSaleProductRealShippingMethod()

Calculates the real shipping method for the given SaleProduct.

public calculateSaleProductRealShippingMethod(SaleProduct &$sp) : void

This method determines the appropriate shipping method based on various conditions such as the sale's source, shipping address country, postal code, product characteristics, and more. It modifies the SaleProduct object directly to set the real shipping method based on the criteria defined within the method.

Parameters
$sp : SaleProduct

The SaleProduct object for which the real shipping method is calculated.

Tags
throws
Exception

If an error occurs while retrieving shipping information or processing logic.

calculateSaleProductsShippment()

Calculating sale products shippment

public calculateSaleProductsShippment(Sale $sale) : bool

You should not use this function again and this function will be remove in the next version The problem was TNT shipping problem

Parameters
$sale : Sale
Return values
bool

calendarByTransporter()

public calendarByTransporter(mixed $data) : mixed
Parameters
$data : mixed

canCallOnSaleConfirmedWebhook()

Check whether webhook call is active or not

public canCallOnSaleConfirmedWebhook() : mixed
Tags
throws
Exception

canCallWebhook()

Check whether webhook call is active or not

public canCallWebhook() : mixed
Tags
throws
Exception

canCancelSale()

Can cancel sale

public canCancelSale(mixed $saleId) : bool
Parameters
$saleId : mixed
Tags
throws
Exception
Return values
bool

canCancelSaleProduct()

Can cancel sale product

public canCancelSaleProduct(SaleProduct|int $saleProductId) : bool
Parameters
$saleProductId : SaleProduct|int
Tags
throws
Exception
Return values
bool

cancelPreRefund()

cancel preRefund

public cancelPreRefund(mixed $sale) : mixed
Parameters
$sale : mixed

cancelSaleOrSaleProduct()

Canceling sale or sale product

public cancelSaleOrSaleProduct(mixed $saleId, mixed $action, mixed $idSp[, mixed $forcedWhileExpeditionIsInProgress = false ][, mixed $createSaleSavAndPreRefund = true ][, mixed $user = null ]) : string
Parameters
$saleId : mixed
$action : mixed
$idSp : mixed
$forcedWhileExpeditionIsInProgress : mixed = false
$createSaleSavAndPreRefund : mixed = true
$user : mixed = null
Tags
throws
OptimisticLockException
throws
Exception
Return values
string

canImportSales()

Check whether sales import is active or not

public canImportSales() : mixed
Tags
throws
Exception

canReactiveSaleProduct()

Can cancel sale product

public canReactiveSaleProduct(SaleProduct|int $saleProductId) : bool
Parameters
$saleProductId : SaleProduct|int
Tags
throws
Exception
Return values
bool

checkSaleAndSetComplete()

Checking sale and set complete if all saleProducts has been shipped

public checkSaleAndSetComplete(mixed $sale[, null $userId = null ][, mixed $logChanges = false ]) : bool
Parameters
$sale : mixed
$userId : null = null
$logChanges : mixed = false
Tags
throws
GuzzleException
Return values
bool

checkTrackingNumberUniqueness()

Check tracking number uniqness

public checkTrackingNumberUniqueness(mixed $trackingNumber) : bool
Parameters
$trackingNumber : mixed
Return values
bool

createCalbersonPreExpeditionForSale()

public createCalbersonPreExpeditionForSale(mixed $orderId, mixed $orderItemId, mixed $token, mixed $warehouseId) : array<string|int, mixed>
Parameters
$orderId : mixed
$orderItemId : mixed
$token : mixed
$warehouseId : mixed
Tags
throws
Exception
Return values
array<string|int, mixed>

createChronopostPreExpeditionForSale()

public createChronopostPreExpeditionForSale(mixed $orderId, mixed $orderItemId, mixed $token) : array<string|int, mixed>
Parameters
$orderId : mixed
$orderItemId : mixed
$token : mixed
Tags
throws
Exception
Return values
array<string|int, mixed>

createGlsPreExpeditionForSale()

public createGlsPreExpeditionForSale(mixed $orderId, mixed $orderItemId, mixed $token) : array<string|int, mixed>
Parameters
$orderId : mixed
$orderItemId : mixed
$token : mixed
Tags
throws
Exception
Return values
array<string|int, mixed>

createInvoiceAfterShipmentCsv()

create invoice after shipment csv

public createInvoiceAfterShipmentCsv(mixed $isFullItemsToShip, mixed $isFullItemsShipped) : false|string
Parameters
$isFullItemsToShip : mixed
$isFullItemsShipped : mixed
Return values
false|string

createManualExpedition()

Creating manual expedition for sale

public createManualExpedition(mixed $saleId, mixed $items, mixed $carrier, mixed $trackNumber) : array<string|int, mixed>|array<string|int, string>|void
Parameters
$saleId : mixed
$items : mixed
$carrier : mixed
$trackNumber : mixed
Tags
throws
Exception
Return values
array<string|int, mixed>|array<string|int, string>|void

createOrderShipment()

Create Order Shipment

public createOrderShipment(mixed $itemsQty) : mixed
Parameters
$itemsQty : mixed

createOrderShipmentMagento()

This function is used for retrait

public createOrderShipmentMagento(mixed $sale, mixed $itemsToShip, mixed $sendMail) : bool
Parameters
$sale : mixed
$itemsToShip : mixed
$sendMail : mixed
Tags
throws
GuzzleException
todo

remove this function and create new one to work with retrait only

Return values
bool

createRetraitExpedition()

Create retrait expedition

public createRetraitExpedition(mixed $order, mixed $itemsToShip[, int $trackingLength = 13 ]) : bool
Parameters
$order : mixed
$itemsToShip : mixed
$trackingLength : int = 13
Tags
throws
SoapFault
todo

check and remove this function

Return values
bool

createRetraitExpeditionMagento()

Creating retrait expedition for sale

public createRetraitExpeditionMagento(mixed $sale, mixed $isFullItemsShipped[, mixed $userId = null ]) : string
Parameters
$sale : mixed
$isFullItemsShipped : mixed
$userId : mixed = null
Tags
throws
GuzzleException
todo

refactor this function

Return values
string

createSalePresto()

Add sale presto datas

public createSalePresto(mixed $sale, mixed $data) : mixed
Parameters
$sale : mixed
$data : mixed

createSdenPreExpeditionForSale()

public createSdenPreExpeditionForSale(mixed $orderId, mixed $orderItemId, mixed $token) : array<string|int, mixed>
Parameters
$orderId : mixed
$orderItemId : mixed
$token : mixed
Tags
throws
Exception
Return values
array<string|int, mixed>

createShipmentCsv()

Create shipment csv in magento

public createShipmentCsv(mixed $_incrementId, mixed $partner, mixed $trackingTitle, mixed $_trackingNumber, mixed $itemsToShip, mixed $isFullItemsShipped[, mixed $notify = true ]) : false|string
Parameters
$_incrementId : mixed
$partner : mixed
$trackingTitle : mixed
$_trackingNumber : mixed
$itemsToShip : mixed
$isFullItemsShipped : mixed
$notify : mixed = true
Tags
throws
Exception
Return values
false|string

createTntExpedition()

Creating tnt expedition

public createTntExpedition(mixed $sale, mixed $orderItemIds) : array<string|int, mixed>

remove this function later

Parameters
$sale : mixed
$orderItemIds : mixed
Return values
array<string|int, mixed>

createTrackingUrl()

public createTrackingUrl(mixed $partner[, mixed $trackingNumber = '' ]) : mixed
Parameters
$partner : mixed
$trackingNumber : mixed = ''

execute()

public execute(mixed $api[, string $requestType = 'GET' ][, null $body = null ][, bool $asArray = true ]) : bool|string
Parameters
$api : mixed
$requestType : string = 'GET'
$body : null = null
$asArray : bool = true
Tags
throws
Exception
Return values
bool|string

existenceValidationRequest()

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

export()

Exporting sales

public export(mixed $title, mixed $data, mixed $columns, mixed $format[, array<string|int, mixed> $customHeader = [] ][, mixed $isAsirRecap = false ]) : StreamedResponse
Parameters
$title : mixed
$data : mixed
$columns : mixed
$format : mixed
$customHeader : array<string|int, mixed> = []
$isAsirRecap : mixed = false
Tags
throws
PHPExcel_Exception
Return values
StreamedResponse

exportSalesXls()

Exporting as Xls

public exportSalesXls(mixed $data, mixed $columns, mixed $title[, bool $toFile = false ]) : mixed
Parameters
$data : mixed
$columns : mixed
$title : mixed
$toFile : bool = false

find()

public find(mixed $id) : mixed
Parameters
$id : mixed

findBy()

public findBy([mixed $params = [] ]) : mixed
Parameters
$params : mixed = []

findById()

public findById(mixed $ids) : mixed
Parameters
$ids : mixed

findByNot()

Search by not

public findByNot([array<string|int, mixed> $params = [] ]) : mixed
Parameters
$params : array<string|int, mixed> = []

findOneByIncrementId()

public findOneByIncrementId(mixed $incrementId) : mixed
Parameters
$incrementId : mixed

findSalesUpdated()

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

findSpecificSales()

public findSpecificSales() : mixed

generateChronopostTicketForSaleProduct()

Generate sale product ticket

public generateChronopostTicketForSaleProduct(SaleProduct $saleProduct) : void
Parameters
$saleProduct : SaleProduct
Tags
throws
DBALException

generateGeodisExpeditionTickets()

Generate Geodis expedition ticket

public generateGeodisExpeditionTickets(Sale $sale, array<string|int, mixed> $saleProductIds[, mixed $isValidated = true ][, mixed $fromDateTime = null ][, mixed $warehouseId = 1 ]) : array<string|int, array<string|int, mixed>>
Parameters
$sale : Sale
$saleProductIds : array<string|int, mixed>
$isValidated : mixed = true
$fromDateTime : mixed = null
$warehouseId : mixed = 1
Tags
throws
ORMException
throws
OptimisticLockException
Return values
array<string|int, array<string|int, mixed>>

generateGeodisExpeditionTicketsForParts()

Generate Geodis expedition ticket

public generateGeodisExpeditionTicketsForParts(Sale $sale, mixed $saleProduct, mixed $listUmgs) : array<string|int, array<string|int, mixed>>
Parameters
$sale : Sale
$saleProduct : mixed
$listUmgs : mixed
Tags
throws
ORMException
throws
OptimisticLockException
Return values
array<string|int, array<string|int, mixed>>

generateGeodisExpeditionTicketsTest()

Generate Geodis expedition ticket

public generateGeodisExpeditionTicketsTest(Sale $sale, array<string|int, mixed> $saleProductIds[, mixed $isValidated = true ][, mixed $fromDateTime = null ], mixed $weight, mixed $volume) : array<string|int, array<string|int, mixed>>
Parameters
$sale : Sale
$saleProductIds : array<string|int, mixed>
$isValidated : mixed = true
$fromDateTime : mixed = null
$weight : mixed
$volume : mixed
Tags
throws
ORMException
throws
OptimisticLockException
Return values
array<string|int, array<string|int, mixed>>

generateSaleDataMapping()

Map V2 data to logidav

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

generateShoppingFeedOrderMapping()

public generateShoppingFeedOrderMapping(mixed $order) : mixed
Parameters
$order : mixed

generateUniqTrackingId()

Generate a unique tracking number

public generateUniqTrackingId([int $length = 15 ]) : string
Parameters
$length : int = 15
Return values
string

generateUniqueSaleTrackingId()

Generate unique sale tracking id

public generateUniqueSaleTrackingId([mixed $prefix = 'MZ' ]) : string
Parameters
$prefix : mixed = 'MZ'
Return values
string

getAllSources()

public getAllSources() : array<string|int, mixed>
Tags
throws
DBALException
Return values
array<string|int, mixed>

getAvailableShippingBySale()

Get available shipping methods by Sale

public getAvailableShippingBySale(mixed $sale[, array<string|int, mixed> $address = [] ]) : array<string|int, mixed>
Parameters
$sale : mixed
$address : array<string|int, mixed> = []
Tags
todo

fix $address parameter

Return values
array<string|int, mixed>

getBillingEmail()

Get billing email for sale

public getBillingEmail([Sale|null $sale = null ]) : string|null
Parameters
$sale : Sale|null = null
Return values
string|null

Get carrier track links

public getCarrierLinks(mixed $carrier, mixed $trackings[, mixed $skipApiRequests = false ]) : array<string|int, mixed>
Parameters
$carrier : mixed
$trackings : mixed
$skipApiRequests : mixed = false
Return values
array<string|int, mixed>

getCarrierList()

public static getCarrierList([null $method = null ]) : array<string|int, mixed>|mixed|string
Parameters
$method : null = null
Return values
array<string|int, mixed>|mixed|string

getCartCheckOrder()

public getCartCheckOrder(mixed $cart) : mixed
Parameters
$cart : mixed

getChronopostOrdersForPrint()

public getChronopostOrdersForPrint(mixed $ids) : mixed
Parameters
$ids : mixed

getCountAmazonShippingNotPrinted()

public getCountAmazonShippingNotPrinted(mixed $shippingMethode) : mixed
Parameters
$shippingMethode : mixed

getCountEspagneShippingNotPrinted()

public getCountEspagneShippingNotPrinted() : mixed

getCountShippingNotPrinted()

public getCountShippingNotPrinted(mixed $realShippingMethod) : mixed
Parameters
$realShippingMethod : mixed

getCountStoreNotPrinted()

public getCountStoreNotPrinted(mixed $storeId) : int|mixed|string
Parameters
$storeId : mixed
Return values
int|mixed|string

getCustomerEmail()

Get billing email for sale

public getCustomerEmail() : mixed

getCustomerFullName()

Getting Customer first name

public getCustomerFullName(mixed $sale) : mixed
Parameters
$sale : mixed

getCustomerSales()

public getCustomerSales(mixed $customerEmail, mixed $customerFirstName, mixed $customerLastName) : mixed
Parameters
$customerEmail : mixed
$customerFirstName : mixed
$customerLastName : mixed

getEntityManager()

Getter of the Entity Manager

public getEntityManager() : EntityManager
Return values
EntityManager

getFormattedSaleTrackings()

public getFormattedSaleTrackings([Sale|null $sale = null ][, bool $onlyShipped = false ][, bool $withSpId = false ][, mixed $skipApiRequests = false ]) : array<string|int, mixed>
Parameters
$sale : Sale|null = null
$onlyShipped : bool = false
$withSpId : bool = false
$skipApiRequests : mixed = false
Return values
array<string|int, mixed>

getIncrementIdFromTrack()

public getIncrementIdFromTrack(mixed $string[, mixed $trackingLength = 13 ]) : mixed
Parameters
$string : mixed
$trackingLength : mixed = 13

getItemIdsFromTrack()

public getItemIdsFromTrack(mixed $string[, mixed $trackingLength = 13 ]) : mixed
Parameters
$string : mixed
$trackingLength : mixed = 13

getLastId()

public getLastId([mixed $source = 'Menzzo' ]) : mixed
Parameters
$source : mixed = 'Menzzo'

getLastMagentoId()

public getLastMagentoId() : mixed
Tags
@return

|null

getMarketplaceCreatedAt()

Get marketplace date

public getMarketplaceCreatedAt([null $sale = null ]) : DateTime
Parameters
$sale : null = null
Tags
throws
Exception
Return values
DateTime

getOrderInfo()

Get sale info

public getOrderInfo([mixed $sale = null ]) : array<string|int, mixed>
Parameters
$sale : mixed = null
Return values
array<string|int, mixed>

getOrders()

Get orders from Shopping Feed

public getOrders([null $nextEndpoint = null ]) : mixed|null
Parameters
$nextEndpoint : null = null
Tags
throws
Exception
Return values
mixed|null

getOrdersByRange()

public getOrdersByRange(mixed $start, mixed $end) : mixed
Parameters
$start : mixed
$end : mixed
Tags
throws
Exception

getPartnerName()

public getPartnerName(mixed $filename) : mixed
Parameters
$filename : mixed

getPaylinePaymentStats()

Get Payline Stats PayPal|CB|FCB3X|PRESTO

public getPaylinePaymentStats(mixed $start, mixed $end) : mixed
Parameters
$start : mixed
$end : mixed

getPaymentStat()

Getting payment stats

public getPaymentStat(mixed $start, mixed $end) : mixed
Parameters
$start : mixed
$end : mixed

getReservedChronopostSales()

Return sales in csv file

public getReservedChronopostSales(mixed $token) : string
Parameters
$token : mixed
Return values
string

getSaleByTrackingId()

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

getSaleByUser()

public getSaleByUser(mixed $mail, mixed $name, mixed $date[, mixed $serchInInfo = false ]) : mixed
Parameters
$mail : mixed
$name : mixed
$date : mixed
$serchInInfo : mixed = false

getSaleInfo()

Get sale info

public getSaleInfo([mixed $sale = null ]) : array<string|int, mixed>
Parameters
$sale : mixed = null
Return values
array<string|int, mixed>

getSaleInvoice()

Get order invoice

public getSaleInvoice([mixed $sale = null ]) : bool
Parameters
$sale : mixed = null
Tags
@return
Return values
bool

getSalePaymentMethod()

Get Sale payment Method

public getSalePaymentMethod() : mixed

getSaleRepository()

Get Sale Repository

public getSaleRepository() : mixed

use getRepo() instead

getSaleSavCountByStatus()

public getSaleSavCountByStatus(mixed $sale, mixed $saleSavIdToSkip) : mixed
Parameters
$sale : mixed
$saleSavIdToSkip : mixed

getSaleShippingAddress()

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

getSalesNumberByDateAndSource()

public getSalesNumberByDateAndSource(mixed $source, mixed $date[, null $time = null ]) : mixed
Parameters
$source : mixed
$date : mixed
$time : null = null
Tags
throws
DBALException

getSaleSource()

Get Sale source

public getSaleSource([null $sale = null ]) : bool|string
Parameters
$sale : null = null
Tags
throws
Exception
Return values
bool|string

getSaleTracking()

Get Sale tracking

public getSaleTracking([Sale $sale = null ]) : string
Parameters
$sale : Sale = null
Return values
string

getSaleTrackingCodes()

public getSaleTrackingCodes([Sale|null $sale = null ][, bool $onlyShipped = false ]) : array<string|int, mixed>
Parameters
$sale : Sale|null = null
$onlyShipped : bool = false
Return values
array<string|int, mixed>

getSaleTrackings()

public getSaleTrackings([Sale|null $sale = null ][, bool $onlyShipped = false ][, mixed $skipApiRequests = false ]) : array<string|int, mixed>
Parameters
$sale : Sale|null = null
$onlyShipped : bool = false
$skipApiRequests : mixed = false
Return values
array<string|int, mixed>

Get Sale track link

public getSaleTrackLink([Sale $sale = null ]) : string
Parameters
$sale : Sale = null
Return values
string

getSaleTrackLinkV2()

Get Sale track link

public getSaleTrackLinkV2([Sale $sale = null ]) : string
Parameters
$sale : Sale = null
Return values
string

getSellsyTransporter()

Get Sellsy transporter

public getSellsyTransporter() : mixed

getShipmentCreatedAt()

public getShipmentCreatedAt() : mixed

getShippingAmountForSellsy()

Get Shipping amount

public getShippingAmountForSellsy() : float
Return values
float

getShippingMethodFromV1()

Get Shipping method from v1 data v1 to v2

public getShippingMethodFromV1(mixed $method) : mixed
Parameters
$method : mixed

getShippingMethodFromV2Data()

Mapping V2 shipping data to v1 data

public getShippingMethodFromV2Data([mixed $method = null ][, bool $getAll = false ]) : mixed
Parameters
$method : mixed = null
$getAll : bool = false

getShippingTelephone()

Get Shipping telephone for sale

public getShippingTelephone() : mixed

getShoppingFeedSale()

public getShoppingFeedSale(mixed $sale) : mixed
Parameters
$sale : mixed

getStatusMapping()

Get status mapping

public getStatusMapping(mixed $status) : mixed|string
Parameters
$status : mixed
Return values
mixed|string

getTrackingUrlForShoppingFeed()

Get tracking url for Lengow

public getTrackingUrlForShoppingFeed() : string
Tags
throws
Exception
Return values
string

importSalesByCriteria()

public importSalesByCriteria(mixed $searchCriteria) : mixed
Parameters
$searchCriteria : mixed

isAllowedToCancelTuskOrder()

public isAllowedToCancelTuskOrder(mixed $sale) : false
Parameters
$sale : mixed
Return values
false

isOkToSendRetraitEmail()

public isOkToSendRetraitEmail(Sale $sale[, bool $checkSentEmail = false ]) : bool
Parameters
$sale : Sale
$checkSentEmail : bool = false
Tags
throws
Exception
Return values
bool

notifyCustomerForDelivery()

public notifyCustomerForDelivery(Sale $sale, mixed $message, mixed $action, mixed $user) : array<string|int, mixed>
Parameters
$sale : Sale
$message : mixed
$action : mixed
$user : mixed
Return values
array<string|int, mixed>

processSaleForFrontApp()

Process a sale transaction.

public processSaleForFrontApp(Sale $sale) : void

This method handles the processing of a sale transaction based on the provided Sale entity.

Parameters
$sale : Sale

The sale entity to be processed

Tags
throws
Exception

If the sale processing fails

reactiveSaleProduct()

Reactive sale or sale product

public reactiveSaleProduct(mixed $saleProductId[, mixed $forcedWhileRemboursement = false ][, mixed $user = null ]) : string
Parameters
$saleProductId : mixed
$forcedWhileRemboursement : mixed = false
$user : mixed = null
Tags
throws
OptimisticLockException
throws
Exception
Return values
string
public regenerateSaleTrackLinks([Sale|null $sale = null ]) : void
Parameters
$sale : Sale|null = null

salesByDate()

public salesByDate(mixed $date) : mixed
Parameters
$date : mixed

saveFromApi()

Save a Sale

public saveFromApi(mixed $datas) : Sale|bool

by Amine and will be removed in next version

Parameters
$datas : mixed
Tags
throws
Exception
Return values
Sale|bool

search a Sales

public search(mixed $data[, int $page = 0 ][, null $max = null ][, bool $getResult = true ]) : mixed
Parameters
$data : mixed
$page : int = 0
$max : null = null
$getResult : bool = true
Tags
@return

searchFull()

public searchFull([array<string|int, mixed> $params = [] ]) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed> = []
Return values
array<string|int, mixed>

searchIdfPlanning()

Search idf planning

public searchIdfPlanning(mixed $data[, int $page = 0 ][, null $max = null ][, bool $getResult = true ]) : mixed
Parameters
$data : mixed
$page : int = 0
$max : null = null
$getResult : bool = true
Tags
@return

searchIdfPlanningPdf()

search a Sales

public searchIdfPlanningPdf(mixed $data[, mixed $getResult = true ]) : array<string|int, mixed>|Query|int|string
Parameters
$data : mixed
$getResult : mixed = true
Return values
array<string|int, mixed>|Query|int|string

searchIdfTransporter()

Search idf transporter

public searchIdfTransporter(mixed $data[, mixed $page = 0 ][, mixed $max = null ][, mixed $getResult = true ]) : mixed
Parameters
$data : mixed
$page : mixed = 0
$max : mixed = null
$getResult : mixed = true
Tags
@return

searchOrdersUpdated()

public searchOrdersUpdated(mixed $data[, mixed $page = 0 ][, mixed $max = null ][, mixed $getResult = true ]) : mixed
Parameters
$data : mixed
$page : mixed = 0
$max : mixed = null
$getResult : mixed = true

searchProcessingInStockNotPrinted()

Search processing in stock not printed sales

public searchProcessingInStockNotPrinted(mixed $data[, mixed $page = 0 ][, mixed $max = null ][, mixed $getResult = true ]) : mixed
Parameters
$data : mixed
$page : mixed = 0
$max : mixed = null
$getResult : mixed = true
Tags
@return

searchProcessingNotPrinted()

Search processing not printed

public searchProcessingNotPrinted(mixed $data[, int $page = 0 ][, null $max = null ][, bool $getResult = true ]) : mixed
Parameters
$data : mixed
$page : int = 0
$max : null = null
$getResult : bool = true
Tags
@return

searchProcessingNotPrintedNoStock()

Search processing not printed

public searchProcessingNotPrintedNoStock(mixed $data[, int $page = 0 ][, null $max = null ][, bool $getResult = true ]) : mixed
Parameters
$data : mixed
$page : int = 0
$max : null = null
$getResult : bool = true
Tags
@return

searchProcessingOldRetrait()

public searchProcessingOldRetrait(mixed $data[, mixed $page = 0 ][, mixed $max = null ][, mixed $getResult = true ]) : mixed
Parameters
$data : mixed
$page : mixed = 0
$max : mixed = null
$getResult : mixed = true

searchProcessingRetraitNew()

Search processing retrait new

public searchProcessingRetraitNew(mixed $data[, mixed $page = 0 ][, mixed $max = null ][, mixed $getResult = true ]) : mixed
Parameters
$data : mixed
$page : mixed = 0
$max : mixed = null
$getResult : mixed = true
Tags
@return

searchProcessingRetraitNotPrinted()

Search processing retrait not printed sales

public searchProcessingRetraitNotPrinted(mixed $data[, int $page = 0 ][, null $max = null ][, bool $getResult = true ]) : mixed
Parameters
$data : mixed
$page : int = 0
$max : null = null
$getResult : bool = true
Tags
@return

searchRecapCommandesMarketplaces()

Search processing not printed

public searchRecapCommandesMarketplaces(mixed $data[, int $page = 0 ][, null $max = null ][, bool $getResult = true ]) : mixed
Parameters
$data : mixed
$page : int = 0
$max : null = null
$getResult : bool = true
Tags
@return

searchSaleDropInvoiced()

search a Sales

public searchSaleDropInvoiced(mixed $data[, mixed $page = 0 ][, mixed $max = null ][, mixed $getResult = true ]) : mixed
Parameters
$data : mixed
$page : mixed = 0
$max : mixed = null
$getResult : mixed = true
Tags
@return

searchSaleDropPending()

public searchSaleDropPending(mixed $data[, mixed $page = 0 ][, mixed $max = null ][, mixed $getResult = true ]) : mixed
Parameters
$data : mixed
$page : mixed = 0
$max : mixed = null
$getResult : mixed = true

searchSaleSendExpedition()

Search sent expedition sales

public searchSaleSendExpedition(mixed $data[, int $page = 0 ][, null $max = null ][, bool $getResult = true ]) : mixed
Parameters
$data : mixed
$page : int = 0
$max : null = null
$getResult : bool = true
Tags
@return

searchSalesForPrintInvoices()

Search for sales to print

public searchSalesForPrintInvoices([array<string|int, mixed> $filters = [] ]) : array<string|int, mixed>|int|string

you should not use this function

Parameters
$filters : array<string|int, mixed> = []
Return values
array<string|int, mixed>|int|string

searchShippedChronopost()

Get SaleProduct

public searchShippedChronopost(mixed $data[, mixed $page = 0 ][, mixed $max = null ][, mixed $getResult = true ]) : mixed
Parameters
$data : mixed
$page : mixed = 0
$max : mixed = null
$getResult : mixed = true
Tags
@return

searchUpStairsPlanning()

Get UpStairs planing

public searchUpStairsPlanning(mixed $data[, mixed $page = 0 ][, mixed $max = null ][, mixed $getResult = true ]) : mixed
Parameters
$data : mixed
$page : mixed = 0
$max : mixed = null
$getResult : mixed = true

searchUpStairsTransporter()

Search a Sales

public searchUpStairsTransporter(mixed $data[, int $page = 0 ][, null $max = null ][, bool $getResult = true ]) : mixed
Parameters
$data : mixed
$page : int = 0
$max : null = null
$getResult : bool = true

sendRetraitEmail()

public sendRetraitEmail(Sale $finalSale[, null $userId = null ]) : bool|void
Parameters
$finalSale : Sale
$userId : null = null
Return values
bool|void

sendSmsCodeCoupon()

public sendSmsCodeCoupon(mixed $sale, mixed $ruleId, mixed $message[, null $userId = null ]) : string
Parameters
$sale : mixed
$ruleId : mixed
$message : mixed
$userId : null = null
Return values
string

sendSparePartToChronopost()

Sends a spare part shipment request to Chronopost

public sendSparePartToChronopost(mixed $order, mixed $saleProduct, mixed $partNumber, mixed $qty, mixed $dimensions) : array<string|int, mixed>
Parameters
$order : mixed
$saleProduct : mixed
$partNumber : mixed
$qty : mixed
$dimensions : mixed
Return values
array<string|int, mixed>

sendToChronopost()

Send sale to chronopost

public sendToChronopost(mixed $orderId, mixed $orderItemIds[, null $userId = null ]) : array<string|int, mixed>
Parameters
$orderId : mixed
$orderItemIds : mixed

//array of SaleProductIds

$userId : null = null
Return values
array<string|int, mixed>

sendToTrusk()

public sendToTrusk(Sale $sale) : mixed

USE TruskService

Parameters
$sale : Sale

setEntityManager()

Setter of the Entity Manager

public setEntityManager(EntityManager $em) : mixed
Parameters
$em : EntityManager

the Entity Manager

setIsIdf()

Set Product as idf

public setIsIdf(mixed $saleProduct) : mixed
Parameters
$saleProduct : mixed
Tags
@return
throws
Exception

setIsUpStairs()

Set is UpStairs

public setIsUpStairs(mixed $saleProduct) : mixed
Parameters
$saleProduct : mixed
Tags
throws
Exception

setLastMagentoId()

public setLastMagentoId(int $lastSaleId) : int
Parameters
$lastSaleId : int
Tags
throws
OptimisticLockException
Return values
int

setRealShippingMethod()

Set real shipping method by method and postalCode

public setRealShippingMethod(Sale &$sale, mixed $shipping[, mixed $shippingMethod = '' ]) : string
Parameters
$sale : Sale
$shipping : mixed
$shippingMethod : mixed = ''
Return values
string

setRealShippingMethodForShoppingFeed()

Setting real shipping method for Shopping Feed from postalCode

public setRealShippingMethodForShoppingFeed(Sale &$sale, mixed $shipping[, string $shippingMethod = '' ]) : string
Parameters
$sale : Sale
$shipping : mixed
$shippingMethod : string = ''
Return values
string

setSaleProductAsShippedChronopost()

Setting sale product as shipped

public setSaleProductAsShippedChronopost(mixed $sale, mixed $saleProduct, mixed $user[, mixed $notify = true ]) : array<string|int, mixed>|bool|mixed
Parameters
$sale : mixed
$saleProduct : mixed
$user : mixed
$notify : mixed = true
Tags
throws
Exception
Return values
array<string|int, mixed>|bool|mixed

setSaleProductAsShippedGeodis()

Setting sale product as shipped

public setSaleProductAsShippedGeodis(Sale $sale, SaleProduct $saleProduct, User $user[, bool $notify = true ]) : mixed

check setSaleProductsAsShipped

Parameters
$sale : Sale
$saleProduct : SaleProduct
$user : User
$notify : bool = true
Tags
throws
GuzzleException
see
setSaleProductsAsShipped

setSaleProductsAsShipped()

Setting sale product as shipped

public setSaleProductsAsShipped(Sale $sale, SaleProduct $saleProduct, User $user, mixed $carrier[, bool $notify = true ]) : mixed
Parameters
$sale : Sale
$saleProduct : SaleProduct
$user : User
$carrier : mixed
$notify : bool = true
Tags
throws
GuzzleException

setShoppingFeedStoreId()

public setShoppingFeedStoreId(mixed $account) : mixed
Parameters
$account : mixed

showInvoiceInformationsEditButton()

Show invoice edit button

public showInvoiceInformationsEditButton() : bool
Return values
bool

showPreRefundBlock()

Show pre refund block in sale show

public showPreRefundBlock() : mixed

showSaleProductsEditButton()

public showSaleProductsEditButton(mixed $saleProduct) : mixed
Parameters
$saleProduct : mixed

showSaleProductsSelect()

public showSaleProductsSelect(mixed $saleProduct) : mixed
Parameters
$saleProduct : mixed

showSaleStatusEditButton()

Show sale status edit button

public showSaleStatusEditButton() : bool
Return values
bool

showShippingAddressFullname()

public showShippingAddressFullname() : mixed

showShippingInformationEditButton()

Show invoice edit button

public showShippingInformationEditButton() : bool
Return values
bool

showShippingMethodEditButton()

Show shipping method edit button in sale view

public showShippingMethodEditButton() : bool
Return values
bool

sumShipping()

Sum shipping

public sumShipping(mixed $from, mixed $to) : mixed
Parameters
$from : mixed
$to : mixed

switchToComplete()

Switch sale to complete state

public switchToComplete(Sale $sale[, string $comment = '' ][, null $userId = null ][, bool $logChanges = false ]) : string
Parameters
$sale : Sale
$comment : string = ''
$userId : null = null
$logChanges : bool = false
Tags
todo

change function return type from string to boolean

Return values
string

switchToProcessing()

Switch sale to processing

public switchToProcessing(mixed $sale[, string $comment = '' ][, bool $logChanges = false ][, bool $cancelPreRefund = true ][, null $saleProduct = null ]) : string
Parameters
$sale : mixed
$comment : string = ''
$logChanges : bool = false
$cancelPreRefund : bool = true
$saleProduct : null = null
Return values
string

trackingId()

Generating tracking id

public trackingId([int $length = 15 ]) : string
Parameters
$length : int = 15
Tags
todo

refactor this function

Return values
string

trackingIdByS()

Check is old tracking

public trackingIdByS(mixed $string) : bool
Parameters
$string : mixed
Return values
bool

updateContactOnFrontApp()

public updateContactOnFrontApp(Sale $sale) : mixed
Parameters
$sale : Sale

updateInternalStockAndWriteAsirLog()

public updateInternalStockAndWriteAsirLog(SaleProduct $saleProduct, User $user[, mixed $operation = '+' ]) : void
Parameters
$saleProduct : SaleProduct
$user : User
$operation : mixed = '+'

updateSaleAddress()

Update sale address from sale sheet

public updateSaleAddress(mixed $sale, mixed $datas, mixed $type[, mixed $userId = null ]) : string
Parameters
$sale : mixed
$datas : mixed
$type : mixed
$userId : mixed = null
Tags
throws
Exception
Return values
string

updateSaleProductAvailabilityDate()

07-12-2021 : Add type (DDISP) for Salelog by Habib ben aissa

public updateSaleProductAvailabilityDate(mixed $saleProduct, mixed $date[, mixed $user = null ]) : mixed
Parameters
$saleProduct : mixed
$date : mixed
$user : mixed = null
Tags
throws
ORMException
throws
OptimisticLockException

_evaluateWeightItemFromProduct()

protected _evaluateWeightItemFromProduct(mixed $item, mixed $itemProduct) : float|int
Parameters
$item : mixed
$itemProduct : mixed
Tags
deprectaed

this function will be remove din next versions

Return values
float|int

_evaluateWeightItemLineFromProduct()

protected _evaluateWeightItemLineFromProduct(mixed $item, mixed $itemProduct) : mixed
Parameters
$item : mixed
$itemProduct : mixed

cancelMagentoSale()

Simulating magento response

protected cancelMagentoSale(mixed $sale) : mixed
Parameters
$sale : mixed

cancelSale()

Canceling a sale

protected cancelSale(Sale $sale, mixed $idSp, mixed $user[, bool $forcedWhileExpeditionIsInProgress = false ][, bool $createSaleSavAndPreRefund = true ]) : string
Parameters
$sale : Sale
$idSp : mixed
$user : mixed
$forcedWhileExpeditionIsInProgress : bool = false
$createSaleSavAndPreRefund : bool = true
Return values
string

cancelSaleProduct()

Canceling sale product

protected cancelSaleProduct(Sale $sale, mixed $idSp, mixed $user[, bool $forcedWhileExpeditionIsInProgress = false ]) : string
Parameters
$sale : Sale
$idSp : mixed
$user : mixed
$forcedWhileExpeditionIsInProgress : bool = false
Tags
throws
OptimisticLockException
throws
Exception
Return values
string

createNewSale()

Creating new order

protected createNewSale(mixed $data) : Sale
Parameters
$data : mixed
Tags
throws
Exception
Return values
Sale

createSaleShipment()

Creating sale shipment

protected createSaleShipment(mixed $sale, mixed $itemsQty, mixed $trackings, mixed $carrier) : mixed
Parameters
$sale : mixed
$itemsQty : mixed
$trackings : mixed
$carrier : mixed
Tags
throws
Exception

getChronopostTrackingNumberForSpareParts()

Save Chronopost shipping infos

protected getChronopostTrackingNumberForSpareParts(mixed $chronopostApiResponse) : mixed
Parameters
$chronopostApiResponse : mixed

getCustomerAvailabilityDate()

protected getCustomerAvailabilityDate(mixed $sale, mixed $item, mixed $product) : false|string
Parameters
$sale : mixed
$item : mixed
$product : mixed
Return values
false|string

getCustomerAvailabilityForSaleProduct()

Getting product options

protected getCustomerAvailabilityForSaleProduct(mixed $item, mixed $product) : string
Parameters
$item : mixed
$product : mixed
Return values
string

getCustomerFirstNameForSale()

Getting customer First name for sale creation

protected getCustomerFirstNameForSale(mixed $data) : mixed
Parameters
$data : mixed
Tags
@return

getCustomerIdForSale()

Getting customer id for sale creation

protected getCustomerIdForSale(mixed $data) : mixed
Parameters
$data : mixed
Tags
@return

getCustomerLastNameForSale()

Getting customer last Name for sale creation

protected getCustomerLastNameForSale(mixed $data) : mixed
Parameters
$data : mixed
Tags
@return

getOrderItemReference()

protected getOrderItemReference(mixed $sale, mixed $countItems, mixed $k) : string
Parameters
$sale : mixed
$countItems : mixed
$k : mixed
Return values
string

getProductOptionsForSale()

Getting product options

protected getProductOptionsForSale(mixed $item) : mixed
Parameters
$item : mixed
Tags
@return

getShippingMethodForSale()

Getting Shipping for sale creation

protected getShippingMethodForSale(mixed $data) : mixed
Parameters
$data : mixed
Tags
@return

saveChronopostShippingInfo()

Save Chronopost shipping infos

protected saveChronopostShippingInfo(mixed $sale, SaleProduct $saleProduct, mixed $expedition, mixed &$trackingNumbers, mixed $internalTrackingCode[, null $userId = null ]) : mixed
Parameters
$sale : mixed
$saleProduct : SaleProduct
$expedition : mixed
$trackingNumbers : mixed
$internalTrackingCode : mixed
$userId : null = null

setActionToOrder()

Set action to ShoppingFeed order

protected setActionToOrder(Sale $sale, mixed $actionType[, null $conditional = null ]) : mixed|null
Parameters
$sale : Sale
$actionType : mixed
$conditional : null = null
Tags
throws
Exception
Return values
mixed|null

setIsInvoicedSellsy()

Getting is invoiced Sellsy sale creation

protected setIsInvoicedSellsy(mixed $data) : mixed
Parameters
$data : mixed
Tags
@return

updateOrderItem()

Update order item

protected updateOrderItem(array<string|int, mixed>|mixed $item, SaleProduct $saleProduct) : SaleProduct
Parameters
$item : array<string|int, mixed>|mixed
$saleProduct : SaleProduct
Tags
throws
OptimisticLockException
throws
ORMException
Return values
SaleProduct

addSingleHandleToContact()

private addSingleHandleToContact(mixed $contactId, mixed $handleValue, mixed $source) : mixed
Parameters
$contactId : mixed
$handleValue : mixed
$source : mixed

cancelShoppingFeedSale()

private cancelShoppingFeedSale(mixed $body) : bool|string
Parameters
$body : mixed
Tags
throws
Exception
Return values
bool|string

createContactInFrontApp()

Creates a contact in the FrontApp system.

private createContactInFrontApp(string $email) : void
Parameters
$email : string

The email address of the contact.

exportCsv()

Exporting as csv

private exportCsv(mixed $data, mixed $columns, mixed $title, mixed $isAsirRecap) : mixed
Parameters
$data : mixed
$columns : mixed
$title : mixed
$isAsirRecap : mixed

exportXls()

Exporting as Xls

private exportXls(mixed $data, mixed $columns, mixed $title) : mixed
Parameters
$data : mixed
$columns : mixed
$title : mixed
Tags
throws
PHPExcel_Exception

getFrontAppContactByContactId()

Retrieves the front app contact details by contact ID.

private getFrontAppContactByContactId(int $contactId) : array<string|int, mixed>|null
Parameters
$contactId : int

The ID of the contact to retrieve.

Return values
array<string|int, mixed>|null

The contact details if found, or null if not found.

getParam()

Get params

private getParam([bool $key = false ]) : bool
Parameters
$key : bool = false
Tags
throws
Exception
Return values
bool

getShippingInfoFromV2Data()

Get Shipping method for v2 data

private getShippingInfoFromV2Data(mixed $orderData) : array<string|int, mixed>
Parameters
$orderData : mixed
Return values
array<string|int, mixed>

getShoppingFeedCarrier()

Get Shopping feed carrier

private getShoppingFeedCarrier([Sale|null $sale = null ]) : string
Parameters
$sale : Sale|null = null
Return values
string

refuseShoppingFeedSale()

private refuseShoppingFeedSale(mixed $body) : bool|string
Parameters
$body : mixed
Tags
throws
Exception
Return values
bool|string

shipShoppingFeedSale()

Ship a sale

private shipShoppingFeedSale(array<string|int, mixed> $body) : bool|string
Parameters
$body : array<string|int, mixed>
Tags
throws
Exception
Return values
bool|string

updateCustomFields()

private updateCustomFields(mixed $contactId, mixed $ordersFormatted) : mixed
Parameters
$contactId : mixed
$ordersFormatted : mixed

        
On this page

Search results