Skip to content

Conversation

@sf-anilpurohit
Copy link
Collaborator

@sf-anilpurohit sf-anilpurohit commented Mar 11, 2025

What does this PR do?

In This PR we have changed Apex sample code for B2CDeliveryService to retain previously selected delivery method when we retrigger shipping calculation from buyer flow.

What issues does this PR fix or reference?

#, @@
@W-17966639

Functionality Before

<insert gif and/or summary>
Earlier we were not retaining previously selected delivery method and it was always getting clear then buyer need to select again if he change the delivery address.

Functionality After

<insert gif and/or summary>
Now we are retaining previously selected delivery method and it wont clear if buyer change the delivery address.

How to Test/Testing Effort

<insert gif and/or summary>
by placing order in checkout flow by selecting one of CDGM and changing the address we can test it.

@sf-anilpurohit sf-anilpurohit changed the title T/commerce/w 17966639 @W-17966639 B2C DeliveryService apex code changes Mar 17, 2025
@sf-anilpurohit
Copy link
Collaborator Author

Hi @tarcang @snilakandan13
Please have a look at my PR

Thanks!

@gurpreetsainisalesforce
Copy link
Contributor

@sf-anilpurohit Can you please check if you need any additional tests for this scenario?

@sf-anilpurohit
Copy link
Collaborator Author

@gurpreetsainisalesforce
I have update UT for this class, FT is already in place.

@wei-liu-sf
Copy link
Collaborator

@sf-anilpurohit I have a general concern regarding this work — I always think that we should keep our sample code simple and easy to understand. In the past, I have seen multiple customers misused/misunderstood our sample code. It’s unnecessarily long and complicated. Also, sample code is not for production usage, if our partners/customers want extra business logic implemented, they can do it on top of sample code. I am afraid that, by making the sample code longer and more complicated, it doesn’t serve the purpose of sample code well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants