Copied to clipboard

Flag this post as spam?

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


  • Arjan Woldring 118 posts 224 karma points
    Aug 14, 2017 @ 19:41
    Arjan Woldring
    0

    Shipping address resets to previous version in Fasttrack

    Hi guys,

    I have a problem that the Shipping address won't update.

    This problem is with the regular Fasttrack implementation. Which I can't figure out why it happens.

    Please let me explain the steps:

    1. Be sure to checkout anonymous
    2. Fill in Billing address -> be sure to check "Use for shipping" -> click next
    3. You are in the 'Ship Rate Quote' page. Now you decide that you need a different SHIPPING address. Click on the 'back' button.
    4. Change (some) address information -> click next
    5. Now you see that the shipping address did change
    6. Click next. Now you see that the Shipping address reverted back to the old one.

    Somehow the shipping address gets lost... I'm using the latest merchello+fasttrack and also have this while debugging the merchello core.

    Does anybody know how to fix this? I've been debugging for hours now....

    Any suggestions are welcome! Cheers, Arjan

  • suzyb 458 posts 864 karma points
    May 04, 2018 @ 22:59
    suzyb
    1

    For anyone else coming across this thread.

    We had this issue come up on our site and after debugging found it was due to the shipment data being pulled from the cache.

    The following line pulls the shipping rate quote from the cache. If that already has a destination address because you've passed the Ship Rate Quote stage, setting the address, then gone back it uses the address from the cached item rather than the new one entered.

    https://github.com/Merchello/Merchello/blob/26475ff0b4184137c940fe1a23ba21492f7a8345/src/Merchello.Core/Gateways/Shipping/DefaultShipmentRateQuoteStrategy.cs#L51

    To resolve it you just need to override the SaveShipRateQuote method (I just copied the code from the base method) but set the tryGetCached parameter to false.

    var quoteModel = CheckoutShipRateQuoteFactory.Create(Basket, shippingAddress, false);
    

    Hope this helps anyone else finding this thread while searching for info about this issue.

  • Arjan Woldring 118 posts 224 karma points
    May 05, 2018 @ 09:15
    Arjan Woldring
    0

    Hi suzyb,

    Thank you for taking the time to write your findings down!

    You are very right about the caching issue and for now this can be solved the way you said.

    There are more Cache-issues in Merchello. Lee did a massive commit on fixing many cache issues. It's only not released yet. Once it is, it will fix this issue too.

    Thanks again! Arjan

Please Sign in or register to post replies

Write your reply to:

Draft