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 added a step in the checkout following this tutorial:
Hello all,
I added a step in the checkout following this tutorial: https://docs.spryker.com/docs/pbc/all/cart-and-checkout/tutorials-and-howtos/tutorial-checkout-and-step-engine.html#add-the-voucher-step
Everything works OK(ish) except I see breadcrumbs 2 times. Can someone please advise.
Comments
-
did u add the steps multiple times to your step collection maybe? can u show your StepFactory? would be my first guess
0 -
@UNGMX0012 Here is my StepFactory
<?php namespace Pyz\Yves\CheckoutPage\Process; use Pyz\Yves\CheckoutPage\Plugin\Router\CheckoutPageRouteProviderPlugin; use Pyz\Yves\CheckoutPage\Process\Steps\VoucherStep; use Spryker\Yves\StepEngine\Process\StepCollection; use Spryker\Yves\StepEngine\Process\StepCollectionInterface; use SprykerShop\Yves\CheckoutPage\Plugin\Router\CheckoutPageRouteProviderPlugin as CheckoutPageRouteProviderPluginAlias; use SprykerShop\Yves\CheckoutPage\Process\StepFactory as SprykerShopStepFactory; use SprykerShop\Yves\HomePage\Plugin\Router\HomePageRouteProviderPlugin; /** * @method \SprykerShop\Yves\CheckoutPage\CheckoutPageConfig getConfig() */ class StepFactory extends SprykerShopStepFactory { /** * @return StepCollectionInterface */ public function createStepCollection() { $stepCollection = new StepCollection( $this->getUrlGenerator(), CheckoutPageRouteProviderPluginAlias::ROUTE_NAME_CHECKOUT_ERROR ); $stepCollection ->addStep($this->createEntryStep()) ->addStep($this->createCustomerStep()) ->addStep($this->createAddressStep()) ->addStep($this->createShipmentStep()) ->addStep($this->createPaymentStep()) ->addStep($this->createVoucherStep()) ->addStep($this->createSummaryStep()) ->addStep($this->createPlaceOrderStep()) ->addStep($this->createSuccessStep()); return $stepCollection; } /** * @return VoucherStep */ public function createVoucherStep(): VoucherStep { return new VoucherStep( $this->getCalculationClient(), CheckoutPageRouteProviderPlugin::ROUTER_CHECKOUT_VOUCHER, HomePageRouteProviderPlugin::ROUTE_NAME_HOME ); } }
0 -
factory looks ok, can offer to have a look together
0 -
Hello @UNGMX0012, we figured this out. This is the updated code and it works:
<?php namespace Pyz\Yves\CheckoutPage\Process; use Pyz\Yves\CheckoutPage\Plugin\Router\CheckoutPageRouteProviderPlugin; use Pyz\Yves\CheckoutPage\Process\Steps\VoucherStep; use Spryker\Yves\StepEngine\Dependency\Step\StepInterface; use SprykerShop\Yves\CheckoutPage\Process\StepFactory as SprykerShopStepFactory; use SprykerShop\Yves\HomePage\Plugin\Router\HomePageRouteProviderPlugin; class StepFactory extends SprykerShopStepFactory { /** * @return array<StepInterface> */ public function getSteps(): array { return [ $this->createEntryStep(), $this->createCustomerStep(), $this->createAddressStep(), $this->createShipmentStep(), $this->createPaymentStep(), $this->createVoucherStep(), $this->createSummaryStep(), $this->createPlaceOrderStep(), $this->createSuccessStep(), $this->createErrorStep(), ]; } /** * @return VoucherStep */ public function createVoucherStep(): VoucherStep { return new VoucherStep( $this->getCalculationClient(), CheckoutPageRouteProviderPlugin::ROUTER_CHECKOUT_VOUCHER, HomePageRouteProviderPlugin::ROUTE_NAME_HOME ); } }
0 -
nice, yes we did it the same way using
getSteps()
. had this in mind already. glad u fixed it π0 -
so, outdated docu? π€
0 -
@UNGMX0012 Yes it seems like the documentation is outdated.
0 -
I created a pr to fix the outdated docu: https://github.com/spryker/spryker-docs/pull/1403
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
- 930 Developer Corner
- 788 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