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 ShippingCartCalculatorSample 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 Calculator changes to retain previous selected delivery method @W-17966639 Calculator changes to retain previous selected delivery method Mar 17, 2025
@sf-anilpurohit
Copy link
Collaborator Author

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

Thanks!

@gurpreetsainisalesforce
Copy link
Collaborator

@sf-anilpurohit Please check if any additional tests are required for this change.

@wei-liu-sf
Copy link

@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.

Copy link
Collaborator

@sf-srinivas-vemula sf-srinivas-vemula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sf-srinivas-vemula
Copy link
Collaborator

@sf-anilpurohit Can you please close this PR?

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.

4 participants