-
Notifications
You must be signed in to change notification settings - Fork 121
[Woo POS] Coupons: Provide coupons to ItemList (happy path) #15417
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
Conversation
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Works well. 👍 And I like that the required changes with the Item list and aggregate model are much smallethanat I anticipated. At least for now.
I found one weird issue, though. It's most likely unrelated to this but could be related to my work on applying coupons or maybe it's some older issue.
Even though I only have one product in a cart, we send request with two products and it fails because such product doesn't exist:
This is a POSProductForRemoval:
I'm not yet sure what is is. I'll check now. [Woo POS] Coupons: Investigate adding invalid coupon and removing it keeps order in error state · Issue #15426 · woocommerce/woocommerce-ios
| Button(action: { | ||
| posModel.addToCart(item) | ||
| }, label: { | ||
| CouponRowView(couponItem: .init(id: coupon.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Great to see both list and cart functionality integrating so easily 👍
Closes: #15416
Description
This PR provides a first step for providing coupons from the service/controller to be rendered in the
ItemListview, as well as an initial test suite for the coupons controller.At the moment we only handle loading the first page of coupons on a happy path (the store has to have coupons). Unhappy paths/pagination/reload have not been handled yet.
Screen.Recording.2025-03-26.at.12.22.33.mov
Testing information
In a POS store, with coupons created:
CouponRowViewand can be added to the cartRELEASE-NOTES.txtif necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: