WayfairService
extends SaleService
in package
Class WayfairService
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
- WAYFAIR_BASE_PATH = '/home/axelites-wayfair'
- WAYFAIR_CSV_DELIMITER = '|'
- WAYFAIR_INVOICES_PATH = '/invoices'
- WAYFAIR_ORDERS_PATH = '/sales'
- WAYFAIR_SHIPMENT_PATH = '/shipments'
- WAYFAIR_SYNC_INVENTORY_STOCK_PATH = '/inventory'
Properties
- $alfyApi : AlfyApi
- $container : ContainerInterface
- $em : EntityManager
- $eventDispatcher : EventDispatcher
- $logService : LogService
- $mosaikasaService : mixed
- $productService : mixed
- $saleEntity : Sale
- $salePrestoService : mixed
- $saleProductService : SaleProductService
- $saleRepository : SaleRepository
- $smsService : mixed
- $source : string
- $status : mixed
- $wayfairConfig : mixed
- $header : mixed
- $orders : array<string|int, mixed>
- $trackingCodeService : TrackingCodeService
Methods
- __construct() : mixed
- WayfairService constructor.
- 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
- checkWayfairDirectory() : bool
- check if directory exist
- construct() : mixed
- SaleService constructor.
- createCalbersonPreExpeditionForSale() : array<string|int, mixed>
- createChronopostPreExpeditionForSale() : array<string|int, mixed>
- createGlsPreExpeditionForSale() : array<string|int, mixed>
- createInvoiceAfterShipmentCsv() : bool
- create invoice after shipment csv
- createManualExpedition() : array<string|int, mixed>
- Creating manual expedition for sale
- createOrderShipment() : mixed
- Create Order Shipment
- createOrderShipmentMagento() : void
- 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
- 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
- generateAsnFileForSale() : bool
- Generate Asn for sale
- 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
- generateUniqTrackingId() : string
- Generate a unique tracking number
- generateUniqueSaleTrackingId() : string
- Generate unique sale tracking id
- generateWayfairExpeditionFileAndSend() : bool
- Generate Wayfair expedition file and send
- 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() : array<string|int, mixed>
- Get orders from wayfair
- 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() : mixed
- Get sale info
- getSaleInvoice() : bool
- Get order invoice
- getSalePaymentMethod() : mixed
- getSaleRepository() : mixed
- Get Sale Repository
- getSaleSavCountByStatus() : mixed
- getSaleShippingAddress() : array<string|int, mixed>
- getSalesNumberByDateAndSource() : mixed
- getSaleSource() : 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() : string
- 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
- getSource() : mixed
- 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
- setRealShippingMethodForWayfair() : string
- Setting real shipping method
- setSaleEntity() : mixed
- Setting 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
- 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
- syncInventoryStock() : bool
- Sync stock
- 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
- setIsInvoicedSellsy() : mixed
- Getting is invoiced Sellsy sale creation
- updateOrderItem() : SaleProduct
- Update order item
- addSingleHandleToContact() : mixed
- connect() : SFTP
- Connecting by sftp
- convertIhLinesToOrders() : array<string|int, mixed>
- Convert Ih and id lines to orders
- createContactInFrontApp() : void
- Creates a contact in the FrontApp system.
- exportCsv() : mixed
- Exporting as csv
- exportXls() : mixed
- Exporting as Xls
- getDataDir() : string
- Get Data dir for wayfair
- getFrontAppContactByContactId() : array<string|int, mixed>|null
- Retrieves the front app contact details by contact ID.
- getIdLinesForIh() : array<string|int, mixed>
- Get Id lines => products lines for ih
- getShippingInfoFromV2Data() : array<string|int, mixed>
- Get Shipping method for v2 data
- notifyDevelopmentTeam() : mixed
- Notifying Axelites team about new bug
- sendFile() : bool
- Send specific file to a location
- 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
TNT_MAX_WEIGHT
public
mixed
TNT_MAX_WEIGHT
= 90
TRACKING_LENGTH
public
mixed
TRACKING_LENGTH
= 13
WAYFAIR_BASE_PATH
public
string
WAYFAIR_BASE_PATH
= '/home/axelites-wayfair'
WAYFAIR_CSV_DELIMITER
public
string
WAYFAIR_CSV_DELIMITER
= '|'
WAYFAIR_INVOICES_PATH
public
string
WAYFAIR_INVOICES_PATH
= '/invoices'
WAYFAIR_ORDERS_PATH
public
string
WAYFAIR_ORDERS_PATH
= '/sales'
WAYFAIR_SHIPMENT_PATH
public
string
WAYFAIR_SHIPMENT_PATH
= '/shipments'
WAYFAIR_SYNC_INVENTORY_STOCK_PATH
public
string
WAYFAIR_SYNC_INVENTORY_STOCK_PATH
= '/inventory'
Properties
$alfyApi
protected
AlfyApi
$alfyApi
$container
protected
ContainerInterface
$container
$em
protected
EntityManager
$em
The Entity Manager
$eventDispatcher
protected
EventDispatcher
$eventDispatcher
$logService
protected
LogService
$logService
$mosaikasaService
protected
mixed
$mosaikasaService
$productService
protected
mixed
$productService
$saleEntity
protected
Sale
$saleEntity
$salePrestoService
protected
mixed
$salePrestoService
$saleProductService
protected
SaleProductService
$saleProductService
$saleRepository
protected
SaleRepository
$saleRepository
$smsService
protected
mixed
$smsService
$source
protected
string
$source
= 'Wayfair'
$status
protected
mixed
$status
= ['complete' => 'complete', 'pending_payment' => 'pending_payment', 'canceled' => 'canceled', 'holded' => 'holded', 'closed' => 'closed', 'payment_refused' => 'payment_refused', 'pending' => 'pending', 'paypal_reversed' => 'paypal_reversed', 'paypal_canceled_reversal' => 'paypal_canceled_reversal', 'payment_review' => 'payment_review', 'processing' => 'processing', 'fraud' => 'fraud', 'paid3x' => 'paid3x', 're_expedition' => 're_expedition']
$wayfairConfig
protected
mixed
$wayfairConfig
Tags
$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']
$orders
private
array<string|int, mixed>
$orders
= []
$trackingCodeService
private
TrackingCodeService
$trackingCodeService
Methods
__construct()
WayfairService constructor.
public
__construct(mixed $wayfairConfig) : mixed
Parameters
- $wayfairConfig : mixed
addAlfyDeliveryDate()
public
addAlfyDeliveryDate(Sale $sale, SaleProduct $saleProduct[, mixed $userId = null ]) : false|string
Parameters
- $sale : Sale
- $saleProduct : SaleProduct
- $userId : mixed = null
Return values
false|stringaddLogIfHasConsolidatedProduct()
public
addLogIfHasConsolidatedProduct(mixed $sale) : mixed
Parameters
- $sale : mixed
addOrder()
Save a Sale
public
addOrder(mixed $data[, mixed $isV2Data = false ]) : Sale|bool
Parameters
- $data : mixed
- $isV2Data : mixed = false
Tags
Return values
Sale|booladdOrderItem()
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
Return values
SaleProductaddRepository()
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
afterSaleCanceled()
Sale Canceled
public
afterSaleCanceled(AfterSaleCanceledEvent $event) : mixed
Parameters
- $event : AfterSaleCanceledEvent
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
calculateSaleProductShippingAmount()
public
calculateSaleProductShippingAmount(CalculateSaleProductShippingAmountEvent $event) : mixed
Parameters
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
boolcalendarByTransporter()
public
calendarByTransporter(mixed $data) : mixed
Parameters
- $data : mixed
canCallOnSaleConfirmedWebhook()
Check whether webhook call is active or not
public
canCallOnSaleConfirmedWebhook() : mixed
Tags
canCallWebhook()
Check whether webhook call is active or not
public
canCallWebhook() : mixed
Tags
canCancelSale()
Can cancel sale
public
canCancelSale(mixed $saleId) : bool
Parameters
- $saleId : mixed
Tags
Return values
boolcanCancelSaleProduct()
Can cancel sale product
public
canCancelSaleProduct(SaleProduct|int $saleProductId) : bool
Parameters
- $saleProductId : SaleProduct|int
Tags
Return values
boolcancelPreRefund()
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
Return values
stringcanImportSales()
Check whether sales import is active or not
public
canImportSales() : mixed
Tags
canReactiveSaleProduct()
Can cancel sale product
public
canReactiveSaleProduct(SaleProduct|int $saleProductId) : bool
Parameters
- $saleProductId : SaleProduct|int
Tags
Return values
boolcheckSaleAndSetComplete()
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
Return values
boolcheckTrackingNumberUniqueness()
Check tracking number uniqness
public
checkTrackingNumberUniqueness(mixed $trackingNumber) : bool
Parameters
- $trackingNumber : mixed
Return values
boolcheckWayfairDirectory()
check if directory exist
public
checkWayfairDirectory() : bool
Return values
boolconstruct()
SaleService constructor.
public
construct(EventDispatcherInterface $eventDispatcher, LogServiceInterface $logService, AlfyApiInterface $alfyApi, TrackingCodeService $trackingCodeService, MosaikasaService $mosaikasaService) : mixed
to be changed in the future
Parameters
- $eventDispatcher : EventDispatcherInterface
- $logService : LogServiceInterface
- $alfyApi : AlfyApiInterface
- $trackingCodeService : TrackingCodeService
- $mosaikasaService : MosaikasaService
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
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
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
Return values
array<string|int, mixed>createInvoiceAfterShipmentCsv()
create invoice after shipment csv
public
createInvoiceAfterShipmentCsv(mixed $isFullItemsToShip, mixed $isFullItemsShipped) : bool
Parameters
- $isFullItemsToShip : mixed
- $isFullItemsShipped : mixed
Tags
Return values
boolcreateManualExpedition()
Creating manual expedition for sale
public
createManualExpedition(mixed $saleId, mixed $items, mixed $carrier, mixed $trackNumber) : array<string|int, mixed>
Parameters
- $saleId : mixed
- $items : mixed
- $carrier : mixed
- $trackNumber : mixed
Tags
Return values
array<string|int, mixed>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) : void
Parameters
- $sale : mixed
- $itemsToShip : mixed
- $sendMail : mixed
Tags
createRetraitExpedition()
Create retrait expedition
public
createRetraitExpedition(mixed $order, mixed $itemsToShip[, int $trackingLength = 13 ]) : bool
Parameters
- $order : mixed
- $itemsToShip : mixed
- $trackingLength : int = 13
Tags
Return values
boolcreateRetraitExpeditionMagento()
Creating retrait expedition for sale
public
createRetraitExpeditionMagento(mixed $sale, mixed $isFullItemsShipped[, null $userId = null ]) : string
Parameters
- $sale : mixed
- $isFullItemsShipped : mixed
- $userId : null = null
Tags
Return values
stringcreateSalePresto()
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
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
Return values
false|stringcreateTntExpedition()
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 = ''
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
Return values
StreamedResponseexportSalesXls()
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
findAll()
public
findAll() : 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|stringfindSpecificSales()
public
findSpecificSales() : mixed
generateAsnFileForSale()
Generate Asn for sale
public
generateAsnFileForSale(Sale $sale, array<string|int, mixed> $items) : bool
Parameters
- $sale : Sale
- $items : array<string|int, mixed>
Tags
Return values
boolgenerateChronopostTicketForSaleProduct()
Generate sale product ticket
public
generateChronopostTicketForSaleProduct(SaleProduct $saleProduct) : void
Parameters
- $saleProduct : SaleProduct
Tags
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
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
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
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>generateUniqTrackingId()
Generate a unique tracking number
public
generateUniqTrackingId([int $length = 15 ]) : string
Parameters
- $length : int = 15
Return values
stringgenerateUniqueSaleTrackingId()
Generate unique sale tracking id
public
generateUniqueSaleTrackingId([mixed $prefix = 'MZ' ]) : string
Parameters
- $prefix : mixed = 'MZ'
Return values
stringgenerateWayfairExpeditionFileAndSend()
Generate Wayfair expedition file and send
public
generateWayfairExpeditionFileAndSend(mixed $sale, mixed $itemsToShip) : bool
Parameters
- $sale : mixed
- $itemsToShip : mixed
Tags
Return values
boolgetAllSources()
public
getAllSources() : array<string|int, mixed>
Tags
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
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|nullgetCarrierLinks()
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|stringgetCartCheckOrder()
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|stringgetCustomerEmail()
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
EntityManagergetFormattedSaleTrackings()
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
getMarketplaceCreatedAt()
Get marketplace date
public
getMarketplaceCreatedAt([null $sale = null ]) : DateTime
Parameters
- $sale : null = null
Return values
DateTimegetNumberOfSav()
public
getNumberOfSav(Sale $sale) : mixed
Parameters
- $sale : Sale
getOldRetrait()
public
getOldRetrait() : mixed
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 wayfair
public
getOrders() : array<string|int, mixed>
Return values
array<string|int, mixed>getOrdersByRange()
public
getOrdersByRange(mixed $start, mixed $end) : mixed
Parameters
- $start : mixed
- $end : mixed
Tags
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
getRepo()
Get Repository
public
getRepo() : SaleRepository|SaleRepository
Return values
SaleRepository|SaleRepositorygetReservedChronopostSales()
Return sales in csv file
public
getReservedChronopostSales(mixed $token) : string
Parameters
- $token : mixed
Return values
stringgetSaleByTrackingId()
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 ]) : mixed
Parameters
- $sale : mixed = null
Tags
getSaleInvoice()
Get order invoice
public
getSaleInvoice([mixed $sale = null ]) : bool
Parameters
- $sale : mixed = null
Tags
Return values
boolgetSalePaymentMethod()
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
getSaleSource()
Get Sale source
public
getSaleSource([null $sale = null ]) : string
Parameters
- $sale : null = null
Return values
stringgetSaleTracking()
Get Sale tracking
public
getSaleTracking([Sale $sale = null ]) : string
Parameters
- $sale : Sale = null
Return values
stringgetSaleTrackingCodes()
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>getSaleTrackLink()
Get Sale track link
public
getSaleTrackLink([Sale $sale = null ]) : string
Parameters
- $sale : Sale = null
Return values
stringgetSaleTrackLinkV2()
Get Sale track link
public
getSaleTrackLinkV2([Sale $sale = null ]) : string
Parameters
- $sale : Sale = null
Return values
stringgetSellsyTransporter()
Get Sellsy transporter
public
getSellsyTransporter() : string
Return values
stringgetShipmentCreatedAt()
public
getShipmentCreatedAt() : mixed
getShippingAmountForSellsy()
Get Shipping amount
public
getShippingAmountForSellsy() : float
Return values
floatgetShippingMethodFromV1()
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
getSource()
public
getSource() : mixed
handleRdv()
public
handleRdv(Sale $sale) : void
Parameters
- $sale : Sale
importSalesByCriteria()
public
importSalesByCriteria(mixed $searchCriteria) : mixed
Parameters
- $searchCriteria : mixed
isAllowedToCancelTuskOrder()
public
isAllowedToCancelTuskOrder(mixed $sale) : false
Parameters
- $sale : mixed
Return values
falseisOkToSendRetraitEmail()
public
isOkToSendRetraitEmail(Sale $sale[, bool $checkSentEmail = false ]) : bool
Parameters
- $sale : Sale
- $checkSentEmail : bool = false
Tags
Return values
boolnotifyCustomerForDelivery()
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>onAfterSaleCreated()
This method is triggered after a sale is created.
public
onAfterSaleCreated(AfterSaleCreatedEvent $event) : mixed
Parameters
- $event : AfterSaleCreatedEvent
-
The event object containing details about the created sale.
onAfterSaleUpdated()
This method is triggered after a sale is updated.
public
onAfterSaleUpdated(AfterSaleUpdatedEvent $event) : mixed
Parameters
- $event : AfterSaleUpdatedEvent
-
The event that is fired after a sale is updated.
onSaleProductsShipped()
When sale products are shipped
public
onSaleProductsShipped(SaleProductsShippedEvent $event) : mixed
Parameters
- $event : SaleProductsShippedEvent
Tags
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
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
Return values
stringregenerateSaleTrackLinks()
public
regenerateSaleTrackLinks([Sale|null $sale = null ]) : void
Parameters
- $sale : Sale|null = null
salesByDate()
public
salesByDate(mixed $date) : mixed
Parameters
- $date : mixed
save()
Save a Sale
public
save(Sale $sale) : Sale
Parameters
- $sale : Sale
Return values
SalesaveFromApi()
Save a Sale
public
saveFromApi(mixed $datas) : Sale|bool
by Amine and will be removed in next version
Parameters
- $datas : mixed
Tags
Return values
Sale|boolsearch()
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
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
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|stringsearchIdfTransporter()
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
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
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
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
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
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
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
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
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
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|stringsearchShippedChronopost()
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
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|voidsendSmsCodeCoupon()
public
sendSmsCodeCoupon(mixed $sale, mixed $ruleId, mixed $message[, null $userId = null ]) : string
Parameters
- $sale : mixed
- $ruleId : mixed
- $message : mixed
- $userId : null = null
Return values
stringsendSparePartToChronopost()
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
setIsUpStairs()
Set is UpStairs
public
setIsUpStairs(mixed $saleProduct) : mixed
Parameters
- $saleProduct : mixed
Tags
setLastMagentoId()
public
setLastMagentoId(int $lastSaleId) : int
Parameters
- $lastSaleId : int
Tags
Return values
intsetRealShippingMethod()
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
stringsetRealShippingMethodForWayfair()
Setting real shipping method
public
setRealShippingMethodForWayfair(Sale &$sale, mixed $shipping[, string $shippingMethod = '' ]) : string
Parameters
- $sale : Sale
- $shipping : mixed
- $shippingMethod : string = ''
Return values
stringsetSaleEntity()
Setting sale entity
public
setSaleEntity(Sale $entity) : mixed
Parameters
- $entity : Sale
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
Return values
array<string|int, mixed>|bool|mixedsetSaleProductAsShippedGeodis()
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
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
showInvoiceInformationsEditButton()
Show invoice edit button
public
showInvoiceInformationsEditButton() : bool
Return values
boolshowPreRefundBlock()
Show pre refund block in sale show
public
showPreRefundBlock() : mixed
showSaleProductsEditButton()
public
showSaleProductsEditButton(SaleProduct $saleProduct) : mixed
Parameters
- $saleProduct : SaleProduct
showSaleProductsSelect()
public
showSaleProductsSelect(mixed $saleProduct) : mixed
Parameters
- $saleProduct : mixed
showSaleStatusEditButton()
Show sale status edit button
public
showSaleStatusEditButton() : bool
Return values
boolshowShippingAddressFullname()
public
showShippingAddressFullname() : mixed
showShippingInformationEditButton()
Show invoice edit button
public
showShippingInformationEditButton() : bool
Return values
boolshowShippingMethodEditButton()
Show shipping method edit button in sale view
public
showShippingMethodEditButton() : bool
Return values
boolsumShipping()
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
Return values
stringswitchToProcessing()
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
stringsyncInventoryStock()
Sync stock
public
syncInventoryStock(mixed $file) : bool
Parameters
- $file : mixed
Return values
booltrackingId()
Generating tracking id
public
trackingId([int $length = 15 ]) : string
Parameters
- $length : int = 15
Tags
Return values
stringtrackingIdByS()
Check is old tracking
public
trackingIdByS(mixed $string) : bool
Parameters
- $string : mixed
Return values
boolupdateContactOnFrontApp()
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
Return values
stringupdateSaleProductAvailabilityDate()
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
_evaluateWeightItemFromProduct()
protected
_evaluateWeightItemFromProduct(mixed $item, mixed $itemProduct) : float|int
Parameters
- $item : mixed
- $itemProduct : mixed
Tags
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
stringcancelSaleProduct()
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
Return values
stringcreateNewSale()
Creating new order
protected
createNewSale(mixed $data) : Sale
Parameters
- $data : mixed
Tags
Return values
SalecreateSaleShipment()
Creating sale shipment
protected
createSaleShipment(mixed $sale, mixed $itemsQty, mixed $trackings, mixed $carrier) : mixed
Parameters
- $sale : mixed
- $itemsQty : mixed
- $trackings : mixed
- $carrier : mixed
Tags
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|stringgetCustomerAvailabilityForSaleProduct()
Getting product options
protected
getCustomerAvailabilityForSaleProduct(mixed $item, mixed $product) : string
Parameters
- $item : mixed
- $product : mixed
Return values
stringgetCustomerFirstNameForSale()
Getting customer First name for sale creation
protected
getCustomerFirstNameForSale(mixed $data) : mixed
Parameters
- $data : mixed
Tags
getCustomerIdForSale()
Getting customer id for sale creation
protected
getCustomerIdForSale(mixed $data) : mixed
Parameters
- $data : mixed
Tags
getCustomerLastNameForSale()
Getting customer last Name for sale creation
protected
getCustomerLastNameForSale(mixed $data) : mixed
Parameters
- $data : mixed
Tags
getOrderItemReference()
protected
getOrderItemReference(mixed $sale, mixed $countItems, mixed $k) : string
Parameters
- $sale : mixed
- $countItems : mixed
- $k : mixed
Return values
stringgetProductOptionsForSale()
Getting product options
protected
getProductOptionsForSale(mixed $item) : mixed
Parameters
- $item : mixed
Tags
getShippingMethodForSale()
Getting Shipping for sale creation
protected
getShippingMethodForSale(mixed $data) : mixed
Parameters
- $data : mixed
Tags
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
setIsInvoicedSellsy()
Getting is invoiced Sellsy sale creation
protected
setIsInvoicedSellsy(mixed $data) : mixed
Parameters
- $data : mixed
Tags
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
Return values
SaleProductaddSingleHandleToContact()
private
addSingleHandleToContact(mixed $contactId, mixed $handleValue, mixed $source) : mixed
Parameters
- $contactId : mixed
- $handleValue : mixed
- $source : mixed
connect()
Connecting by sftp
private
connect() : SFTP
Return values
SFTPconvertIhLinesToOrders()
Convert Ih and id lines to orders
private
convertIhLinesToOrders(array<string|int, mixed> $lines) : array<string|int, mixed>
Parameters
- $lines : array<string|int, mixed>
Return values
array<string|int, mixed>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
getDataDir()
Get Data dir for wayfair
private
getDataDir() : string
Return values
stringgetFrontAppContactByContactId()
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.
getIdLinesForIh()
Get Id lines => products lines for ih
private
getIdLinesForIh(array<string|int, mixed> $lines, int $ihIndex) : array<string|int, mixed>
Parameters
- $lines : array<string|int, mixed>
- $ihIndex : int
Return values
array<string|int, mixed>getShippingInfoFromV2Data()
Get Shipping method for v2 data
private
getShippingInfoFromV2Data(mixed $orderData) : array<string|int, mixed>
Parameters
- $orderData : mixed
Return values
array<string|int, mixed>notifyDevelopmentTeam()
Notifying Axelites team about new bug
private
notifyDevelopmentTeam(mixed $msg[, null $url = null ][, string $subject = 'New Bug in logidav' ]) : mixed
Parameters
- $msg : mixed
- $url : null = null
- $subject : string = 'New Bug in logidav'
sendFile()
Send specific file to a location
private
sendFile(string $localFile, string $remoteFile[, SFTP|null $sftp = null ]) : bool
Parameters
- $localFile : string
- $remoteFile : string
- $sftp : SFTP|null = null
Return values
boolupdateCustomFields()
private
updateCustomFields(mixed $contactId, mixed $ordersFormatted) : mixed
Parameters
- $contactId : mixed
- $ordersFormatted : mixed