Skip to main content
Beantwortet

Import product with CSV file in Xentral

  • February 2, 2022
  • 1 Antwort
  • 136 Ansichten

Morteza
Partner
Forum|alt.badge.img

Hi . I try import my product with a csv.file in Xternal .I follow this tutorial.

I have several problem 
1- I do not have string class in my project. This class has been used in tutorial

.
.
...
$app->User = new User($app);
$conf = new Config();
$app->DB = new DB($conf->WFdbhost,$conf->WFdbname,$conf->WFdbuser,
$conf->WFdbpass);
$app->string = new string();
$erp = new erpAPI($app);
$app->erp = $erp;
....

That's why I get this error

PHP Fatal error: Uncaught Error: Class 'string' not found in /var/www/html/xentral/Importer/script.php:23
Stack trace:
#0 {main}
thrown in /var/www/html/xentral/Importer/script.php on line 23

I have WawiString class in the project instead of the String class.


But If I use the WawiString class, the value $app->string is empty.

In this tutorial use of WawiString for import image .

2-Also i have a problem with erpapi class.this class has not InsertUpdateArticle method .I get error in this line.

$artikelid = $this->app->erp->InsertUpdateArticle($data);
PHP Fatal error:  Uncaught Error: Call to undefined method erpAPI::InsertUpdateArticle() in /var/www/html/xentral/importer/script.php:91


I checked the erpAPI class. The InsertUpdateArticle method does not exist in this class

Does anyone know where my wrong is?

PS: I install Xentral version 21.1.0468b41 (Home) in local machine.and i active it by Serial number/license:
 

 

Beste Antwort von Anonymous

Hi . I try import my product with a csv.file in Xternal .I follow this tutorial.

I have several problem 
1- I do not have string class in my project. This class has been used in tutorial

.
.
...
$app->User = new User($app);
$conf = new Config();
$app->DB = new DB($conf->WFdbhost,$conf->WFdbname,$conf->WFdbuser,
$conf->WFdbpass);
$app->string = new string();
$erp = new erpAPI($app);
$app->erp = $erp;
....

That's why I get this error

PHP Fatal error: Uncaught Error: Class 'string' not found in /var/www/html/xentral/Importer/script.php:23
Stack trace:
#0 {main}
thrown in /var/www/html/xentral/Importer/script.php on line 23

I have WawiString class in the project instead of the String class.


But If I use the WawiString class, the value $app->string is empty.

In this tutorial use of WawiString for import image .

2-Also i have a problem with erpapi class.this class has not InsertUpdateArticle method .I get error in this line.

$artikelid = $this->app->erp->InsertUpdateArticle($data);
PHP Fatal error:  Uncaught Error: Call to undefined method erpAPI::InsertUpdateArticle() in /var/www/html/xentral/importer/script.php:91


I checked the erpAPI class. The InsertUpdateArticle method does not exist in this class

Does anyone know where my wrong is?

PS: I install Xentral version 21.1.0468b41 (Home) in local machine.and i active it by Serial number/license:
 

 

Hey Morteza,

thank you for your question. 

Is there a specific reason why you want to import the CSV file via a custom importer?

There is an easy way to import CSV files in xentral with the module Import/Export Center. Just select the master data import here and you can import standard CSV files. For more information please check out the documentation in our manual.

I hope I’ve been able to help.

 

Best regards

Chris

1 Antwort

  • 0 Antworten
  • Antwort
  • February 7, 2022

Hi . I try import my product with a csv.file in Xternal .I follow this tutorial.

I have several problem 
1- I do not have string class in my project. This class has been used in tutorial

.
.
...
$app->User = new User($app);
$conf = new Config();
$app->DB = new DB($conf->WFdbhost,$conf->WFdbname,$conf->WFdbuser,
$conf->WFdbpass);
$app->string = new string();
$erp = new erpAPI($app);
$app->erp = $erp;
....

That's why I get this error

PHP Fatal error: Uncaught Error: Class 'string' not found in /var/www/html/xentral/Importer/script.php:23
Stack trace:
#0 {main}
thrown in /var/www/html/xentral/Importer/script.php on line 23

I have WawiString class in the project instead of the String class.


But If I use the WawiString class, the value $app->string is empty.

In this tutorial use of WawiString for import image .

2-Also i have a problem with erpapi class.this class has not InsertUpdateArticle method .I get error in this line.

$artikelid = $this->app->erp->InsertUpdateArticle($data);
PHP Fatal error:  Uncaught Error: Call to undefined method erpAPI::InsertUpdateArticle() in /var/www/html/xentral/importer/script.php:91


I checked the erpAPI class. The InsertUpdateArticle method does not exist in this class

Does anyone know where my wrong is?

PS: I install Xentral version 21.1.0468b41 (Home) in local machine.and i active it by Serial number/license:
 

 

Hey Morteza,

thank you for your question. 

Is there a specific reason why you want to import the CSV file via a custom importer?

There is an easy way to import CSV files in xentral with the module Import/Export Center. Just select the master data import here and you can import standard CSV files. For more information please check out the documentation in our manual.

I hope I’ve been able to help.

 

Best regards

Chris