Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [CM-607][Sale Widget] Get order config from product skus + qty #1749

Merged
merged 13 commits into from
May 14, 2024

Conversation

jhesgodi
Copy link
Contributor

@jhesgodi jhesgodi commented May 8, 2024

Summary

Improve how primary sales widget gets the quote and configurations for an order. Instead of the widget knowing which amount needs to be paid, it can now instead pass the items sku & qty to the /client-config service, and it will be able to return a response with by item amounts and total amounts including conversions.

BREAKING CHANGE:
Requires customers to implement new Quotes endpoint

Screenshots

Before:
Screenshot 2024-05-09 at 11 18 29 AM

After: Multi item with correct pricing conversion
Screenshot 2024-05-08 at 1 39 15 PM

Detail and impact of the change

Added

  • Able to list multiple products multiple currency
  • Able to quote a price by having the items sku and qty

Changed

  • No longer required to be initialised with the amount param

Removed

  • amount param

Fixed

  • Item pricing is display correct in the settlement currency selected by customer

@jhesgodi jhesgodi force-pushed the feat/CM-607-client-config-quote-from-items branch from 25ec148 to 54b7aaf Compare May 8, 2024 02:31
@jhesgodi jhesgodi changed the title remove amount param feat: [CM-607][Sale Widget] Get order config from product skus + qty May 9, 2024
@jhesgodi jhesgodi marked this pull request as ready for review May 9, 2024 02:16
@jhesgodi jhesgodi requested a review from a team as a code owner May 9, 2024 02:16
tokenAddress,
}: UseSmartCheckoutInput) => {
const amount = '0';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please ignore this patch
The entire hook gets remove in next PR as is not longer required for multi currency flow.

jwhardwick
jwhardwick previously approved these changes May 9, 2024
Copy link
Contributor

@jwhardwick jwhardwick left a comment

Choose a reason for hiding this comment

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

Looks good 🔥

@jhesgodi jhesgodi requested review from jwhardwick, dreamoftrees, luads and mimi-imtbl and removed request for jwhardwick May 13, 2024 05:42
luads
luads previously approved these changes May 13, 2024
dreamoftrees
dreamoftrees previously approved these changes May 13, 2024
Copy link
Contributor

@dreamoftrees dreamoftrees left a comment

Choose a reason for hiding this comment

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

Great work @jhesgodi

mimi-imtbl
mimi-imtbl previously approved these changes May 14, 2024
@jhesgodi jhesgodi enabled auto-merge May 14, 2024 02:24
jwhardwick
jwhardwick previously approved these changes May 14, 2024
@jhesgodi jhesgodi requested a review from luads May 14, 2024 04:11
luads
luads previously approved these changes May 14, 2024
@jhesgodi jhesgodi disabled auto-merge May 14, 2024 04:40
@jhesgodi jhesgodi enabled auto-merge May 14, 2024 04:40
@jhesgodi jhesgodi added this pull request to the merge queue May 14, 2024
Copy link
Contributor

@dreamoftrees dreamoftrees left a comment

Choose a reason for hiding this comment

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

👍

Merged via the queue into main with commit 42eced8 May 14, 2024
11 checks passed
@jhesgodi jhesgodi deleted the feat/CM-607-client-config-quote-from-items branch May 14, 2024 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants