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 all, I am extending the CheckoutPage module inside Yves and added the CheckoutPageFactory.php
Hello all,
I am extending the CheckoutPage module inside Yves and added the CheckoutPageFactory.php. But the CheckoutController is resolving CheckoutPageFactory from the vender
folder instead of the current folder. Any tips to fix this?
This is my CheckoutController.php code:
<?php namespace Pyz\Yves\CheckoutPage\Controller; use Pyz\Yves\CheckoutPage\Form\FormFactory; use SprykerShop\Yves\CheckoutPage\Controller\CheckoutController as SprykerShopCheckoutController; use Symfony\Component\HttpFoundation\Request; /** * @method \Pyz\Yves\CheckoutPage\CheckoutPageFactory getFactory() */ class CheckoutController extends SprykerShopCheckoutController { /** * @param Request $request * * @return mixed */ public function voucherAction(Request $request) { $checkoutFormFactory = $this->getFactory() // Gets the CheckoutPageFactory from the vendor/spryker/checkoutPage/src/Yves/... folder instead of the current module folder ->createCheckoutFormFactory(); $stepProcess = $this->createStepProcess(); $response = $stepProcess->process( $request, $checkoutFormFactory->createVoucherFormCollection() ); if (!is_array($response)) { return $response; } return $this->view( $response, $this->getFactory()->getCustomerPageWidgetPlugins(), '@CheckoutPage/views/voucher/voucher.twig' ); } }
Comments
-
looks correct actually. and your CheckoutPageFactory extends the one from vendor correctly and u added the
public function createCheckoutFormFactory(): FormFactory
method?0 -
class resolver cache maybe forgotten?
0 -
@UNGMX0012 @UL65CH0MC I had to delete the folder and pull again from the repository. Now it works.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 69 Spryker News
- 899 Developer Corner
- 760 Spryker Development
- 83 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 24 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