Closed reginabally closed 2 years ago
Looked into this and it looks like the behavior is like this in core:
For comparison, in app:
So in other words it seems like:
something will change it to empty during transition from Price editing screen to Product detail screen.
Traced down this behavior to this line in PriceUtils:
Where a zero value is equal to isNotSet
:
This was mentioned in an app review:
An urgent request: accept 0 as price entry. If I manage a product via the app that should be free, I enter 0 or 0.00 and it is NOT considered as entering a number (0€) but as NO ENTRY (no price defined). This removes the option to put the product in the shopping cart on the shop page!
Date of review: Feb 21, 2022 Device: Samsung Galaxy A12 App version name: 8.4.1 Android version: Android 11 (SDK 30)
I tested again using the latest android and iOS apps and this is still happening only in Android. I seem to remember a similar issue happening when Products was first released so I searched and found this issue. I'll work on this one tomorrow and open a PR, hopefully before this sprint ends 😅
Thanks for working on this @anitaa1990, I was planning on working on it later since this PR is merged, but you beat me to it 🙏 💯.
I'll prepare an additional small PR next week to migrate back to WCMaterialOutlinedCurrencyEditTextView
as it handles the currency prefix/suffix correctly now by itself, and this would allow removing this logic from the ViewModel/Fragment.
Describe the bug
It was reported in 3689003-zen that if a product was created or edited on the WCAndroid app and set the price to 0, the product shows the "Read More" button on the Shop page instead of "Add to Cart".
I was able to reproduce this on WCAndroid but not on WCiOS.
To Reproduce Steps to reproduce the behavior:
Sample Shop page: https://woo20200908.mystagingwebsite.com/product-category/uncategorized/
Sample product page: https://woo20200908.mystagingwebsite.com/product/free-product/
Expected behavior
I would expect the app to allow me to set the product price to 0 so it can be added to the cart as a free product.
Sample product page with $0 price that can be added to the cart: https://woo20200908.mystagingwebsite.com/product/test-free-product/
Isolating the problem (mark completed items with an [x]):
Mobile Environment Please include:
WordPress Environment