Jump to content
thirty bees forum
  • 0

Carrier fee not editable


Traumflug

Question

0_1492167601864_Bildschirmfoto am 2017-04-14 um 12.42.37-fullpage.png

When adding a second (third, fourth, ...) carrier one can enable a zone by clicking the related checkbox, but doing so doesn't enable the price entry field. It's likely some JavaScript thing.

There's also a workaround: save the carrier without that number, open it again and find the field editable.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0

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 :-)

Link to comment
Share on other sites

  • 0

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:

0_1492604272127_Carrier wizard.png

If you want to try this, here's an upgrade package:

01492604960741tb-wizard-patched.zip

And in case it doesn't work and you have no backup, here are the same files in the original version:

01492604997611tb-wizard-original.zip

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 :-)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...