Start a new topic

Shipping methods in the new Checkout Wizard

It seems that something have changed the time Shipments are created.

In a new cart going to checkout, I enter my delivery address and go to shipping methods. The select shipping methods are empty.

This is because my shipping methods evaluate the address in the Shipments in the ShippingEvaluationContext. But at this time there is no Shipment in the context.

If I go to next step (payments) and then go back to shipping methods, all is ok as the Shipment have been created and I can evaluate the address and "activate" my shipping method.

Is this a bug? It would be nice to have the shipping address available in the ShippingEvaluationContext as it was before the new checkout wizard.


It happened in new storefront 2.14?

Not sure when it happened as I went from 2.11 to current dev branch of yesterday.

Thanks, but it is still not working I think.

I am debugging the shipping module, and I see that now when I go from shipping address to shipment methods, it will enter the CalculateRates two times. The first time, there is no shipment. The second time, there IS a Shipment. But the form still does not show my shipment methods.

Which browser you use?

Could you try execute this GET request on your storefront http://localhost/storefront/Electronics/en-US/storefrontapi/cart/shipments/undefined/shippingmethods before go to checkout page? Should be return list of avail shipping methods?


Using this link:


I get the shipping method "Fixed rate shipping" in Json format.

And as expected I do not get my shipping methods, because I return "new ShippingRate[] { };" if there is not a valid country in the shipping address (from the ShippingEvaluationContext).


Can you show me your shipping method code?

Here is the file attached.


It might happen that you have in your shopping cart multiple shipments (it may caused in previous storefront version) and in your SpaPostenShippingMethod method IsActive property always return false. Could you create new shopping cart and check Shipping methods for it. (Open storefront in incognito mode and place item to cart)

Same happens in incognito mode. And I always finish the order/cart before trying again.

The problem is when is the Shipment added/persisted to the cart...

First time I go to shipping methods my methods is not in the list because no shipment with address existed in the ShippingEvalContext at that first time.

If I then press F5, I am returned to shipping address which is ok, then go to shipping methods, my methods appear. This is because the Shipment with address have been added to the cart.

So the first time I see the list of shipment methods it fails (dont show). After that it works.

That's what I'm exactly fix in my last commit. Could you ensure what you getting last code from storefront dev branch?

Yes, I can see the


in the source of the page.

I will have another review of this problem with one of my coworkers tomorrow, then I will contact you again with our results.

This issue have been resolved now by Eugeny in a commit to dev branch on Aug 3rd.


Login or Signup to post a comment