What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi, I have a question about the Bootcamp, section "Content & Search - Attribute Car Based Catalo
Hi,
I have a question about the Bootcamp, section "Content & Search - Attribute Car Based Catalog Personalization - Challenge".
I created the CatalogFactory
in Pyz\Client\Catalog
with the getCartClient
function. In the class "AttributeCartBasedBoostingQueryExpanderPlugin
" I cannot access the getCartClient
function.
The Spryker NS CatalogFactory
is used here. did I forgot something?
Comments
-
hi
0 -
π€
0 -
let me have a quick look
0 -
did you try to run it?
0 -
but that is only a hint for the ide for auto completion. it should still work as intended
0 -
if you add
/** * @method \Pyz\Client\Catalog\CatalogFactory getFactory() */
0 -
above the query expander class, the ide should give you the autocompletion
0 -
thanks for your investigation. the "IDE hint" was already added. With this i get no errors in my ide but if I call the url where the AttributeCartBasedBoostingQueryExpanderPlugin is executed i get this exception:
Call to undefined method Spryker\Client\Catalog\CatalogFactory::getCartClient()
0 -
maybe the stacktrace is helpful
#0 /data/shop/development/current/vendor/spryker/search/src/Spryker/Client/Search/SearchClient.php(50): Pyz\Client\Catalog\Plugin\Elasticsearch\QueryExpander\AttributeCartBasedBoostingQueryExpanderPlugin->expandQuery(Object(Spryker\Client\Catalog\Plugin\Elasticsearch\Query\ProductCatalogSearchQueryPlugin), Array) #1 /data/shop/development/current/vendor/spryker/catalog/src/Spryker/Client/Catalog/CatalogClient.php(39): Spryker\Client\Search\SearchClient->expandQuery(Object(Spryker\Client\Catalog\Plugin\Elasticsearch\Query\ProductCatalogSearchQueryPlugin), Array, Array) #2 /data/shop/development/current/vendor/spryker-shop/catalog-page/src/SprykerShop/Yves/CatalogPage/Dependency/Client/CatalogPageToCatalogClientBridge.php(36): Spryker\Client\Catalog\CatalogClient->catalogSearch('', Array) #3 /data/shop/development/current/vendor/spryker-shop/catalog-page/src/SprykerShop/Yves/CatalogPage/Controller/CatalogController.php(76): SprykerShop\Yves\CatalogPage\Dependency\Client\CatalogPageToCatalogClientBridge->catalogSearch('', Array) #4 /data/shop/development/current/vendor/spryker-shop/catalog-page/src/SprykerShop/Yves/CatalogPage/Controller/CatalogController.php(46): SprykerShop\Yves\CatalogPage\Controller\CatalogController->executeIndexAction(Array, 13, Object(Symfony\Component\HttpFoundation\Request)) #5 /data/shop/development/current/vendor/symfony/http-kernel/HttpKernel.php(158): SprykerShop\Yves\CatalogPage\Controller\CatalogController->indexAction(Array, Object(Symfony\Component\HttpFoundation\Request)) #6 /data/shop/development/current/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #7 /data/shop/development/current/vendor/spryker/application/src/Spryker/Shared/Application/Application.php(132): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #8 /data/shop/development/current/vendor/spryker/application/src/Spryker/Shared/Application/Application.php(110): Spryker\Shared\Application\Application->handle(Object(Symfony\Component\HttpFoundation\Request)) #9 /data/shop/development/current/public/Yves/index.php(22): Spryker\Shared\Application\Application->run() #10 {main}
0 -
well, as you can see it tries to get it from the core factory
0 -
so you extended factory might have a wrong name/namespace
0 -
can you please check here?
0 -
i created the factory with the namespace "Pyz\Client\Catalog" that should match or i am wrong?
0 -
that is correct
0 -
can you send a screenshot of the top of the class
0 -
and extend the class "Spryker\Client\Catalog\CatalogFactory"
0 -
and maybe of the relevant project file tree
0 -
looks correct at first glance. let me try to reconstruct. might take a moment
0 -
no problem, thank you. its not a blocker... for now i have added the 2 methods to the spryker/client/catalog factory. . i know this is not the correct way π
0 -
ok, in my b2c it works like a charm. (apart from the sorting having no effect π€)
0 -
(side note: running the funciton score query in isolation works as intended)
0 -
i will try to set this up with b2b now
0 -
you are working with b2b, right @U01ALHKK517?
0 -
yes, i have the current b2b (202009)
0 -
oh yes I noticed that too (no sorting). I think in some cases the attribute in the elastic search is not color but "farbe". At least that's what I discovered when I debugged the ES response.
0 -
thanks for the hint. i will ahve to check that later
0 -
still canβt reproduce
0 -
can you show me the above dependency provider, @U01ALHKK517 ?
0 -
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random