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 there. I'm trying to add a custom step to the Yves Checkout Page. I have my step ready (implement
Hi there. I'm trying to add a custom step to the Yves Checkout Page. I have my step ready (implemented the right interfaces and extended the quote transfer, created twig templates and forms, etc). However, I'm having issues wiring up everything together. For instance, the standard steps are created here, and passed to the step resolver here. Is there a way I can override this and insert my custom step before the Payment Step?
My guess is to extend and override the StepFactory
under the Process
folder. Can be that done in the Pyz
folder under src
? I'm asking because this factory is outside the traditional location (root of the module), and invoked by the main factory here, so that's why I'm a bit confused.
I hope that was clear enough. Any help would be greatly appreciated! π
Comments
-
Hi, just extend CheckoutPageFactory in Pyz/Yves/CheckoutPage and override
/** * @return \Pyz\Yves\CheckoutPage\Process\StepFactory */ public function createStepFactory(): StepFactory { return new StepFactory(); }
0 -
Oh okay cool, and I can then extend that
StepFactory
or implement my own. Thanks! π0 -
sure
0 -
there was a similar thread days ago which is also pointing to the (outdated) docu and how he solved it: https://sprykercommunity.slack.com/archives/CKJRJM5FG/p1669219555825659 β¦ maybe helps
0 -
Thanks! I'll have a look!
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 βοΈ - Guardians (admin)
actually i am currently updating exactly that docu based on the feedback. hopefully it is online next week π
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 βοΈ - Guardians (admin)
(taking Sebastians PR and fix also all the other parts which are outdated)
0 -
Thank you guys. I've made it work now.
It would be cool to document a way of doing it without using too much inheritance. Obviously there is a ton of functionality that need to be reused in checkout (forms, step engine, router, etc) so I would not know how.
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