findologic / plugin-shopware-5

Findologic DI+API plugin for Shopware 5
https://store.shopware.com/en/fin1848466805161f/findologic-search-navigation-platform.html
1 stars 3 forks source link

Export is not working with struct #84

Closed Weegy closed 6 years ago

Weegy commented 6 years ago

ubuntu@ip-172-31-2-144:/var/www/html/FischKalterShopware$ php bin/console findologic:export 0F9A2C38EFC1BE2DC3923176A0477208
Starting export Data to Findologic XML
 0/1 [>---------------------------]   0%PHP Fatal error:  Call to a member function getId() on null in /var/www/html/FischKalterShopware/engine/Shopware/Bundle/StoreFrontBundle/Service/Core/ContextService.php on line 249
PHP Stack trace:
PHP   1. {main}() /var/www/html/FischKalterShopware/bin/console:0
PHP   2. Symfony\Component\Console\Application->run() /var/www/html/FischKalterShopware/bin/console:38
PHP   3. Shopware\Components\Console\Application->doRun() /var/www/html/FischKalterShopware/vendor/symfony/console/Application.php:117
PHP   4. Symfony\Component\Console\Application->doRun() /var/www/html/FischKalterShopware/engine/Shopware/Components/Console/Application.php:127
PHP   5. Shopware\Components\Console\Application->doRunCommand() /var/www/html/FischKalterShopware/vendor/symfony/console/Application.php:193
PHP   6. Symfony\Component\Console\Application->doRunCommand() /var/www/html/FischKalterShopware/engine/Shopware/Components/Console/Application.php:135
PHP   7. Symfony\Component\Console\Command\Command->run() /var/www/html/FischKalterShopware/vendor/symfony/console/Application.php:843
PHP   8. FinSearchUnified\Commands\ExportCommand->execute() /var/www/html/FischKalterShopware/vendor/symfony/console/Command/Command.php:242
PHP   9. FinSearchUnified\ShopwareProcess->getFindologicXml() /var/www/html/FischKalterShopware/custom/plugins/FinSearchUnified/Commands/ExportCommand.php:34
PHP  10. FinSearchUnified\ShopwareProcess->getAllProductsAsXmlArray() /var/www/html/FischKalterShopware/custom/plugins/FinSearchUnified/ShopwareProcess.php:172
PHP  11. FinSearchUnified\BusinessLogic\FindologicArticleFactory->create() /var/www/html/FischKalterShopware/custom/plugins/FinSearchUnified/ShopwareProcess.php:154
PHP  12. FinSearchUnified\BusinessLogic\Models\FindologicArticleModel->__construct() /var/www/html/FischKalterShopware/custom/plugins/FinSearchUnified/BusinessLogic/FindologicArticleFactory.php:25
PHP  13. FinSearchUnified\BusinessLogic\Models\FindologicArticleModel->setUpStruct() /var/www/html/FischKalterShopware/custom/plugins/FinSearchUnified/BusinessLogic/Models/FindologicArticleModel.php:124
PHP  14. Shopware\Bundle\StoreFrontBundle\Service\Core\ContextService->getShopContext() /var/www/html/FischKalterShopware/custom/plugins/FinSearchUnified/BusinessLogic/Models/FindologicArticleModel.php:154
PHP  15. Shopware\Bundle\StoreFrontBundle\Service\Core\ContextService->initializeShopContext() /var/www/html/FischKalterShopware/engine/Shopware/Bundle/StoreFrontBundle/Service/Core/ContextService.php:122
PHP  16. Shopware\Bundle\StoreFrontBundle\Service\Core\ContextService->getStoreFrontShopId() /var/www/html/FischKalterShopware/engine/Shopware/Bundle/StoreFrontBundle/Service/Core/ContextService.php:135
Weegy commented 6 years ago

Setting the shop ressources


 $configValue = Shopware()->Models()->getRepository('Shopware\Models\Config\Value')->findOneBy(['value' => $this->shopKey]);
        $this->shop = $configValue ? $configValue->getShop() : null;

        $this->shop->registerResources();