-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Unable to set negative custom option fixed price in admin view. #7333
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
Comments
Thank you for reporting. Internal issue created: MAGETWO-60573 |
Hi @WaterSlide did you fix this issue? |
I am aware that editing the Magento core is a no-no, however I am pressed for time and needed a very quick fix. I'll be learning how to override things the proper way any day now.... A nice gentleman was kind enough to email me what he found:
The code speaks for itself. The isNegative will always return false. I am not sure what other implications there are for doing it this way, however I have tested that a negative value will still offset the price as intended. |
I have this issue as well! Needs to be solved in core Magento... thank you WaterSlide for the solution for now. :-) |
I need this also |
@WaterSlide I tried your solution but it still give me "Invalid option value" error when I try to set negative price to some custom option. |
@WaterSlide Thanks alot. Its really works for me. |
Any news on a fix for this issue? |
1 similar comment
Any news on a fix for this issue? |
Thanks @WaterSlide for the quick fix! Having one last cosmetic issue, the frontend still shows a + sign before the -. Anyone knows how to remove it? |
@WaterSlide, thank you for your report. |
Thanks for the fix. It works on Radio, but Drop Down adds a +- in front of the number. I really hope this gets fixed soon. I have 2 sites to migrate after the holidays that depend on it. |
I'm running M 2.2.1. This remains an issue. We need to be able to set a negative value for price in the product's "customizable options" section. What is the progress on MAGETWO-60573?... or should I use this solution below?
|
I've created a pull request for this issue, for future releases. In case you run into this, here is a fix for 2.1.x (tested on 2.1.9): https://github.com/luckyduck/negative-option-value It also solves the cosmetic frontend issue, where negative option values have a plus sign as prefix (like +-3,50) |
Fixed issues: - MAGETWO-90496: Countries from default website set when edit order address - MAGETWO-90999: Bundle Product not appears in catalog after import - MAGETWO-60573: [GITHUB] Custom option price field disallows negative values #7333
I tried to use Luckyduck's module on Magento 2.2.5 but this caused a problem in the Admin backend where under Customisable Options there would be no boxes to enter $ values. To fix this, I edited: Modify from line 25 onwards:
|
Hi @WaterSlide This issue is now fixed and it's expected to be delivered with the upcoming 2.2.6 release. Meanwhile, you may use this commit as a reference 8d4124c Thanks |
…d price in admin view. #15267
In versions 2.1.1 and 2.1.2, setting custom options for a product with fix price settings will not allow a negative value. I'm not sure if this is a simple ui problem or if there is a validator issue. Either way, this was always an option in Magento 1.x in which you can set discounts on an item via custom option. Uploading values via CSV works correctly, however making admin view changes for given product will fail validation via negative values.
Preconditions
Steps to reproduce
Expected result
Actual result
The text was updated successfully, but these errors were encountered: