Use Data Exchange Api to create a product - page_search entries missing
Hello,
I'm currently trying to import products via the Data Exchange Api. I'm using this list of requests to create the product abstract and the one concrete:
- POST /dynamic-entity/product-abstracts
- POST /dynamic-entity/products
- POST /dynamic-entity/product-abstract-localized-attributes
- POST /dynamic-entity/product-localized-attributes
- POST /dynamic-entity/product-abstract-stores
- POST /dynamic-entity/product-categories
- POST /dynamic-entity/availability-abstracts
- POST /dynamic-entity/availabilities
- POST /dynamic-entity/stock-products
- POST /dynamic-entity/product-searches
- POST /dynamic-entity/price-products
- POST /dynamic-entity/price-product-stores
- POST /dynamic-entity/price-product-defaults
When I have a look at the data in the backoffice everything seems to be ok. However the product is not displayed in the storefront because the entries in the tables spy_product_abstract_page_search and spy_product_concrete_page_search are missing.
If I trigger a 'console publish:trigger-events' or save the product in the backoffice again the entires are there.
Has anybody encountered something similiar? Are there any events that are missing when using the Data Exchange Api or does the order of the requests matter?
Answers
-
Good morning @LukasB!
Just as a sanity check, did you tryconsole sync:data?
Also, are queues empty in rabbit? (no exceptions in the search queues?)
Are the products marked as searchable?1 -
Good morning @victor.vanherpt!
Thanks for your answer. Yes I also tried
console sync:data
but that doesn't yield any result.I also got no entries in any queues/ error queues in RabbitMQ.
And yes, the concrete product is marked as searchable.
0 -
ah, it was worth checking the low hanging fruit :)
Good luck, I would be interested to see some comment if you find a solution1 -
In 5+ horrible years of product import I can say for sure: No trigger no P&S 😂
You can implement a check on spy_product to see which product was updated and then get concrete/abstract id in order to run trigger-events with -r product-concrete/product-abstract and —ids/i.
Best one is
vendor/bin/console publish:trigger-events -r product_configuration,product_abstract_category,url,product_concrete,product_abstract,availability
REALLY, don´t try to work around, it will always have a sideeffect which will get you nuts 🤣
1 -
Thanks @Fred Jung! I was hoping not to run any
publish:trigger-events
commands because the events are fired already when the table is filled within the data exchange api request1
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 65 Spryker News
- 879 Developer Corner
- 743 Spryker Development
- 84 Spryker Dev Environment
- 360 Spryker Releases
- 3 Oryx frontend framework
- 33 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 22 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
- 68 Spryker Safari Questions
- 50 Random