1. Go to this page and download the library: Download adesa/smartlabel-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// toutes vos commandes d'étiquettes smartlabel dans un tableau associatif
// avec pour clé le numéro de dossier
$orders = DB::fetchSmartLabelOrders();
$etats = $smartLabel->etatDossiers(array_keys($orders));
// Le tableau $etats est composé d'objets EtatDossier
foreach($etats as $numeroDossier => $etat) {
$order = $orders[$numeroDossier];
switch($etat->code){
case EtatDossier::LIVRAISON:
$order->setState("shipping");
break;
case EtatDossier::ERREUR_FICHIER:
if(!$order->isInState("error")){
$order->setState("error");
$order->customer->sendErrorMail();
}
break;
}
}
ini
# ./config/smartlabel.ini
locale = {fr|en|es|…}
localeBasePath = ../locale
identifiantRevendeur = {votre identifiant revendeur}
[FTP]
host = adesaweb.adesa.fr
user = {votre login FTP}
password = {votre mot de passe FTP}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.