Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Edgar Rasquin 326 posts 925 karma points
    Dec 03, 2021 @ 11:05
    Edgar Rasquin
    0

    Failed to save shipping method Shipping

    Hi Matt,

    I just tried to temporarily disable a country in the shipping options. When I save, I get the following error:

    Failed to save shipping method Shipping: You can't add a Price for a County the Shipping Method is now allowed in.

    What am I doing wrong?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Dec 03, 2021 @ 11:48
    Matt Brailsford
    0

    Hi Edgar,

    Hmm, my guess is that maybe you also have a custom price defined for the country you are removing. The prices and countries list are stored separately so maybe we aren't taking into account when you remove a country, it should also remove any prices.

    Could you see if you have any custom prices defined for that country and if so, does clearing the prices then allow you to remove the country?

    Matt

  • Edgar Rasquin 326 posts 925 karma points
    Dec 03, 2021 @ 12:31
    Edgar Rasquin
    0

    Now it worked. After I tried clearing the custom prices I refreshed everything (settings). Than I removed the Default Shipping Method in those countries (dont know whether that makes a difference?) but than it worked.

    Thanks

  • Edgar Rasquin 326 posts 925 karma points
    Dec 03, 2021 @ 12:25
    Edgar Rasquin
    0

    Yes, I have custom prices in those countries. Clearing them does not solve the error.

    I also cannot just delete the country.

    Can you think of another way of temporary hiding these countries in shipping?

  • Edgar Rasquin 326 posts 925 karma points
    Dec 03, 2021 @ 12:39
    Edgar Rasquin
    0

    Unfortunaltely, now I get an error in /checkout/shipping-method/ when I choose one of those countries in Billing (here they still appear):

    Sequence contains no elements
    Exception Details: System.InvalidOperationException: Sequence contains no elements
    Line 16:     var currentShippingMethodId = currentOrder.ShippingInfo.ShippingMethodId.HasValue
    
Please Sign in or register to post replies

Write your reply to:

Draft