richardhaeser-com / sw-tweakwise

Shopware 6 extension to connect your webshop with Tweakwise
https://www.richardhaeser.com
3 stars 3 forks source link

Pricing issue #36

Closed robbertdesmit closed 8 months ago

robbertdesmit commented 8 months ago

Running the commandline tool : tweakwise:generate-feed. stops because of a error.

Pricing object in the function getLowestAndHighestPrice in file FeedService.php is null there is no validate validation

------ trace ----

Call to a member function getPrice() on null

In FeedService.php line 465:

[Error]
Call to a member function getPrice() on null

`"exception" => ErrorException {

message: "User Deprecated: The "Shopware\Core\Framework\DataAbstractionLayer\Search\EntitySearchResult" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Shopware\Core\Content\Product\SalesChannel\Listing\ProductListingResult"."

#code: 0
#file: "./vendor/symfony/error-handler/DebugClassLoader.php"
#line: 330
#severity: E_USER_DEPRECATED
trace: {
  ./vendor/symfony/error-handler/DebugClassLoader.php:330 { …}
  ./custom/plugins/sw-tweakwise-2.6.0/src/Service/FeedService.php:210 {
    RH\Tweakwise\Service\FeedService->generateItems(FeedEntity $feed)^
    › /** @var ProductListingResult $result */
    › while (($result = $this->loadProducts($criteria, $salesChannelContext)) !== null) {
    ›     $this->renderProducts($result->getElements(), $salesChannelDomain, $feed, $salesChannelContext);
  }
  ./custom/plugins/sw-tweakwise-2.6.0/src/Service/FeedService.php:127 { …}
  ./custom/plugins/sw-tweakwise-2.6.0/src/Command/GenerateFeedCommand.php:53 { …}
  ./vendor/symfony/console/Command/Command.php:298 { …}
  ./vendor/symfony/console/Application.php:1058 { …}
  ./vendor/symfony/framework-bundle/Console/Application.php:96 { …}
  ./vendor/symfony/console/Application.php:301 { …}
  ./vendor/symfony/framework-bundle/Console/Application.php:82 { …}
  ./vendor/symfony/console/Application.php:171 { …}
  ./bin/console:77 { …}
}

} ]

Exception trace: at /data/web/application/shopware6/custom/plugins/sw-tweakwise-2.6.0/src/Service/FeedService.php:465 RH\Tweakwise\Service\FeedService->getLowestAndHighestPrice() at /data/web/application/shopware6/custom/plugins/sw-tweakwise-2.6.0/src/Service/FeedService.php:385 RH\Tweakwise\Service\FeedService->renderProducts() at /data/web/application/shopware6/custom/plugins/sw-tweakwise-2.6.0/src/Service/FeedService.php:211 RH\Tweakwise\Service\FeedService->generateItems() at /data/web/application/shopware6/custom/plugins/sw-tweakwise-2.6.0/src/Service/FeedService.php:127 RH\Tweakwise\Service\FeedService->generateFeed() at /data/web/application/shopware6/custom/plugins/sw-tweakwise-2.6.0/src/Command/GenerateFeedCommand.php:53 RH\Tweakwise\Command\GenerateFeedCommand->execute() at /data/web/application/shopware6/vendor/symfony/console/Command/Command.php:298 Symfony\Component\Console\Command\Command->run() at /data/web/application/shopware6/vendor/symfony/console/Application.php:1058 Symfony\Component\Console\Application->doRunCommand() at /data/web/application/shopware6/vendor/symfony/framework-bundle/Console/Application.php:96 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /data/web/application/shopware6/vendor/symfony/console/Application.php:301 Symfony\Component\Console\Application->doRun() at /data/web/application/shopware6/vendor/symfony/framework-bundle/Console/Application.php:82 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /data/web/application/shopware6/vendor/symfony/console/Application.php:171 Symfony\Component\Console\Application->run() at /data/web/application/shopware6/bin/console:77`