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..
Hello together, I’m trying to implement a functionality where the prices for products are loaded fr
Hello together,
I’m trying to implement a functionality where the prices for products are loaded from an external API. I’m having some issues finding the logic where the related data is send to the frontend. Can anyone tell me what a good place to implement this behaviour would be?
Comments
-
Hi David, we've done a similar thing. We're not storing prices at all in spryker but load them at runtime from our erp. Is this what you're after?
0 -
Yes I think so. The prices are supposed to be loaded depending on the customer that is signed in.
0 -
It would be great if you could give me a starting point to implement this behavior
0 -
We implemented a dedicated client to handle these calls to the erp for us. So we did not override any existing module but built our own from scratch. This is then hooked up to an json endpoint which provides the prices (and some more, e.g. something like: if you order until 6pm you will get the delivery tomorrow morning). This endpoint is called via ajax from the browser, so that the site may be displayed even if the erp is responding slowly / not at all.
0 -
Ok thanks, I’ll give that a try
0 -
Hi @ULW0Z4150, you can check
\Spryker\Client\PriceProductStorage\PriceProductStorageClient
and\Spryker\Client\PriceProductStorage\Storage\PriceConcreteStorageReader
0 -
You can override this Price readers (for example replace Storage client
\Spryker\Client\PriceProductStorage\PriceProductStorageFactory::getStorage
with your own) and get prices from esternal source.0 -
Thank you I’ll take a look at that
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