/**
  * 
  * @return \ActionsAdminProduct
  */
 public static function getInstance()
 {
     if (self::$instance === false) {
         self::$instance = new ActionsAdminProduct();
     }
     return self::$instance;
 }
    $lang = ActionsLang::instance()->get_id_langue_courante();
}
if (!isset($id)) {
    $id = "";
}
if (!isset($ref)) {
    $ref = "";
}
if (!isset($tab)) {
    $tab = "generalDescriptionTab";
}
$errorCode = 0;
$errorMessage = '';
$errorDuplicate = 0;
try {
    ActionsAdminProduct::getInstance()->action($request);
} catch (TheliaAdminException $e) {
    switch ($e->getCode()) {
        case TheliaAdminException::REF_ALREADY_EXISTS:
        case TheliaAdminException::REF_EMPTY:
            $errorDuplicate = $e->getCode();
            $duplicate = $request->request->get('duplicate');
            break;
        default:
            $errorCode = $e->getCode();
            $errorMessage = $e->getMessage();
            break;
    }
}
$produit = new Produit($request->get('ref'));
$produitdesc = new Produitdesc($produit->id, $lang);