TatiService
extends SaleService
in package
Class TatiService
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
- $categoryMapping : array<string|int, mixed>
- $colorMapping : array<string|int, mixed>
- $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
- $_apiEndpoint : mixed
- $header : mixed
- $shippingService : mixed
- $tatiParams : array<string|int, mixed>
- $trackingCodeService : TrackingCodeService
Methods
- __construct() : mixed
- TatiService 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() : void
- Sale Canceled
- afterSaleProductCanceled() : void
- 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
- cancelTatiSale() : bool|string
- 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() : bool
- create invoice after shipment csv
- createManualExpedition() : array<string|int, mixed>
- Creating manual expedition for sale
- createOrderShipment() : mixed
- Create Order Shipment
- createOrderShipmentMagento() : bool
- This function is used for retrait
- createProductForTati() : int
- 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|array<string|int, 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
- 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
- generateTatiProductData() : array<string|int, mixed>
- generateUniqTrackingId() : string
- Generate a unique tracking number
- generateUniqueSaleTrackingId() : string
- Generate unique sale tracking id
- getAllOrdersFromTati() : mixed|array<string|int, mixed>
- getAllSources() : array<string|int, mixed>
- getAuthorizationTokenForTati() : 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
- getOrdersByRange() : mixed
- getPartnerName() : mixed
- getPaylinePaymentStats() : mixed
- Get Payline Stats PayPal|CB|FCB3X|PRESTO
- getPaymentStat() : mixed
- Getting payment stats
- getProductGalleryImages() : array<string|int, mixed>
- getProductsFromTati() : array<string|int, mixed>|bool|string
- Get products from tati
- 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
- 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() : 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
- getSource() : mixed
- getTrackingUrlForTati() : string
- Get tracking url for aliexpress
- 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() : void
- 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
- setRealShippingMethodForTati() : 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
- shipTatiSale() : bool|string
- 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
- updateOrdersStatus() : bool|string|array<string|int, mixed>
- updateProductsInTati() : array<string|int, mixed>|bool|string
- updateProductsQtyInTati() : bool|string|array<string|int, mixed>
- 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
- Sending request to magento to cancel a sale
- 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() : array<string|int, mixed>|bool|string
- Set action to Tati
- setIsInvoicedSellsy() : mixed
- Getting is invoiced Sellsy sale creation
- updateOrderItem() : SaleProduct
- Update order item
- addSingleHandleToContact() : mixed
- 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.
- getShippingInfoFromV2Data() : array<string|int, mixed>
- Get Shipping method for v2 data
- 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
Properties
$alfyApi
protected
AlfyApi
$alfyApi
$categoryMapping
protected
array<string|int, mixed>
$categoryMapping
= [
//Chaise
// 10 => 37013006,//Chaise
22 => 181,
//Chaise en inox // Canapé, Chaise, Fauteuil - Chaise, Banc 181 - Chaise
23 => 181,
33 => 181,
37 => 181,
75 => 639,
//Chaise de bar // Meubles Canapé, Chaise, Fauteuil - Tabouret, Tabouret de Bar - Tabouret de Bar 639
94 => 181,
///Chaise en inox // Canapé, Chaise, Fauteuil - Chaise, Banc 181 - Chaise
//Canapé
35 => 173,
//Canapé
32 => 173,
//Canapé fixe 2 places // Meubles > Canapé, Chaise, Fauteuil > Canapé > Canapé, Sofa, Divan 173
29 => 173,
//Canapé fixe 3 places
31 => 173,
//Canapé d'angle
28 => 173,
//Canapé Chesterfield
30 => 173,
//Canapé Chesterfield
117 => 173,
//Canapé d'angle convertible
16 => 173,
//Canapé en velours
//Tables
51 => 563,
//Console extensible // Meubles Meuble de Salon, Séjour r Table Extensible, Console Table Console, Console Extensible 563
50 => 563,
//Table à rallonges
53 => 563,
//Table à rallonges
52 => 563,
//Table ronde / ovale // Meubles Meuble de Salon, Séjour- Table à manger, Table Haute Table à Manger 560
44 => 562,
//Tables basses // Meuble de Salon, Séjour Table Basse Table Basse 562
46 => 562,
//Table basse avec rangement
98 => 561,
//Ensemble table et chaises // Meubles Meuble de Salon, Séjour Table à manger, Table Haute Table à Manger avec Chaises 561
120 => 563,
//Table personnalisable // Meubles Meuble de Salon, Séjour Table à manger, Table Haute Table à Manger 560
//Tables basses
19 => 173,
//Bout de canapé //
48 => 562,
//Table basse rectangulaire / carrée
127 => 562,
//Tables basse ronde / ovale
55 => 562,
//Table basse relevable
121 => 562,
//Table basse personnalisable
108 => 180,
//Banc et banquette // Meubles Canapé, Chaise, Fauteuil Chaise, Banc 180
// 103 => 432,//Romantique Chic
// 102 => 977,//Tendance Baroque //
//Lit
42 => 1011,
//Tête de lit // true
38 => 333,
//Lit simple
39 => 329,
//Lit double
41 => 329,
//Lit avec rangement
122 => 368,
//Lit enfant
82 => 335,
//Matelas
//Poufs
157 => 180,
//Banc et banquette
158 => 180,
// Banquette-coffre
//Fauteuil
91 => 637,
//Fauteuil scandinave // Meubles > Canapé, Chaise, Fauteuil > Fauteuil, Pouf > Fauteuil
152 => 637,
//Fauteuil en velours
153 => 637,
//Fauteuil et repose-pieds
154 => 637,
//Fauteuil et repose-pieds
150 => 637,
//Fauteuil classique
109 => 637,
//Fauteuil
//Meubles de rangement
// 63 => 37032005, //Commodes
64 => 557,
//Meuble TV // Meubles > Meuble de Salon, Séjour > Meuble TV > Meuble TV, Meuble Hi-Fi
65 => 562,
//Tables de chevet =====> categorie table bas
// 124 => 37032006, //Consoles
70 => 313,
//Bureaux
126 => 547,
//192
//Deco
// 118 => 156, //Couverts
106 => 343,
]
$colorMapping
protected
array<string|int, mixed>
$colorMapping
= [
'Ambre' => 4031,
'Argent' => 10,
'Beige' => 13,
'Beige / Blanc' => 1522,
'Beige / Gris' => 530,
'Beige / Marron' => 1549,
'Beige doggy' => 13,
//beige color
'Béton gris' => 14,
'Blanc' => 9,
'Blanc / Argent' => 209,
'Blanc / Chêne' => 4857,
'Blanc / Gris' => 105,
'Blanc / Noir' => 102,
'Blanc / Rouge' => 2735,
'Blanc / Taupe' => 3926,
'Bleu' => 8,
'Bleu clair' => 8,
'Bleu vert' => 1684,
'Bois' => 4675,
'Bois / Blanc' => 5697,
'Bois / Gris' => 14,
'Bois / Marron' => 2,
//marron
'Bois / Noir' => 1,
'Bois argent / Gris' => 14,
'Bois clair / Beige' => 13,
'Bois clair / Crème' => 13,
'Bois clair / Noir' => 102,
'Bois foncé / Beige' => 13,
'Bois gris' => 14,
'Bois vintage' => 4675,
'Bordeaux' => 33,
'Bronze' => 49,
'Capuccino' => 13,
'Chêne clair' => 4989,
'Chêne foncé' => 5692,
'Chrome' => 6475,
'Crème' => 9,
'Cuivre' => 6880,
'Écru / Marron' => 1550,
'Fuschia' => 5,
'Gris' => 14,
'Gris / Blanc' => 105,
'Gris / Gris' => 14,
'Gris clair' => 14,
'Gris foncé' => 14,
'Gris sable' => 14,
'Ivoire' => 4246,
'Jaune' => 22,
'Kaki' => 3,
'Magenta' => 3229,
//rose
'Marron' => 2,
'Marron foncé' => 2,
'Métal' => 14,
'Motif lettres' => 6475,
'Multicolore' => 6475,
'Nickel' => 14,
'Noir' => 1,
'Noir / Beige' => 3170,
'Noir / Blanc' => 104,
'Noir / Gris' => 2706,
'Noir / Marron' => '',
'Noir / Rouge' => 62,
'Noir / Taupe' => 3250,
'Or' => 36,
'Or / Marron' => 2,
'Or rose' => 6370,
'Orange' => 11,
'Parme' => 51,
'Pourpre' => 4247,
'Rose' => 3229,
'Rouge' => 25,
'Taupe' => 3226,
'Taupe clair' => 3226,
'Taupe foncé' => 3226,
'Transparent' => 116,
'Vert' => 3204,
'Vintage' => 6475,
'Violet' => 6,
'Wenge' => 4671,
'Ocre' => 3,
'Osier Tissé Blanc' => 9,
'Osier Tissé Taupe' => 2,
]
$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
= 'Tati'
$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']
$_apiEndpoint
private
mixed
$_apiEndpoint
= ''
$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']
$shippingService
private
mixed
$shippingService
$tatiParams
private
array<string|int, mixed>
$tatiParams
$trackingCodeService
private
TrackingCodeService
$trackingCodeService
Methods
__construct()
TatiService constructor.
public
__construct(ContainerInterface $container) : mixed
Parameters
- $container : ContainerInterface
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[, bool $isV2Data = false ]) : Sale|bool
Parameters
- $data : mixed
- $isV2Data : bool = 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) : void
Parameters
- $event : AfterSaleCanceledEvent
Tags
afterSaleProductCanceled()
public
afterSaleProductCanceled(AfterSaleProductCanceledEvent $event) : void
Parameters
- $event : AfterSaleProductCanceledEvent
Tags
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
stringcancelTatiSale()
public
cancelTatiSale(array<string|int, mixed> $params) : bool|string
Parameters
- $params : array<string|int, mixed>
Return values
bool|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
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
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
Tags
createOrderShipmentMagento()
This function is used for retrait
public
createOrderShipmentMagento(mixed $sale, mixed $itemsToShip, mixed $sendMail) : bool
Parameters
- $sale : mixed
- $itemsToShip : mixed
- $sendMail : mixed
Tags
Return values
boolcreateProductForTati()
public
createProductForTati(mixed $data) : int
Parameters
- $data : mixed
Return values
intcreateRetraitExpedition()
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[, mixed $userId = null ]) : string
Parameters
- $sale : mixed
- $isFullItemsShipped : mixed
- $userId : mixed = 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 = ''
execute()
public
execute(mixed $api[, string $requestType = 'GET' ][, null $body = null ][, array<string|int, mixed> $headers = [] ]) : bool|string|array<string|int, mixed>
Parameters
- $api : mixed
- $requestType : string = 'GET'
- $body : null = null
- $headers : array<string|int, mixed> = []
Return values
bool|string|array<string|int, 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
generateChronopostTicketForSaleProduct()
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>generateTatiProductData()
public
generateTatiProductData(Product $product, ProductInfo $productInfo) : array<string|int, mixed>
Parameters
- $product : Product
- $productInfo : ProductInfo
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
stringgetAllOrdersFromTati()
public
getAllOrdersFromTati() : mixed|array<string|int, mixed>
Return values
mixed|array<string|int, mixed>getAllSources()
public
getAllSources() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getAuthorizationTokenForTati()
public
getAuthorizationTokenForTati() : mixed
Tags
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>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
getProductGalleryImages()
public
getProductGalleryImages(array<string|int, mixed> $images) : array<string|int, mixed>
Parameters
- $images : array<string|int, mixed>
Return values
array<string|int, mixed>getProductsFromTati()
Get products from tati
public
getProductsFromTati() : array<string|int, mixed>|bool|string
Return values
array<string|int, mixed>|bool|stringgetRepo()
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 ]) : array<string|int, mixed>
Parameters
- $sale : mixed = null
Return values
array<string|int, mixed>getSaleInvoice()
Get order invoice
public
getSaleInvoice([null $sale = null ]) : bool
Parameters
- $sale : null = 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() : mixed
getShipmentCreatedAt()
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
getTrackingUrlForTati()
Get tracking url for aliexpress
public
getTrackingUrlForTati() : string
Tags
Return values
stringhandleRdv()
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) : void
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
stringsetRealShippingMethodForTati()
Setting real shipping method
public
setRealShippingMethodForTati(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
shipTatiSale()
public
shipTatiSale(array<string|int, mixed> $params) : bool|string
Parameters
- $params : array<string|int, mixed>
Return values
bool|stringshowInvoiceInformationsEditButton()
Show invoice edit button
public
showInvoiceInformationsEditButton() : bool
Return values
boolshowPreRefundBlock()
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
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
stringtrackingId()
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 = '+'
updateOrdersStatus()
public
updateOrdersStatus(mixed $data) : bool|string|array<string|int, mixed>
Parameters
- $data : mixed
Return values
bool|string|array<string|int, mixed>updateProductsInTati()
public
updateProductsInTati(mixed $data) : array<string|int, mixed>|bool|string
Parameters
- $data : mixed
Return values
array<string|int, mixed>|bool|stringupdateProductsQtyInTati()
public
updateProductsQtyInTati(mixed $data) : bool|string|array<string|int, mixed>
Parameters
- $data : mixed
Return values
bool|string|array<string|int, 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()
Sending request to magento to cancel a sale
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
setActionToOrder()
Set action to Tati
protected
setActionToOrder(mixed $actionType[, null $body = null ]) : array<string|int, mixed>|bool|string
Parameters
- $actionType : mixed
- $body : null = null
Return values
array<string|int, mixed>|bool|stringsetIsInvoicedSellsy()
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
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
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.
getShippingInfoFromV2Data()
Get Shipping method for v2 data
private
getShippingInfoFromV2Data(mixed $orderData) : array<string|int, mixed>
Parameters
- $orderData : mixed
Return values
array<string|int, mixed>updateCustomFields()
private
updateCustomFields(mixed $contactId, mixed $ordersFormatted) : mixed
Parameters
- $contactId : mixed
- $ordersFormatted : mixed