# Migrationstool | Importfehler: PrestaShop - Shopware

**URL:** <https://forum.shopware.com/t/migrationstool-importfehler-prestashop-shopware/34190>\
**Category:** Allgemein\
**Created:** [3. Februar 2016 um 15:02 UTC](https://forum.shopware.com/t/migrationstool-importfehler-prestashop-shopware/34190 "2016-02-03T15:02:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shopworker](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@shopworker](https://forum.shopware.com/u/shopworker)\
**Post date:** [3. Februar 2016 um 15:02 UTC](https://forum.shopware.com/t/migrationstool-importfehler-prestashop-shopware/34190/1 "2016-02-03T15:02:44Z")

</div>

Hallo liebe Community,&nbsp;  
bei der Migration eines PrestaShop (1.6.0.9)&nbsp;wird mir nachfolgende Fehlermeldung angezeigt, die ich leider nicht deuten kann.&nbsp;Ich bitte um eure Hilfe bzw. Meinung dazu.&nbsp;  
Ich nutze das Migrationstool in der&nbsp;[neusten Version](https://github.com/shopwareLabs/SwagMigration)&nbsp;(2.4.0) unter Shopware 5.1.2.  
p.s: Die gleiche&nbsp;Fehlermeldung wurde mir im&nbsp;ersten Test-Szenarion (Migartionstool 2.3.1 unter Shopware 5.0.4) angezeigt.

```
Beim Importieren der Preise ist ein Fehler aufgetreten

Code : 23000
Line : 234
File : /var/www/vhosts/domain.tld/httpdocs/engine/Library/Zend/Db/Statement/Pdo.php

Error : SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id_product' in order clause is ambiguous
Trace : #0 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array) #1 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #2 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('(??????SELECT? ...', Array) #3 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Enlight/Components/Db/Adapter/Pdo/Mysql.php(75): Zend_Db_Adapter_Pdo_Abstract->query('(??????SELECT? ...', Array) #4 [internal function]: Enlight_Components_Db_Adapter_Pdo_Mysql->query('(??????SELECT? ...') #5 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/DbDecorator.php(128): call_user_func_array(Array, Array) #6 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Profile.php(567): Shopware_Components_Migration_DbDecorator->__call('query', Array) #7 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Profile.php(567): Shopware_Components_Migration_DbDecorator->query('(??????SELECT? ...') #8 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Import/Resource/Price.php(108): Shopware_Components_Migration_Profile->queryProductPrices(0) #9 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Plugins/Community/Backend/SwagMigration/Controllers/Backend/SwagMigration.php(474): Shopware_Components_Migration_Import_Resource_Price->run() #10 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Plugins/Community/Backend/SwagMigration/Controllers/Backend/SwagMigration.php(511): Shopware_Controllers_Backend_SwagMigration->runImport('import_prices') #11 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Enlight/Controller/Action.php(158): Shopware_Controllers_Backend_SwagMigration->importAction() #12 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight_Controller_Action->dispatch('importAction') #13 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Enlight/Controller/Front.php(226): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp)) #14 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Kernel.php(153): Enlight_Controller_Front->dispatch() #15 /var/www/vhosts/domain.tld/httpdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php(492): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #17 /var/www/vhosts/domain.tld/httpdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php(263): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true) #18 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Components/HttpCache/AppCache.php(103): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true) #19 /var/www/vhosts/domain.tld/httpdocs/shopware.php(101): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request)) #20 {main}

OK

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![DanielNogel](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@DanielNogel](https://forum.shopware.com/u/DanielNogel)\
**Post date:** [3. Februar 2016 um 17:28 UTC](https://forum.shopware.com/t/migrationstool-importfehler-prestashop-shopware/34190/2 "2016-02-03T17:28:30Z")

</div>

Hi,

wenn du in der folgenden Zeile das “id\_product” durch “pr.id\_product” ersetzt, geht es vielleicht schon:

> <https://github.com/shopwareLabs/SwagMigration/blob/master/Components/Migration/Profile/Prestashop15.php#L313>

Besten Gruß,

Daniel

---

<div class="post-metadata">

**Author:** ![shopworker](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@shopworker](https://forum.shopware.com/u/shopworker)\
**Post date:** [5. Februar 2016 um 14:22 UTC](https://forum.shopware.com/t/migrationstool-importfehler-prestashop-shopware/34190/3 "2016-02-05T14:22:48Z")

</div>

> „id\_product“ durch „pr.id\_product“ ersetzen

Leider ist dies nicht die Lösung. Mit dieser Änderung erhalte ich nun folgende Meldung.  
db\_cust\_1 = Shopware&nbsp;  
db\_cust\_2 = Presta Shop&nbsp;&nbsp;

```
An error occurred while generating configuratos

Code : 42
Line : 234
File : /var/www/vhosts/domain.tld/httpdocs/engine/Library/Zend/Db/Statement/Pdo.php

Error : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db_cust_2.ps_product' doesn't exist
Trace : #0 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array) #1 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #2 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('? SE...', Array) #3 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Enlight/Components/Db/Adapter/Pdo/Mysql.php(75): Zend_Db_Adapter_Pdo_Abstract->query('? SE...', Array) #4 [internal function]: Enlight_Components_Db_Adapter_Pdo_Mysql->query('? SE...') #5 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/DbDecorator.php(128): call_user_func_array(Array, Array) #6 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Profile.php(448): Shopware_Components_Migration_DbDecorator->__call('query', Array) #7 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Profile.php(448): Shopware_Components_Migration_DbDecorator->query('? SE...') #8 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Import/Resource/Configurator.php(100): Shopware_Components_Migration_Profile->queryAttributedProducts(0) #9 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Plugins/Community/Backend/SwagMigration/Controllers/Backend/SwagMigration.php(474): Shopware_Components_Migration_Import_Resource_Configurator->run() #10 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Plugins/Community/Backend/SwagMigration/Controllers/Backend/SwagMigration.php(511): Shopware_Controllers_Backend_SwagMigration->runImport('import_generate...') #11 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Enlight/Controller/Action.php(158): Shopware_Controllers_Backend_SwagMigration->importAction() #12 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight_Controller_Action->dispatch('importAction') #13 /var/www/vhosts/domain.tld/httpdocs/engine/Library/Enlight/Controller/Front.php(226): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp)) #14 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Kernel.php(153): Enlight_Controller_Front->dispatch() #15 /var/www/vhosts/domain.tld/httpdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php(492): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #17 /var/www/vhosts/domain.tld/httpdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php(263): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true) #18 /var/www/vhosts/domain.tld/httpdocs/engine/Shopware/Components/HttpCache/AppCache.php(103): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true) #19 /var/www/vhosts/domain.tld/httpdocs/shopware.php(101): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request)) #20 {main}

OK

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![DanielNogel](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@DanielNogel](https://forum.shopware.com/u/DanielNogel)\
**Post date:** [5. Februar 2016 um 17:25 UTC](https://forum.shopware.com/t/migrationstool-importfehler-prestashop-shopware/34190/4 "2016-02-05T17:25:57Z")

</div>

Hi,

gibt es die Tabelle „ps\_product“ denn wirklich nicht? Hat die vielleicht ein anderes Präfix? So wie ich das im Code sehe, kann das Migrationstool an einigen Stellen keine abweichenden Präfixes als „ps\_“. Das könnte also vll. schon daran liegen, das könnte man dann noch relativ fix anpassen.

Daniel

---

<div class="post-metadata">

**Author:** ![Cagoo](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@Cagoo](https://forum.shopware.com/u/Cagoo)\
**Post date:** [15. Oktober 2016 um 08:26 UTC](https://forum.shopware.com/t/migrationstool-importfehler-prestashop-shopware/34190/5 "2016-10-15T08:26:30Z")

</div>

> Hi,
> 
> gibt es die Tabelle „ps\_product“ denn wirklich nicht? Hat die vielleicht ein anderes Präfix? So wie ich das im Code sehe, kann das Migrationstool an einigen Stellen keine abweichenden Präfixes als „ps\_“. Das könnte also vll. schon daran liegen, das könnte man dann noch relativ fix anpassen.

Hallo, ich habe exakt das gleiche Problem… und die Tabelle „ps\_product“ gibt es bei der zu importierenden datenbank… Hat jemand eine abschließende Lösung?

Danke und Grüße, Thomas&nbsp;

---

<div class="post-metadata">

**Author:** ![swat](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@swat](https://forum.shopware.com/u/swat)\
**Post date:** [15. Oktober 2016 um 09:40 UTC](https://forum.shopware.com/t/migrationstool-importfehler-prestashop-shopware/34190/6 "2016-10-15T09:40:58Z")

</div>

So ähnlich wie Daniel sagte, scheint man das Problem in den Griff zu kriegen. In Zeile 294 jedoch muss “id\_product” durch “pr.id\_product” ersetzt werden:&nbsp;[http://blog.php-function.de/prestashop-shopware-column-id\_product-in-order-clause-is-ambiguous/](http://blog.php-function.de/prestashop-shopware-column-id_product-in-order-clause-is-ambiguous/)
