Carrier fee not editable
There’s also a workaround: save the carrier without that number, open it again and find the field editable.
Its interesting that this does not show up for me. I have 7 carriers now and had no problems with any of them.
Once a carrier is saved, things work a whole lot better.
For example, that single checkbox above the row with Africa means to be a row for “All”. Initially, the word “All” is written there. Checking one of the other rows makes this word going away. Clicking the “All” checkbox makes it re-appear, and also a price entry field.
When editing an existing carrier all this doesn’t happen. This smells a lot like overengineered code or lots of quick patches on top once reliable code. The obvious first step is to find and remove the distinction between a new and an existing carrier.
After digging into the code I found the secret: one has to fill in the price/weight range (these fields with grey background) first. Having these two filled in, such a range becomes “active” (an invisible property) and once a range is “active”, one can start to enter fees. That’s why it worked for some, but not for others. If one starts to fill the fields top to bottom, it works. Not so in any other order.
I consider this as overengineering. A user should be allowed to fill fields in any order (s)he likes.
Actually I thought one could leave the upper range value empty to get “infinite”. If infinite was allowed, one could even remove this “Out-of-range behavior” choice, because one can define ranges which can’t go out of range, then. Lots of opportunities to make the user interface more intuitive.
That said, I think I’ll remove this “active” status thing and then move on. There are bigger goals waiting
I think perhaps it is a good security measure for not nerds. To be sure you don’t forget the range and end up with losing money. I can see both sides of it
It’s really just about the order of entries. Validation still happens before one can switch to the next page, so entering invalid stuff is still impossible.
5 days of hacking later there are 24 new commits and 260 lines of code gone. Works better than ever, e.g. the markup once visible on the summary page is gone:
If you want to try this, here’s an upgrade package:
And in case it doesn’t work and you have no backup, here are the same files in the original version:
In both cases, unpack them elsewhere and rename folder ‘admin-dev’ to the name of your actual admin folder. Then replace the files, paths are given in the ZIP.
I’m pretty sure that validation was improved. Also, one can no longer save invalid data by just clicking ‘Finish’ when editing an existing carrier. One can edit fields in any order, validation happens when clicking ‘Next’ or ‘Finish’. Invalid fields get highlighted. Fields for ‘All’ no longer vanish in some situations. And there are two (useful) easter eggs built in. Enjoy!
Now it’s your turn to show how to fool this wizard. I no longer can, even when trying hard
Works. Thank You!
All 24 commits of mine were just moved to Git master. Thanks, @mdekker and thanks, @Havouza, for testing it.