More fields into import of products

This commit is contained in:
Laurent Destailleur
2012-03-30 00:54:41 +02:00
parent 3659191d83
commit d8c975da3d
5 changed files with 11 additions and 9 deletions

View File

@@ -511,7 +511,7 @@ class ImportCsv extends ModeleImports
// Now we check cache is not empty (should not) and key is into cache
if (! is_array($this->cachefieldtable[$field.'@'.$table]) || ! in_array($newval,$this->cachefieldtable[$field.'@'.$table]))
{
$this->errors[$error]['lib']=$langs->trans('ErrorFieldValueNotIn',$key,$newval,$field,$table);
$this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorFieldValueNotIn',$key,$newval,$field,$table);
$this->errors[$error]['type']='FOREIGNKEY';
$errorforthistable++;
$error++;
@@ -520,7 +520,8 @@ class ImportCsv extends ModeleImports
// If test is just a static regex
else if (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i',$newval))
{
$this->errors[$error]['lib']=$langs->trans('ErrorWrongValueForField',$key,$newval,$objimport->array_import_regex[0][$val]);
//if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."<br>";
$this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField',$key,$newval,$objimport->array_import_regex[0][$val]);
$this->errors[$error]['type']='REGEX';
$errorforthistable++;
$error++;