Need to remove checkout summary step

vinod.agarwal
vinod.agarwal Spryker Solution Partner Posts: 12 🧑🏻‍🚀 - Cadet

Hi Team,

I am implementing a new payment method as credit card and I need to place order after payment page itself as per requirement.

So if there any tutorial available, how can I remove summary step and place order at payment page.

Answers

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,051 ⚖️ - Guardians (admin)

    Heyhey @vinod.agarwal ,

    currently I do not find any dedicated documentation for it.

    Let me try to guide you:

    Please override the method public function getSteps(): array of vendor/spryker-shop/checkout-page/src/SprykerShop/Yves/CheckoutPage/Process/StepFactory.php on project level.

    Also the method public function createStepFactory() in src/Pyz/Yves/CheckoutPage/CheckoutPageFactory.php needs to be adjusted. (it's actually a method from the parent which you need to override)

    Hope this helps :)

    All the best,

    Florian

  • vinod.agarwal
    vinod.agarwal Spryker Solution Partner Posts: 12 🧑🏻‍🚀 - Cadet

    Hi,

    Thanks for your reply.

    This option, I had already explored.
    just want to let you know that I am developing new module in vendor folder (as I need it in separate repo).

    So If I override SprykerShop\Yves\CheckoutPage\CheckoutPageFactory, it is not considering my implementation as it is giving preference to Pyz folder.

  • Alberto Reyer
    Alberto Reyer Posts: 690 🪐 - Explorer

    So If I override SprykerShop\Yves\CheckoutPage\CheckoutPageFactory, it
    is not considering my implementation as it is giving preference to Pyz
    folder.

    You need to register your module namespace in $config[KernelConstants::CORE_NAMESPACES].
    Be aware that your vendor module should not have Pyz as namespace but something else, as choosing the same namespace for your vendor modules and the project is impacting performance (or at least was a few years back).

    For your case you might take a look at https://github.com/spryker-eco/computop as an example to implement payment pages.
    For payment pages that you redirect too after the checkout you will also need a mechanism to pull the information if a payment succeeded or get this information pushed to Spryker.
    The second approach should be secured by a shared secret between you backend application and the payment provider to avoid getting payment confirmations from a different source.