Jump to content

Erreur: Le champ suivant n'est pas valide selon la méthode de validationisCatalogName


Recommended Posts

Bonjour,

 

Voila j'ai un module pour importer un catalogue d'un fournisseur le probleme ces que quand je le lance il me met cette erreur apres avoir charger plusieur produit :

 

Product ref : 9115 Xoro HRS 8750 - Récepteur satellite HD + lecteur CI+. 2 x USB. HDMI Calcul prix de 69.8 a 69.8 Le champ suivant n'est pas valide selon la méthode de validationisCatalogName:

(Product->name = Xoro HRS 8750 - Récepteur satellite HD + lecteur CI+. 2 x USB. HDMI - ... pour la langue 2)

 

J'ai eu beau chercher je ne trouve pas d'ou peut provenir ce probleme, je vous joint le bout de code correspondant du module:

 

public function getMakantData( $filename, $jcateg = FALSE )
{
 $j = 0;

 if( $jcateg == FALSE )
 {
  if (($handle = fopen($filename, "r")) !== FALSE)
  {
while(( $tmp = fgetcsv($handle, 0, ";" )) !== FALSE )
{
 if( $j > 0 )
 {
  $num = count($tmp);
  $row++;
  $carac_tmp = array();

  $tof = explode(",", $tmp[8]);

  $data['reference'] = $tmp[0];
  $data['actif'] = $tmp[1];

  $tmp2 = split(' ', $tmp[2] );
  $data['titre'] = utf8_encode($tmp[2]);
  $titre_prod = utf8_encode($tmp[2]);
  $data['famille'] = utf8_encode($tmp[9]);
  $data['marque'] = '';
  $data['reference_fabricant'] = $tmp[0];
  $data['ean13'] = $tmp[4];
  $data['stock'] = $tmp[5];
  $data['date_dispo'] = '';
  $data['poids'] = $tmp[10];
  $data['volume'] = 0;
  $data['url_photo'] = $tof[1];
  $data['prix_public'] = '';
  $data['prix_revendeur'] = $tmp[3];
  $data['prix_transport'] = 0;
  $data['prix_promo'] = 0;
  $data['promo'] = 0;
  $data['eco_participation'] = 0;
  $data['description'] = utf8_encode($tmp[6]);




  $carac_tmp = preg_split( '/\- Couleur \-|\- Taille \-|\- Tailles \-|\- Pointures \-|\- Formes \-|\- Bonnets \-/', $data['titre'] );

  if( count( $carac_tmp ) <= 1   )
  {
   if( strlen( trim( $data['reference'] ) ) == 0 || $data['reference'] == ' ' )
	$data['reference'] = 'produit-'.$row;

   echo "Produit à la ligne $row: reference : ".$data['reference']."\n";
   echo $data['titre'] ."\n\n";

   $this->insertProduct( $data );

   $reference_produit = $data['reference'];
  }

  if( $this->conf['create_declin'] == 1 )
  {
   $data2 = array();
   $this->carac = array();

   $titre = utf8_encode($tmp[2]);

   if( isset( $carac_tmp[1] ) && $carac_tmp[1] != '' )
   {
	$this->carac = '';

	$this->splitCarac( 'Couleur - ', ',', $titre , 'Couleur' );
	$this->splitCarac( 'Taille - ', ',', $titre , 'Taille' );
	$this->splitCarac( 'Tailles - ', ',', $titre , 'Taille' );
	$this->splitCarac( 'Pointures - ', ',', $titre , 'Pointures' );
	$this->splitCarac( 'Formes - ', ',', $titre , 'Formes' );
	$this->splitCarac( 'Bonnets - ', ',', $titre , 'Bonnets' );

	if( strlen( trim($tmp[0]) ) > 0 )
	 $data2['reference'] = trim($tmp[0]);

	else
	 $data2['reference'] = $reference_produit.'-decli-'.$i;

	$data2['actif'] = $tmp[1];
	$data2['reference_produit'] = $reference_produit;
	$tmp2 = split(' ', utf8_encode($tmp[2]));
	$data2['titre'] = $titre;
	$data2['ean13'] = $tmp[4];
	$data2['stock'] = $tmp[5];
	$data2['date_dispo'] = '';
	$data2['url_photo'] = $tof[1];
	$data2['prix_public'] = '';
	$data2['prix_revendeur'] = $tmp[3];
	$data2['prix_transport'] = 0;
	$data2['prix_promo'] = 0;
	$data2['promo'] = 0;


	$data2['caracteristiques'] = json_encode( $this->carac );



	$this->insertProductDeclinaison( $data2 );
   }

   else
	$precedent_prod = $titre_prod;
  }

  else
   $precedent_prod = $titre_prod;
 }

 $j++;
}

fclose($handle);
  }

  $sql = 'SELECT distinct famille as famille FROM `'._DB_PREFIX_.'importfourn_product` WHERE fournisseur = \''.pSQL( $this->conf['supplier'] ).'\' ';
  $liste = Db::getInstance()->ExecuteS($sql);

  foreach( $liste as $categ )
  {
$data = array();
$data['id'] = $categ['famille'];
$data['titre'] = $categ['famille'];
$data['pid'] = '';

$this->insertCategory( $data );
$i++;
  }
 }

 else
 {
  if (($handle = fopen($filename, "r")) !== FALSE)
  {

while(( $tmp = fgetcsv($handle, 100000, ";" )) !== FALSE )
{
 if( $i > 0 )
 {
  $data = array();
  $tmmp = utf8_encode($tmp[2]);
  $tmp2 = preg_split('/\ /', $tmmp );

  $data['id'] = $tmp[9];
  $data['titre'] = $tmp[9];
  $data['pid'] = '';

  $this->insertCategory( $data );
 }[/size][/font][/color]
[color=#000000][font=Arial, Verdana, Helvetica, sans-serif][size=3]	 $i++;
}
  }

  $this->_html .= '<br /><h1>'.$this->l('Categories are Updated').'</h1>';
 }
 $this->_html .= $i.' '.$this->l('Category(s) imported')."<br />\n";

 return  $this->_html;
}

 

Et voila la ligne dans le fichier csv:

 

 

9115 1 Xoro HRS 8750 - Récepteur satellite HD + lecteur CI+. 2 x USB. HDMI 69.8 4.26E+12 12 <p>Le Xoro HRS 8750 CI+ est à la fois un récepteur satellite HD DVB-S2 avec interfaceCI+. un Magnétoscope Numérique et une Passerelle Multimédia.<br><br>Son interface CI+ accepte tous les modules. qu’ils soient CI+ ou CI. Moyennant unadaptateur de carte à puce adéquat. il reçoit et decode toutes les Chaînes Payantes.<br><br>Il enregistre les chaînes satellite HD ou SD directement sur le support de stockage USB.<br>Comme tous les appareils modernes le HRS 8700 CI+ dispose évidemment de la fonctionTime-Shift.<br><br>La lecture multimédia particulièrement puissante permet la lecture de pratiquement tous lesfichiers vidéo modernes jusqu’à la résolution 1080p.</p><p>Informations Générales<br>Alimentation AC 100-240 V. 50/60Hz<br>Consommation < 20 Watts / < 1 Watt en veille<br>Dimensions 260 x 190 x 40 mm<br><br>Tuner<br>Fréquence d’entrée 950 - 2150 MHz<br>Impédance 75 <br>Aimentation LNB 13 / 18 V. maxi. 400 mA<br>Forme d’onde QPSK 8PSK<br>Taux de symbole 2 - 45 Mbps<br><br>Décodage Vidéo<br>Standard MPEG 2 Niveau (MP@ML) et (MP@HL)<br>MPEG 4 (H.264) Profil Haut Niveau 4<br>Format d’image 43 / 169<br><br>Décodage Audio<br>Standard ISO/IEC 11172 Layer I & II<br>Fréquence d’échantillonnage 32. 44.1 & 48 kHz<br>Sortie Stéréo. Gauche/Droite. Mono<br><br>Connectique<br>Vidéo HDMI. Péritel. Composite<br>Audio Sortie Audio Numérique coaxiale. Stéréo RCA<br>USB 2 x USB 2.0 High Speed<br>Autres Interface CI+<br><br>Lecture Multimédia<br>Support de stockage Support de stockage USB <br>FAT32/NTFS<br>Container AVI. MKV. TS. MPG. mp4. tp. trp. movCodecs Vidéo (1080p) MPEG1. MPEG2. MPEG4 (SP/ASP/H264)<br>Codecs Audio MPEG. MP3. AC3. AAC<br><br>Magnétoscope Numérique<br>Support de stockage Support de stockage USB<br> FAT32/NTFS<br>Format de fichier TS<br>Fonction supplémentaire Time Shift<br><br>Conditions d’utilisation<br>Temperature 0 - 40° C<br>Humidity 5 - 90% (non condensing)</p><p>Télécommande<br>Manuel d´utilisation</p> <p>Le Xoro HRS 8750 CI+ est à la fois un récepteur satellite HD DVB-S2 avec interfaceCI+. un Magnétoscope Numérique et une Passerelle Multimédia.<br><br>Son interface CI+ accepte tous les modules. qu’ils soient CI+ ou CI. Moyennant unadaptateur de carte à puce adéquat. il reçoit et decode toutes les Chaînes Payantes.<br><br>Il enregistre les chaînes satellite HD ou SD directemen...</p> http://www.makant-europe.de/images/produktbilder/9115_800x600_0.jpg,http://www.makant-europe.de/images/produktbilder/9115_800x600_1.jpg,http://www.makant-europe.de/images/produktbilder/9115_800x600_2.jpg DVB-T 1.5

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...