Remove shipping method step from the Checkout

dipen.vyas
dipen.vyas Spryker Solution Partner Posts: 7 🧑🏻‍🚀 - Cadet

I have some digital products and I want to remove shipping step from the checkout completely.I tried to remove it and noticed it's breaking some other functionalities on the checkout.

Is there any product configuration that I can use for my product that remove the shipping step from the checkout? If removing from the code is the only way, can someone guide me what's the best way to do this without breaking anything?

Comments

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 110 ⚖️ - Guardians (admin)

    Hi,
    Have you taken a look at this post?
    https://forum.commercequest.space/discussion/comment/28919#Comment_28919
    please: let us know what errors you get when removing the step

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 110 ⚖️ - Guardians (admin)

    In the previous example you can see how to override the StepFactory to remove the shipment steps.
    You have to also override the SummaryStep creation and the summarystep to remove the shipment logic.
    Remove also the Shipment state from your state machine

  • dipen.vyas
    dipen.vyas Spryker Solution Partner Posts: 7 🧑🏻‍🚀 - Cadet

    Thanks! I will give it a try again.

  • creilly
    creilly Spryker Customer Posts: 2 🧑🏻‍🚀 - Cadet

    It is also possible to add a no-cost shipping method specific to those products using an availability plugin. While this doesn't remove the shipment step it can achieve the same goal of not charging for shipping.

  • dipen.vyas
    dipen.vyas Spryker Solution Partner Posts: 7 🧑🏻‍🚀 - Cadet

    @creilly Thanks for your reply. We are selling digital products. so I think removing or hiding the shipping step is the best approach.

    Can you please explain me how no-cost shipping method can be used? What changes I need to do?

  • creilly
    creilly Spryker Customer Posts: 2 🧑🏻‍🚀 - Cadet

    Hey @dipen.vyas, if you are only selling digital products (and therefore all products will use one no-cost method) simply go into the back office Administration→Delivery Methods→edit→set price and tax to 0.

    However if you have to implement multiple shipping methods and want the no-cost method to only show for digital products and not physical ones, you will have to create an availibility plugin. That will have to extend Spryker\Zed\Kernel\Communication\AbstractPlugin and implement Spryker\Zed\ShipmentExtension\Dependency\Plugin\ShipmentMethodAvailabilityPluginInterface. You can then add it to src/Pyz/Shipment/ShipmentDependencyProvider.php::getAvailabilityPlugins() and then use it in the back office